pyrevit clone <clone_name> <deployment_name> [--dest=<dest_path>] [--branch=<branch_name>] [--log=<log_file>]
pyrevit clone <clone_name> --image=<image_url> [--dest=<dest_path>] [--log=<log_file>]
pyrevit clone <clone_name> [--dest=<dest_path>] [--source=<repo_url>] [--branch=<branch_name>] [--log=<log_file>] [--username=<username>] [--password=<password>]
pyrevit
can maintain multiple clones of pyRevit on your system. In order to do so, it needs to assign a name to each clone (<clone_name>
). You’ll set this name when cloning pyRevit or when adding an existing clone to pyrevit
registry. From then on you can always refer to that clone by its name.
Let’s say I want one clone of pyRevit master
branch as my master repo; one clone of pyRevit without the full git repository (much smaller download) as my main repo; and finally one clone of the develop
branch of pyRevit as my development repo.
Let’s create the master clone first. This will be a full git repo of the master branch.
# master is <clone_name> that we're providing to pyrevit cli
# we're not providing any value for <dest_path>, therefore pyrevit cli will clone
# pyRevit into the default path (%APPDATA%/pyRevit)
$ pyrevit clone master
Now let’s create the main clone. This one does not include the full repository. It’ll be cloned from the ZIP archive provided by the Github repo:
# we're providing the <dest_path> for this clone
# we're using the `base` deployment in this example which includes the base pyRevit tools
$ pyrevit clone main base --dest="C:\\pyRevit\\main"
<deployment_name>
: When provided the tool installs from the ZIP archive and NOT the complete git repo. This is the preferred method and is used with the native pyRevit installer. pyRevit has multiple deployments. These deployments are defined in pyRevitFile the inside the pyRevit repo. Each deployment, only deploys a subset of directories.Now let’s create the final development clone. This is a full git repo.
$ pyrevit clone dev --dest="C:\\pyRevit\\dev" --branch=develop
--branch=
: Specify a specific branch to be clonedYou can also use the clone command to install your own pyRevit clones from any git url. This is done by providing --source=<repo_url>
or --source=<archive_url>
depending on if you’re cloning from a git repo or an archive. If you are cloning from a private repository, you can provide the --username
and --password
to the repo account as well.
$ pyrevit clone mypyrevit --source="<https://www.github.com/my-pyrevit.git>" --dest="C:\\pyRevit\\mypyrevit" --branch=develop
Or install from a ZIP archive using <deployment_name>
:
$ pyrevit clone mypyrevit base --source="\\\\network\\my-pyrevit.ZIP" --dest="C:\\pyRevit\\mypyrevit"
You can see a list of registered clones using. Notice the full clones and the no-git clones are listed separately:
$ pyrevit clones
==> Registered Clones (full git repos)
Name: "master" | Path: "%APPDATA%\\pyRevit\\pyRevit"
Name: "dev" | Path: "C:\\pyRevit\\dev"
==> Registered Clones (deployed from archive)
Name: "main" | Path: "C:\\pyRevit\\main"