---
icon: lucide/settings
---

# config

Manage agent-cli configuration files.

## Usage

```bash
agent-cli config [OPTIONS] COMMAND [ARGS]...
```

## Description

The `config` command helps you create, edit, and inspect your configuration file.
Set `AGENT_CLI_CONFIG_HOME` or `XDG_CONFIG_HOME` before startup to change the user-level config path.

## Commands

- `config init` - Create a new config template
- `config edit` - Open the config file in your editor
- `config show` - Print the config file path and contents

---

## config init

Create a new config file with all options commented out.

### Usage

```bash
agent-cli config init [OPTIONS]
```

<!-- CODE:START -->
<!-- from agent_cli.docs_gen import all_options_for_docs -->
<!-- print(all_options_for_docs("config.init")) -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
### Options

| Option | Default | Description |
|--------|---------|-------------|
| `--path, -p` | - | Where to create the config file (default: resolved user config path). |
| `--force, -f` | `false` | Overwrite existing config without prompting for confirmation. |


<!-- OUTPUT:END -->

### Example

```bash
agent-cli config init
```

---

## config edit

Open the config file in your default editor.

### Usage

```bash
agent-cli config edit [OPTIONS]
```

<!-- CODE:START -->
<!-- from agent_cli.docs_gen import all_options_for_docs -->
<!-- print(all_options_for_docs("config.edit")) -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
### Options

| Option | Default | Description |
|--------|---------|-------------|
| `--path, -p` | - | Override auto-detection and use this config file path. |


<!-- OUTPUT:END -->

### Example

```bash
agent-cli config edit
```

---

## config show

Display the config file location and contents.

### Usage

```bash
agent-cli config show [OPTIONS]
```

<!-- CODE:START -->
<!-- from agent_cli.docs_gen import all_options_for_docs -->
<!-- print(all_options_for_docs("config.show")) -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
### Options

| Option | Default | Description |
|--------|---------|-------------|
| `--path, -p` | - | Override auto-detection and use this config file path. |
| `--raw, -r` | `false` | Print plain file contents without syntax highlighting or line numbers. |
| `--json` | `false` | Output as JSON with `path`, `exists`, and `content` fields. |


<!-- OUTPUT:END -->

### Example

```bash
agent-cli config show --raw
```
