# config — Config Namespace Command
### Scope
- **Purpose**: Reference for the `.config` cm command.
- **Responsibility**: Command syntax, parameters, exit codes, examples, and cross-references for `.config`.
- **In Scope**: `.config` (show-all / get / set / unset modes).
- **Out of Scope**: Deprecated `.settings.*` commands (→ [settings.md](settings.md)), version commands (→ [version.md](version.md)), process commands (→ [processes.md](processes.md)).
---
### Command :: 13. `.config`
Inspect or modify Claude Code settings with 4-layer effective-value resolution: env var → project config → user config → catalog default.
The operating mode is determined by the parameter combination:
| show-all | (none) | Print all resolved settings across all layers |
| get | `key::K` | Print resolved value for key K with source layer |
| set | `key::K value::V` | Write K→V to target scope (type-inferred) |
| unset | `key::K unset::1` | Delete key K from target scope |
-- **Parameters:** key::, value::, scope::, format::, v::, dry::, unset::
**Syntax:**
```sh
cm .config [key::K] [value::V] [scope::SCOPE] [format::FMT] [v::N] [dry::1] [unset::1]
```
**Parameters:**
| [`key::`](../param/06_key.md) | [`SettingsKey`](../type/04_settings_key.md) | — | No | Setting key to read or write |
| [`value::`](../param/07_value.md) | [`SettingsValue`](../type/05_settings_value.md) | — | No | Value to write (type-inferred) |
| [`scope::`](../param/11_scope.md) | [`ConfigScope`](../type/06_config_scope.md) | user | No | Write target: user or project |
| [`format::`](../param/05_format.md) | [`OutputFormat`](../type/02_output_format.md) | text | No | Output format |
| [`v::`](../param/04_v.md) | [`VerbosityLevel`](../type/01_verbosity_level.md) | 1 | No | Output detail level |
| [`dry::`](../param/02_dry.md) | bool | false | No | Preview without writing |
| [`unset::`](../param/12_unset.md) | bool | false | No | Delete the key from target scope |
**Invalid combinations:**
| `value::V` without `key::K` | exit 1: `key:: is required when value:: is provided` |
| `unset::1` without `key::K` | exit 1: `key:: is required when unset::1` |
| `value::V` and `unset::1` together | exit 1: `value:: and unset:: are mutually exclusive` |
| `scope::project` without `key::K value::V` or `key::K unset::1` | exit 1: `scope:: only applies to write operations` |
**Examples:**
```sh
# Show all resolved settings with source annotations
cm .config
# Get the effective value of a key
cm .config key::model
cm .config key::theme format::json
# Set a value in user settings (default scope)
cm .config key::theme value::dark
cm .config key::model value::claude-opus-4-6
# Set a value in project settings
cm .config key::model value::claude-haiku-4-5-20251001 scope::project
# Preview a write (no file change)
cm .config key::theme value::dark dry::1
# Remove a key from user settings
cm .config key::theme unset::1
```
### Referenced Formats
| 1 | [text](../format/01_text.md) | Default human-readable output |
| 2 | [json](../format/02_json.md) | Machine-readable structured output |
### Referenced Parameter Groups
| 1 | [Output Control](../param_group/01_output_control.md) | Partial | `count::` |
| 2 | [Execution Control](../param_group/02_execution_control.md) | Partial | `force::` |
| 4 | [Config Identity](../param_group/04_config_identity.md) | Full | — |
### Related Commands
| 1 | [`.settings.show`](settings.md#command--9-settings-show) | Deprecated predecessor (show-all mode) |
| 2 | [`.settings.get`](settings.md#command--10-settings-get) | Deprecated predecessor (get mode) |
| 3 | [`.settings.set`](settings.md#command--11-settings-set) | Deprecated predecessor (set mode) |
### Referenced User Stories
| 4 | [004 Settings Management](../user_story/004_settings_management.md) | Developer (settings management) |
---
**Category:** config
**Complexity:** 12
**API Requirement:** None
**Idempotent:** Yes (set/unset are idempotent on the same key+value)
**Risk Level:** Low