> ## Documentation Index
> Fetch the complete documentation index at: https://shunya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> Complete reference for the Charter command-line interface.

All commands accept `--repo <path>` to choose the repository root. `charter --version` prints the installed version.

## `init`

```sh theme={null}
charter init
```

Creates `.charter/decisions/`, a default `config.yaml`, `DECISIONS.md`, and the local events database. Safe to run again; existing files are retained.

## `propose`

```sh theme={null}
charter propose [flags]
```

With no `--title`, prompts interactively for title, context, decision, consequences, and alternatives. The rationale prompts accept multiple lines; finish each answer with a blank line.

| Flag | Meaning |
| - | - |
| `--title` | Decision title. Required for non-interactive use. |
| `--context` | Why the Decision matters. |
| `--decision` | The choice being made. |
| `--consequences` | Tradeoffs and implications. |
| `--alternatives` | Alternatives considered and why they were not selected. |
| `--scope-path` | Repeatable doublestar glob governed by the Decision. |
| `--scope-tag` | Repeatable diff-text tag governed by the Decision. |
| `--enforcement` | `blocking`, `advisory`, or `off`; defaults to `config.yaml`'s `enforcement_default`, else `advisory`. |
| `--supersedes` | ID of a Decision the proposal is intended to replace. |
| `--by` | Proposer identity; otherwise Git user name/email is used. |
| `--review-after` | Next review date, `YYYY-MM-DD`; cannot be combined with `--stale-after`. |
| `--stale-after` | Recurring freshness duration: `<number>d`, `<number>mo`, or `<number>y`. |

## Decision lifecycle commands

| Command | Purpose | Flags |
| - | - | - |
| `accept <id>` | Move a proposed Decision to accepted. | `--by`, `--why` (optional acceptance note) |
| `reject <id>` | Move a proposed Decision to rejected. | `--by`, `--why` (**required**) |
| `supersede <old-id> --with <new-id>` | Mark an accepted Decision superseded and link it to a replacement. | `--with` (**required**) |
| `affirm <id>` | Reset an accepted Decision's freshness review date. | `--stale-after <duration>` overrides/sets `stale_after` (`--after` is a deprecated alias) |

IDs may be entered as `7` or `0007`; numeric IDs normalize to four digits.

## Read and maintain Decisions

| Command | Purpose | Flags | | | |
| - | - | - | - | - | - |
| `list` | List Decisions in ID order. | \`--status proposed | accepted | rejected | superseded`, `--stale\` |
| `show <id>` | Print a Decision's frontmatter and Markdown content. | None | | | |
| `search <query>` | Rank non-rejected Decisions by title/body relevance. | Query is one or more positional words. | | | |
| `sync` | Rebuild `.charter/DECISIONS.md` from Decision files. | None | | | |
| `log [id]` | Show derived audit events, newest first; optionally filter by Decision. | None | | | |

## Enforcement and integration

| Command | Purpose | Flags | |
| - | - | - | - |
| `check` | Match changed files to accepted Decision scopes. | `--diff <base-ref>`, `--ci` (currently no-op) | |
| `mcp` | Run the stdio MCP server for one agent session. | `--principal <identity>` | |
| `install <tool>...` | Register/update supported agent integration. | `--print` previews configuration | |
| `bootstrap` | Mine a repository for proposed Decisions. | `--dry-run`, `--scan-only`, \`--agent claude | codex\` |

Run `charter <command> --help` for command-local help generated by the binary.

## Shell completion

Charter inherits Cobra's `completion` command:

```sh theme={null}
charter completion bash
charter completion zsh
charter completion fish
charter completion powershell
```

Pipe the generated script into the installation location recommended by your shell.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.