Docs
Commands
Init

init Command

The init command is used to create a new playbook project to store resources and declarations and generate packages. The new project will be created from a default project template (opens in a new tab). The created project will contain a basic directory structure, configuration files, and examples of resources.

To create a new project, execute the following command:

aiop init {playbook_path}

playbook_path is the path to the directory where you want to create the project.

By running the help command, you can see the available options for the init command:

usage: aiop init [-h] [--url URL] [-v] [--init_ref] playbook_path
 
positional arguments:
  playbook_path  Path to create the playbook and git init it.
 
options:
  -h, --help     show this help message and exit
  --url URL      Url of the remote repository to push the playbook
  --init_ref     Force the git initialization of the playbook(default: False)
  -v, --verbose  Force the verbosity of the logs to DEBUG. Thus overriding the verbosity set in the configuration file.

The --url option is used to specify the URL of the remote repository where you want to push the project. If you specify this option, the project will be initialized with a git repository and pushed to the remote repository. This can be Github (opens in a new tab), Gitlab (opens in a new tab), Bitbucket (opens in a new tab), or any other git repository.

The --init_ref option is used to force the initialization of the git repository. By default, the git repository is initialized only if the directory is not already a git repository.