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.

Files It Creates

The following files are created only when they are absent:
FilePurpose
AGENTS.mdAgent context file — project summary, commands, and edit boundaries
charter.yamlPolicy config scaffolded with profile: standard
.gitignoreAgent artifact patterns appended when the file is absent
ARCHITECTURE.mdRepo overview template
.env.exampleEnvironment variable references
.claude/settings.jsonCreated when Claude is detected or explicitly requested via --agents

Usage

charter init
charter init creating files

Flags

--path
string
Target directory to scaffold. Defaults to the repository root when one is found, otherwise the current directory.
--dry-run
boolean
Print the planned file actions without writing anything. Use this to preview exactly what init would create before committing.
--yes
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.
--profile
standard | strict
Policy profile written into the generated charter.yaml. Defaults to standard.
--agents
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.

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

charter doctor --threshold 80
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).