• Document Up to Date
  • Updated On 4.0.0


Creates a site from a blueprint or a remote repository


The connection to CrafterCMS needs to be setup via the add-environment command before using the command listed here.


crafter-cli create-site [-or] [--singleBranch] [-b=<remoteBranch>]
                        [--blueprint=<blueprint>] [--config=path]
                        [-d=<description>] -e=<environment>
                        [-n=<remoteName>] [-p=<profile>] -s=<siteId>
                        [--sandboxBranch=<sandboxBranch>] [-u=<url>]
                        [[--username=<username>] (--password=<password>
                        | --token=<token> | --key=<privateKey>)]
                        [--clone | --push]


-b, --branch=<remoteBranch>
                         The name of the remote branch
                         The id of the site blueprint
    --clone               Create a site cloning a remote repository
    --config=path         The folder to store configurations
-d, --description=<description>
                         The description for the site
-e, --environment=<environment>
                         The name of the environment
    --key=<privateKey>    The path of the private key for authentication
-n, --name=<remoteName>   The name of the remote
-o, --orphan              Discards the history from the remote repository
-p, --profile=<profile>   The name of the profile (a label to group related configurations)
    --password=<password> The password for authentication
    --push                Create a site and push to a remote repository
-r, --remote              Enable the options for using a remote repository
-s, --siteId=<siteId>     The id of the site
                          The name of the branch for the local repository
    --singleBranch        Fetch only the given branch from the remote
                          Parameter for the blueprint
    --token=<token>       The token for authentication
-u, --url=<url>           The URL of the remote repository
    --username=<username> The username for authentication


Here’s an example of creating a site using the Website Editorial Blueprint:

➜  ./crafter-cli create-site -e local -s myeditorial --blueprint org.craftercms.blueprint.editorial

Here’s an example of creating a site by cloning an existing
➜  ./crafter-cli create-site -e local -s my-site -n My Site \
                  -r --clone -u http://github.com/john/doe/my-site.git -b development \
                  --username john --key /home/john/private_key