clavis init
Link this directory to a project
sh
clavis init [flags]Also available as link.
Link the current folder to an organization, project and default environment by writing .clavis.yaml. The file holds no secrets, so commit it: everyone on the team then gets the same context.
init asks for anything it can't work out, offers to import an existing .env, and detects how to start your app (package.json scripts, bin/rails, manage.py, artisan, go.mod, Cargo.toml, Maven, Gradle, Docker Compose) so a plain clavis run works right away.
Run it again to point the folder at another project or environment. clavis link is the same command.
Examples
Interactive
sh
clavis initNon-interactive
sh
clavis init --org acme --project web-app --env devCreate the project too
sh
clavis init --project-name "Web app"Switch this folder to staging
sh
clavis init --project web-app --env stagingFlags
--project-name string- create a project with this name if none exist
Global flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command