Skip to main content
charter init bootstraps a repository for Charter. It uses a create-missing-only approach: it only creates files that do not already exist, never overwrites, never deletes, and stays fully offline. Repeated runs become no-ops once all files are present, making it safe to use in scripting and CI.

Usage

charter init creating files

charter init output — detected stack and created files

Flags

string
Target directory to scaffold. Defaults to the repository root when one is found, otherwise the current directory.
boolean
Print the planned file actions without writing anything. Use this to preview exactly what init would create before committing.
boolean
Skip prompts for non-interactive or CI use. Because init never overwrites existing files, this flag is effectively a no-op in most runs — it is accepted for scripting compatibility.
standard | strict
Policy profile written into the generated charter.yaml. Defaults to standard.
string
Comma-separated agent surfaces to request, such as claude,cursor. Controls whether agent-specific config files like .claude/settings.json are scaffolded. When omitted, Charter auto-detects the agent surface and falls back to claude if nothing is detected. AGENTS.md is always created regardless of this flag.

Files It Creates

The following files are created only when they are absent:

After Init

1

Review the generated files

Open AGENTS.md and tailor the project summary, commands section, and edit boundaries to your repo. The scaffolded content is intentionally generic.
2

Run charter doctor

This gives you your baseline score. A blank repo typically passes 80 immediately after init.
3

Commit the new files

Add the scaffolded files to version control so future scans and CI runs see them.
A blank Go repo scores ≥ 80 immediately after charter init — measured at 95 in testing. The residual findings are typically AE-ENV-001 (no toolchain file) and AE-CI-002 (CI not yet configured).

Exit codes

Policy profiles

What standard and strict change in the generated charter.yaml.

Adopt in an existing repo

Bring Charter into a repo that already has agent context files.

doctor

Score the repo after scaffolding to get a baseline.