> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/config.md).

# config

Manage CLI-wide configuration — read, write, and inspect the settings stored in `~/.celigo/config.json` for the selected profile, plus the machine-wide settings.

**Note**: `config` commands are LOCAL. They do not call the REST API.

```
celigo config <subcommand> [args] [flags]
```

Supports all [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md). `config` reads and writes the **selected profile** — `--profile`, else `CELIGO_PROFILE`, else the active profile; pass `--profile <name>` before the subcommand to target a different one. `config set … --profile <name>` also creates a profile that does not exist yet: the `config` commands are exempt from the check that fails every other command on an unknown profile name. Values are persisted to `~/.celigo/config.json` (mode `0600`). Since celigo-cli 2026.10.1, every write is one locked read-modify-write, so commands running in parallel never lose each other's changes (see [How the file is written](https://developer.celigo.com/cli/getting-started/configuration.md#how-the-file-is-written)), and under `profile_pin_policy = strict` every `config` command refuses a `--profile` or `CELIGO_PROFILE` that differs from the active profile (see [Gotchas](#gotchas)).

Two kinds of key exist. **Per-profile keys** — `api_token`, `base_url`, `default_format` (`json` | `table`), `mode` (`read` | `operate` | `full`), `account_alias`, `list_fields` (`all` | `default`) — belong to one profile. **Machine-wide keys** — `auto_update`, `profile_pin_policy` (`allow` | `strict`), `skills_auto_install`, `skills_auto_install_exclude`, `specs_auto_update` — belong to the installation (one CLI install per machine), live in a top-level `settings` object, and reject `--profile`. A profile signed in with [`celigo login`](https://developer.celigo.com/cli/commands/login.md) also holds `oauth` and `identity`, which `config get` reads and `config set` does not take. What each key does is in the [configuration guide](https://developer.celigo.com/cli/getting-started/configuration.md).

***

## Subcommands

| Subcommand          | Purpose                                                                                      |
| ------------------- | -------------------------------------------------------------------------------------------- |
| `show`              | Dump the selected profile's configuration (tokens redacted), plus the machine-wide settings. |
| `get <key>`         | Print one configuration value.                                                               |
| `set <key> <value>` | Write one configuration value.                                                               |
| `unset <key>`       | Remove one configuration value so its default applies again — the way to clear a key.        |

***

## `celigo config show`

Prints every stored field for the selected profile, plus the machine-wide settings. Every value whose key names a token, secret, or password is redacted — a signed-in profile's `oauth` block included — except `token_type` and `token_endpoint`, which only name a token. JSON prints for `--format json` on the command line, in lower case, or with `--jq`; `CELIGO_FORMAT`, the profile's `default_format`, and another spelling such as `--format JSON` leave the text output. With nothing stored, it prints `No configuration set. Run: celigo login or celigo config set api_token <token>`.

When the [managed policy file](https://developer.celigo.com/cli/getting-started/profiles.md#the-managed-policy-file) forces `profile_pin_policy`, the output reports `profile_pin_policy = strict` whatever `~/.celigo/config.json` says and adds a `profile_pin_policy_managed_by` entry naming the file (since celigo-cli 2026.9.5).

**Signature**

```bash
celigo config show
```

**Arguments**

None.

**Flags**

None (beyond global flags).

**Example**

```bash
celigo config show
celigo --profile ci config show --format json
```

***

## `celigo config get`

Prints the stored value for one key. If the key is unset, prints `<key>: (not set)`. `api_token` is redacted on output. A nested block prints as redacted JSON: `config get oauth` shows a signed-in profile's session with its access, refresh, and ID tokens masked. `config get identity` prints the key of the environment the profile is bound to.

For `profile_pin_policy`, the value printed is the effective one: when the [managed policy file](https://developer.celigo.com/cli/getting-started/profiles.md#the-managed-policy-file) forces it, the line reads `profile_pin_policy = strict (managed by /etc/celigo/policy.json)` (since celigo-cli 2026.9.5).

**Signature**

```bash
celigo config get <key>
```

**Arguments**

| Argument | Type   | Required | Description                                                                                                                                                                                                                                                                                      |
| -------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<key>`  | string | Yes      | A per-profile key (`api_token`, `base_url`, `default_format`, `mode`, `account_alias`, `list_fields`, and on a signed-in profile `oauth` and `identity`) or a machine-wide key (`auto_update`, `profile_pin_policy`, `skills_auto_install`, `skills_auto_install_exclude`, `specs_auto_update`). |

**Flags**

None (beyond global flags).

**Example**

```bash
celigo config get api_token
celigo config get oauth                          # a sign-in's session, as redacted JSON
celigo config get base_url
celigo --profile ci config get mode
celigo config get profile_pin_policy             # (not set) until written; else allow, strict, or strict (managed by /etc/celigo/policy.json)
```

***

## `celigo config set`

Writes one key/value pair to the selected profile, or — for a machine-wide key — to the installation. `mode`, `default_format` (since celigo-cli 2026.10.1), `list_fields`, `profile_pin_policy`, and the `true`/`false` keys are validated against their allowed sets; `base_url` must be an HTTPS origin (HTTP only for localhost), `account_alias` 5–15 letters and digits, and `skills_auto_install_exclude` a list of skill names. `api_token` is stored as provided. The stored value is echoed back on success (with `api_token` redacted).

An empty value is refused — it is far more often an unset shell variable (`config set api_token "$TOKEN"`) than a request, and storing it would silently clear the key. Since celigo-cli 2026.10.1 the refusal names the way to clear a key on purpose, [`config unset`](#celigo-config-unset):

```
The <value> argument is empty. Provide a non-empty value (this usually means a shell variable was unset). To clear a key, run: celigo config unset <key>.
```

`default_format` takes `json` or `table` and nothing else, since celigo-cli 2026.10.1: `Invalid format 'xml' for default_format. Use json or table.` Until then any value was stored and then read as `json`.

**Raising `mode` needs a person at a terminal** (since celigo-cli 2026.10.1). Tightening — `full` to `operate` to `read` — never asks, and neither does a profile that does not exist yet, whose mode is the default. Raising the profile's stored mode — `read` to `operate` or `full`, `operate` to `full` — asks the person at the terminal to type the new mode back, and any other answer leaves the mode as it was (`Not confirmed; profile 'acme-prod' stays in read mode.`, exit 0):

```
Set profile 'acme-prod's mode to full? Every session on it is held to read mode now; full mode lets it create, replace and delete resources as well. Type 'full' to confirm:
```

Off a terminal the raise is refused, exit 1. The raise is judged against the stored mode, whatever `CELIGO_MODE` says, and judged again when the write lands:

```
Raising profile 'acme-prod's permission mode from read to full needs a person at a terminal: run this command in an interactive shell. An agent must not raise the mode on the person's behalf, nor get past this refusal another way (another profile, an edit of the config file; CELIGO_MODE never raises a profile's mode).
```

**On a profile signed in with OAuth** (since celigo-cli 2026.10.1), two writes are refused, checked inside the locked write:

* `api_token` — a profile holds one credential:

  ```
  Profile 'acme-corp-production' is signed in with OAuth, and a profile holds one credential. To store an API token in it, sign out first: celigo logout --profile acme-corp-production. To keep both, put the token in a profile of its own: celigo profile add <name> --api-token <token>.
  ```
* `base_url` naming another host than the session's — its tokens are valid only there:

  ```
  Profile 'acme-corp-production' is signed in to api.integrator.io, and its session is valid only there — refusing to point the profile at api.eu.integrator.io. Sign out first (celigo logout --profile acme-corp-production), or sign in to api.eu.integrator.io under a profile of its own: celigo login --profile <name> --base-url https://api.eu.integrator.io.
  ```

`profile_pin_policy` (since celigo-cli 2026.9.5) is the other key whose write can ask. Tightening to `strict` never asks. Loosening from `strict` to `allow` needs a person at a terminal: on a TTY the command asks `Set profile_pin_policy to allow? A --profile or CELIGO_PROFILE that differs from the active profile will no longer be refused on this machine. Type 'allow' to confirm:` and any answer but `allow` — or end-of-input — leaves it strict (`Not confirmed; profile_pin_policy stays strict.`, exit 0); when stdin is not a terminal it is refused, exit 1:

```
Loosening profile_pin_policy (strict → allow) needs a person at a terminal: run this command in an interactive shell. An agent must not do this on the person's behalf.
```

When the [managed policy file](https://developer.celigo.com/cli/getting-started/profiles.md#the-managed-policy-file) forces the setting, neither value can be written:

```
'profile_pin_policy' is managed by /etc/celigo/policy.json (strict) and cannot be changed with config set; editing that file needs administrator rights.
```

**Signature**

```bash
celigo config set <key> <value>
```

**Arguments**

| Argument  | Type   | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<key>`   | string | Yes      | A per-profile key (`api_token`, `base_url`, `default_format`, `mode`, `account_alias`, `list_fields`) or a machine-wide key (`auto_update`, `profile_pin_policy`, `skills_auto_install`, `skills_auto_install_exclude`, `specs_auto_update`).                                                                                                                                                                |
| `<value>` | string | Yes      | New value; never empty. `mode` must be `read`, `operate`, or `full`; `default_format` must be `json` or `table`; `list_fields` must be `all` or `default`; `profile_pin_policy` must be `allow` or `strict`; `auto_update`, `skills_auto_install`, and `specs_auto_update` must be `true` or `false`; `skills_auto_install_exclude` is a comma-separated list of skill names (clear it with `config unset`). |

**Flags**

None (beyond global flags).

**Example**

```bash
celigo config set api_token <bearer-token>
celigo config set base_url https://api.eu.integrator.io
celigo config set default_format table
celigo config set mode operate
celigo config set account_alias acmecorp          # this account's MCP alias, for the local tree and mcp-servers registry
celigo config set list_fields all                 # complete documents from every list command

# Machine-wide settings (no --profile)
celigo config set auto_update false
celigo config set specs_auto_update false         # no daily refresh of the `celigo lint` schema pack
celigo config set profile_pin_policy strict       # refuse a --profile or CELIGO_PROFILE that differs from the active profile

# Target another profile — or create one that does not exist yet
celigo --profile ci config set default_format json
celigo --profile new-account config set api_token "<paste>"
```

***

## `celigo config unset`

> Added in celigo-cli 2026.10.1.

Removes one key from the selected profile, or — for a machine-wide key — from the installation, so its default applies again. It is the one way to clear a key, since `config set` refuses an empty value, and it takes every key `config set` takes. A key that is not set is reported as such (`default_format is not set on profile 'acme-prod'`, exit 0), and a profile that does not exist is never created.

`unset` is held to `config set`'s rules:

* A machine-wide key rejects `--profile`.
* `profile_pin_policy` loosens from `strict` to its default, `allow`, only for a person at a terminal who types `allow` back (`Unset profile_pin_policy (its default is allow)? …`); off a terminal it is refused, and under the [managed policy file](https://developer.celigo.com/cli/getting-started/profiles.md#the-managed-policy-file) it cannot be changed at all.
* `mode` on a `read` or `operate` profile leaves the default, `full`, so it is a raise: a person at a terminal types `full` back (`Unset profile 'acme-prod's mode (its default is full)? …`), and off a terminal it is refused — `Unsetting profile 'acme-prod's permission mode leaves the default, full — raising it from read needs a person at a terminal: …`.
* `base_url` on a profile signed in with OAuth moves it to the default host, so it is refused when the session belongs to another host (`… refusing to point the profile at api.integrator.io (the default host, where a profile without a base_url goes). …`).
* A profile whose name holds a path separator can only be renamed or deleted, and is refused here as by `config set`.

Unsetting `api_token` is always allowed, and says what the profile authenticates with afterwards — `Profile 'acme-corp-production' keeps its OAuth sign-in.`, or `Profile 'acme-prod' holds no credential now. Sign in with celigo login --profile acme-prod, or store a token with celigo config set api_token <token> --profile acme-prod.` It is also how to keep the sign-in of a profile a pre-release build left holding both credentials (see [One credential, one environment](https://developer.celigo.com/cli/getting-started/profiles.md#one-credential-one-environment)).

**Signature**

```bash
celigo config unset <key>
```

**Arguments**

| Argument | Type   | Required | Description                                                                                                                                                                                                                                                               |
| -------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<key>`  | string | Yes      | Any key `config set` takes: a per-profile key (`api_token`, `base_url`, `default_format`, `mode`, `account_alias`, `list_fields`) or a machine-wide key (`auto_update`, `profile_pin_policy`, `skills_auto_install`, `skills_auto_install_exclude`, `specs_auto_update`). |

**Flags**

None (beyond global flags).

**Example**

```bash
celigo config unset default_format                    # the selected profile reads json again
celigo --profile ci config unset list_fields          # another profile
celigo config unset skills_auto_install_exclude       # machine-wide: clear the exclusion list
celigo config unset api_token --profile acme-corp-production   # keep the sign-in, drop the token
```

```
default_format unset (profile 'acme-prod')
skills_auto_install_exclude unset (machine-wide)
```

***

## Gotchas

1. **Valid keys are fixed.** The six per-profile keys and the five machine-wide keys above are the whole set `config set` and `config unset` take; any other key is refused as unknown, naming the valid ones. `config get` reads any stored key, `oauth` and `identity` included.
2. **Writes target one profile at a time.** With no `--profile` flag and no `CELIGO_PROFILE`, `config set` and `config unset` write to the active profile. To update a different profile, put `--profile <name>` before the `config` subcommand. A machine-wide key with `--profile` is an error (`'profile_pin_policy' is machine-wide (there is one CLI installation, not one per profile) — drop --profile.`).
3. **`profile_pin_policy` is machine-wide and cannot be loosened by a session.** Like the other machine-wide keys it rejects `--profile`. `strict` refuses every `--profile` or `CELIGO_PROFILE` value that differs from the active profile — `celigo profile use` becomes the only way an account gets selected on the machine — and going back to `allow`, by `config set` or `config unset`, needs a person at a terminal typing `allow`; off a TTY the write is refused. The managed policy file locks the key entirely; `config get`/`show` say so with `managed by <file>`. An agent must not change this setting to get past a refusal. See [Refusing a pinned profile](https://developer.celigo.com/cli/getting-started/profiles.md#refusing-a-pinned-profile).
4. **The strict pin policy covers `config` too.** Since celigo-cli 2026.10.1, under `profile_pin_policy = strict`, `config get`, `set`, `unset`, and `show` refuse a `--profile` or `CELIGO_PROFILE` that differs from the active profile, before anything is read or written — so a pinned session can neither read another profile's settings nor give it a token or a mode. `config set … --profile <new>` naming a profile that does not exist yet still creates it; `config get`, `unset`, and `show` refuse such a name too.
5. **Tokens are redacted on read, not on write.** `config set api_token <value>` stores the raw token but prints a redacted form; `config get api_token`, `config get oauth`, and `config show` always redact.
6. **`mode` is validated, and only a person raises it.** Any value other than `read`, `operate`, or `full` is rejected before it reaches the config file. Since celigo-cli 2026.10.1, a write that raises the profile's stored mode — `config set mode`, or `config unset mode` on a `read` or `operate` profile — needs a person at a terminal to type the new mode back. See [Permission modes](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).
7. **Env vars and CLI flags override the file.** `CELIGO_API_TOKEN`, `CELIGO_BASE_URL`, `CELIGO_FORMAT`, `CELIGO_MODE`, `CELIGO_ACCOUNT_ALIAS`, and the equivalent `--token` / `--base-url` / `--format` / `--profile` flags take precedence at runtime — writing to the config file does not clear them. Since celigo-cli 2026.10.1, `CELIGO_MODE` only tightens the profile's mode, so `celigo config set mode` changes nothing while a stricter `CELIGO_MODE` is exported; the refusal says so (`Current mode: read (from CELIGO_MODE) …`).
8. **Unknown top-level keys survive.** Since celigo-cli 2026.9.1, profile and config writes round-trip config keys they do not understand (a `settings` block written by a newer CLI, keys from other tooling) instead of erasing them.
9. **A `config.json` that does not parse is never written over.** Since celigo-cli 2026.10.1, every `config set` and `config unset` refuses such a file — `Cannot change the configuration: <path> cannot be read as JSON (<reason>). Fix the file by hand, or move it away to start over; nothing was written.` — instead of replacing it with the defaults the command ran on. Since celigo-cli 2026.11.2, `<reason>` is the parser's reason without the file's text around the error, which can be a token.

## Related

* [profile](https://developer.celigo.com/cli/commands/profile.md) — create, switch, and delete the named profiles that `config` operates on.
* [login](https://developer.celigo.com/cli/commands/login.md) — sign a profile in with OAuth; the session is the `oauth` block `config get` reads.
* [configuration guide](https://developer.celigo.com/cli/getting-started/configuration.md) — full reference for the config file schema, environment variables, and precedence rules.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.celigo.com/cli/commands/config.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
