import collections


def plant(ctx, packages, replace, **tend_args):
    """
    Install package(s) to the garden.

    The list of packages may take the form of paths to package
    directories or name:path pairs.  If a name is not provided for a
    package, the package directory name is used instead.
    """

    new = collections.OrderedDict(packages)
    return ctx.obj["garden"].plant(new, replace=replace, **tend_args)