> ## 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.

# Installation

> Install the Charter CLI and initialize a repository.

## Requirements

Charter is a single Go binary. Build it with the Go version declared by the project's `go.mod`, or download a release archive. The runtime has no daemon, service, or external database requirement.

## Install with Go

```sh theme={null}
go install github.com/SkandaPrasad-S/charter/cmd/charter@latest
charter --version
```

Ensure `$(go env GOPATH)/bin` is on your `PATH`.

## Install a release binary

Download the archive for your operating system and CPU architecture from the project's GitHub Releases page, extract it, and place `charter` (or `charter.exe`) on `PATH`.

The repository also ships convenience installers:

```sh theme={null}
# Linux or macOS
curl -fsSL https://raw.githubusercontent.com/SkandaPrasad-S/charter/main/install.sh | sh
```

```powershell theme={null}
# Windows PowerShell
irm https://raw.githubusercontent.com/SkandaPrasad-S/charter/main/install.ps1 | iex
```

The shell installer accepts `VERSION` and `BIN_DIR`. The PowerShell installer accepts `CHARTER_VERSION` and `CHARTER_BIN_DIR`.

## Initialize a repository

Run this at the repository root:

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

It creates:

```text theme={null}
.charter/
├── config.yaml          # Repo defaults: enforcement_default, principals allowlist
├── DECISIONS.md         # Generated, committed Decision index
├── decisions/           # Source-of-truth Decision Markdown files
└── events.db            # Derived local audit log; do not treat as source of truth
```

`init` is idempotent: existing Decision and configuration files are not overwritten.

## Use a different repository directory

Every command accepts the persistent `--repo` flag. This is useful from scripts or when invoking Charter outside the repository root.

```sh theme={null}
charter --repo ../service-a list
charter --repo /work/service-a check --diff origin/main
```

## Verify the setup

```sh theme={null}
charter list
charter show 1       # after you create a Decision
```

If Charter reports that `.charter` is missing, run `charter init` in the target repository or pass the correct `--repo` value.


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