Skip to content

chant init

Scaffold a new chant project with the standard directory structure and configuration files.

chant init <path> --lexicon <name> [flags]
FlagDescription
-d, --lexicon <name>Select lexicon (required)
-t, --template <name>Init template (e.g. node-pipeline, docker-build)
--forceOverwrite existing files

chant init creates a new project at the specified path. It generates the full directory layout, TypeScript configuration, lint configuration, and a sample resource file so you can begin writing definitions immediately.

FilePurpose
src/ sample resourcesStarter resource definitions
chant.config.tsProject configuration (lexicons, strict lint preset)
tsconfig.jsonTypeScript compiler options
package.jsonDependencies
.gitignoreIgnores generated files
Terminal window
chant init my-infra --lexicon aws
cd my-infra
chant build
# Overwrite existing files
chant init my-infra --lexicon aws --force

To scaffold a new lexicon plugin project (for lexicon authors), use:

chant init lexicon <name> [path] [--force]

This creates a complete lexicon plugin project with stubs for every required lifecycle method. See init lexicon for full details.

Terminal window
# Scaffold a new lexicon
chant init lexicon k8s
# Scaffold at a custom path
chant init lexicon gcp ./my-gcp-lexicon
CodeMeaning
0Project created successfully
1Error (target path is not empty or could not be created)