Navigation
Copy page

config.json

On this page

config.json controls extension discovery. kli reads one copy, at ~/.config/kli/config.json. There is no project-local config.json: the file is global only.

It is a separate file from settings.json. settings.json configures behavior (theme, model, capabilities, profiles, and the rest); config.json holds nothing but the three keys below. If the file is absent, kli discovers extensions from its default directories alone. If it is present but malformed, kli reports the problem and ignores the file rather than stopping.

All three keys are optional. Each is a JSON array; an absent key is the empty array.

Keys

Key Type Default Effect
enabled array of strings [] Extension ids to install at boot. An id here is installed even when the extension's own metadata sets it to load off by default.
disabled array of strings [] Extension ids to keep off at boot. An id here is not installed, whatever its default.
extension-dirs array of strings [] Extra directories kli scans for extensions, in addition to its default discovery directories.

enabled and disabled

Each entry is an extension id, the same name shown by the /extensions command and used with /enable and /disable. Ids are matched case-insensitively: my-ext and MY-EXT name the same extension.

The two lists feed the boot decision for each discovered extension. The decision resolves in this order, stopping at the first rule that applies:

  1. The active profile disables the id.
  2. The active profile enables the id.
  3. disabled lists the id.
  4. enabled lists the id.
  5. The extension's own autoload metadata.
  6. Enabled.

Profile entries take precedence over config.json, and config.json takes precedence over an extension's own default. An id in both enabled and disabled is disabled, since disabled is checked first. These keys change only what is installed at boot; /enable and /disable change the running session without editing the file. For profile precedence, see Profiles.

extension-dirs

Each entry is a directory path. kli scans every listed directory for extensions and adds what it finds to its default discovery (the global ~/.config/kli/extensions/ directory and the project's <repo>/.kli/extensions/ directory). A listed directory that does not exist is skipped. The enabled/disabled decision then applies to every discovered extension, wherever it was found.

Example

json
{
  "enabled": ["my-ext"],
  "disabled": ["noisy-ext"],
  "extension-dirs": ["~/code/kli-extensions"]
}

For the discovery directories and the rest of the paths kli reads, see Files and paths.