<!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->

# pai config

> PAI_HOME namespace dir: path, migrate

## Synopsis

```
pai config <subcommand> [options]
```

## Subcommands

| Command | Description |
|---------|-------------|
| [`pai config path`](#pai-config-path) | Print the PAI_HOME namespace dir and each resolved per-user file |
| [`pai config yaml`](#pai-config-yaml) | Convert config.json → config.yaml (and voices.json → voices.yaml), with a short |
| [`pai config list`](#pai-config-list) | Print the main PAI config as YAML (secrets masked). Defaults to what the file explicitly sets. |
| [`pai config get <path>`](#pai-config-get-path) | Print one config value (dotted path, e.g. search.recencyBoostDays), masked if it looks like a secret. An object/array subtree prints as YAML; pass --json for JSON. |
| [`pai config set <path> <value>`](#pai-config-set-path-value) | Set one config value (dotted path). Value parsing: true/false, null, numbers, |
| [`pai config unset <path>`](#pai-config-unset-path) | Remove one config value (dotted path), reverting it to the built-in default |
| [`pai config migrate`](#pai-config-migrate) | Move config.json, workers.yaml, whisper-rules.md, advisor-mode.json, session-state/, |

### pai config path

Print the PAI_HOME namespace dir and each resolved per-user file


### pai config yaml

Convert config.json → config.yaml (and voices.json → voices.yaml), with a short

# comment above every top-level section and any "_comment"/"_...Note" JSON-
      workaround key re-attached as a real comment. Verifies the generated YAML
      re-parses to the exact same data before writing anything; the JSON is then
      renamed to <name>.migrated-<YYYY-MM-DD> (never deleted). Every writer keeps
      working unmodified afterwards — see docs/config.md.

**Options**

| Option | Description | Default |
|--------|-------------|---------|
| `--dry-run` | Print the plan without writing anything |  |
| `--force` | Regenerate config.yaml (or voices.yaml) even if it already exists |  |


### pai config list

Print the main PAI config as YAML (secrets masked). Defaults to what the file explicitly sets.

**Options**

| Option | Description | Default |
|--------|-------------|---------|
| `--all` | Include every default value, not just what the file sets |  |
| `--json` | Print JSON instead of YAML |  |


### pai config get <path>

Print one config value (dotted path, e.g. search.recencyBoostDays), masked if it looks like a secret. An object/array subtree prints as YAML; pass --json for JSON.

**Arguments**

| Argument | Kind |
|----------|------|
| `<path>` | required |

**Options**

| Option | Description | Default |
|--------|-------------|---------|
| `--json` | Print an object/array value as JSON instead of YAML |  |


### pai config set <path> <value>

Set one config value (dotted path). Value parsing: true/false, null, numbers,

[...] / {...} as JSON, else a string. Creates config.yaml (from config.json,
      if any) on first use, then writes comment-preserving.

**Arguments**

| Argument | Kind |
|----------|------|
| `<path>` | required |
| `<value>` | required |

**Options**

| Option | Description | Default |
|--------|-------------|---------|
| `--force` | Set an unknown top-level key, or a value of a different type than the default |  |


### pai config unset <path>

Remove one config value (dotted path), reverting it to the built-in default

**Arguments**

| Argument | Kind |
|----------|------|
| `<path>` | required |


### pai config migrate

Move config.json, workers.yaml, whisper-rules.md, advisor-mode.json, session-state/,

session-scan-cache.json, queries/, summary-cooldowns.json, work-queue.json,
kg-backfill-state.json, voices.json, the orphaned federation.db,
~/.pai/registry.db, ~/.pai/federation.db (live), ~/.pai/backups/,
~/.pai/obsidian-vault/, ~/.pai/scheduler-state.json, and ~/.claude/Agents/,
~/.claude/Commands/ into PAI_HOME.
registry.db and federation.db each get an extra WAL checkpoint and PRAGMA
integrity_check (sqlite3 CLI, if present) on top of the byte-identical copy.
backups/ is copied and sha256-verified file-by-file into
backups/legacy-pai-backups/ rather than merged in place. Agents/ and Commands/ each
get a symlink left at the old ~/.claude path once their content has moved, so
Claude Code still finds them at its fixed harness paths.
Each file is copied, verified byte-identical, then the old file is renamed to
<name>.migrated-<YYYYMMDD> (never deleted); directories move their contents, then
the emptied old directory is renamed the same way. Idempotent — entries already at
the new location, or with nothing old to migrate, are skipped.

**Options**

| Option | Description | Default |
|--------|-------------|---------|
| `--dry-run` | Print the plan without writing anything |  |
| `--logs` | Also move ~/.claude/logs/workers into PAI_HOME: an atomic rename plus a       symlink left at the old path, so any worker still writing there       keeps landing in the new directory (falls back to copy+verify       across volumes, refusing while a worker is RUNNING — see       `pai worker ps` — only in that fallback case) |  |
| `--history` | Also move ~/.claude/History/, agent-sessions.json, session-routing.json       and history/security/security-events.jsonl into PAI_HOME. These are       written by hooks on EVERY session's every turn, not just spawned       workers — refuses while any worker other than the interactive       session is RUNNING (see `pai worker ps`), but that guard cannot see       OTHER interactive `claude` sessions on this machine. Confirm none       are active (`ps aux \| grep claude`, `aibroker sessions list`) before       passing this flag. |  |


## See also

[`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai identity`](identity.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)

Run `pai help <area>` to read any of these in the terminal.

