---
title: "CLI"
description: "Find where your code reads each config, fail the build when it reads a key that does not exist, was renamed, or has the wrong type, see the value a context gets for a config and why, read a project's configs and targeting rules, create configs, replace a config's targeting rules, archive configs, read an experiment's results, and create, update and delete segments and metrics, with the configdirector command line tool"
canonical_url: "https://docs.configdirector.com/integrations/cli"
---
# CLI

> Find where your code reads each config, fail the build when it reads a key that does not exist, was renamed, or has the wrong type, see the value a context gets for a config and why, read a project's configs and targeting rules, create configs, replace a config's targeting rules, archive configs, read an experiment's results, and create, update and delete segments and metrics, with the configdirector command line tool

<div hidden="true" dataTitleIcon="cli">



</div>

<external-badges package-url="https://www.npmjs.com/package/@configdirector/cli" registry="npm" repo="cli">



</external-badges>

## Introduction

<note>

Commands and their output may change before 1.0, and the [changelog](https://github.com/ConfigDirector/cli/blob/main/CHANGELOG.md) lists every change.

</note>

`configdirector` checks your code against your ConfigDirector project, on your machine or as a CI step, and answers what a context gets for a config. Besides `login`, `logout` and `init`, which set it up, it has three commands:

- `configdirector scan` lists every place your code reads a config key through a ConfigDirector SDK or OpenFeature provider, with the file and line.
- `configdirector validate` checks those keys against the project's configs, and fails the build when the code reads a key no config has, the old key of a renamed config, a config as the wrong type, a config that is not served to that kind of SDK, or an enum value the config does not allow.
- `configdirector evaluate` shows the value a context gets for a config in an environment, the rule that served it, and why each rule matched or not.

It also lists a project's environments, configs and segments, and shows a config's targeting rules and when SDKs last evaluated it, as [Browse the project](#browse-the-project) describes, and it creates and copies configs, replaces their targeting rules and archives them, as [Create a config](#create-a-config), [Copy a config](#copy-a-config), [Targeting rules](#targeting-rules) and [Archive a config](#archive-a-config) describe, lists an experiment's runs with their results and ships or stops them, as [Experiment runs](#experiment-runs) describes, and creates, updates and deletes segments and metrics, as [Segments](#segments) and [Metrics](#metrics) describe. `scan --upload` sends the scan to the project, as [Upload the scan to ConfigDirector](#upload-the-scan-to-configdirector) describes, and `repositories list` and `repositories remove` list and remove the repositories uploaded to it, as [Scanned repositories](#scanned-repositories) describes. `configs create`, `configs copy`, `targeting-rules set`, `configs ship`, `configs stop`, `configs archive`, `segments create`, `segments update`, `segments delete`, `metrics create`, `metrics update`, `metrics delete`, `scan --upload` and `repositories remove` are the only commands that change anything in ConfigDirector.

If you have used LaunchDarkly's `ld-find-code-refs` or ConfigCat's `configcat scan`: those tools search your code for the keys your flags already have. `scan` also lists the SDK calls whose key no config has, which is how `validate` catches a misspelled key before it ships. A key held in a constant is found too, with nothing to configure.

## Install

The CLI needs Node.js 20 or later. Install it globally:

```bash
npm install -g @configdirector/cli
configdirector --version
```

Or run it without installing by writing `npx @configdirector/cli` in place of `configdirector`, as the [CI examples](#run-it-in-ci) do:

```bash
npx @configdirector/cli --version
```

Both get the newest release. To upgrade on your own schedule, add a version number from the changelog, as in `@configdirector/cli@0.11.0`. If you installed `@configdirector/cli@beta` before 0.11.0, install it again without `@beta`, which stays on the last beta.

Or install it with Homebrew, which takes care of Node.js:

```bash
brew install ConfigDirector/tap/configdirector
configdirector --version
```

The Homebrew formula is updated with every npm release, so `brew upgrade configdirector` gets the newest one.

## Create an API token

The CLI reads your projects and configs through the [Admin API](https://docs.configdirector.com/integrations/admin-api), with an API token.

1. In the ConfigDirector dashboard, open **API tokens** and click **Generate API token**. Choose **User API token** to sign in on your own machine, or **Organization API token** for CI.
2. Choose `Projects: Read` and `Configs: Read`, which `scan` and `validate` need. For `evaluate`, add `Environments: Read`, and `Contexts: Read` to evaluate a config for a [saved context](#the-context). To [browse the project](#browse-the-project), add `Environments: Read` for `environments list`, `Segments: Read` for `segments list` and `segments get`, `Metrics: Read` for `metrics list` and `metrics get`, `Tags: Read` for `configs list --tag`, and `Code references: Read` (`code-references:read`) for [`repositories list`](#scanned-repositories). A token with only these permissions cannot change anything. To [create configs](#create-a-config), add `Configs: Create`, with `Tags: Read` for `configs create --tag` and `Tags: Create` for `configs create --new-tag`. To [copy configs](#copy-a-config), add `Configs: Create`, with `Tags: Create` to create the tags another project doesn't have. To [replace targeting rules](#targeting-rules), add `Environments: Read` and `Configs: Update targeting rules` (`config-targeting-rules:update`). To [list an experiment's runs](#experiment-runs), add `Environments: Read`, and to ship a variation or stop a run, add `Configs: Update targeting rules` as well. To [archive configs](#archive-a-config), add `Configs: Archive` (`configs:archive`). To [create, update and delete segments](#segments), add `Segments: Create`, `Segments: Update` and `Segments: Delete` (`segments:create`, `segments:update` and `segments:delete`), with `Segments: Read` for `segments update`. To [create, update and delete metrics](#metrics), add `Metrics: Create`, `Metrics: Update` and `Metrics: Delete` (`metrics:create`, `metrics:update` and `metrics:delete`), with `Metrics: Read` for `metrics update` and `metrics delete`. To [upload the scan](#upload-the-scan-to-configdirector) or [remove a scanned repository](#scanned-repositories), add `Code references: Update` (`code-references:update`).
3. Set an expiration on a token you keep on your workstation, and do not commit a token into source control.

A user API token belongs to you: only you see it, and the changes you make with it carry your name. An organization API token belongs to the organization, so CI keeps running when the member who generated the token changes role or leaves. Give CI a token used only by CI rather than reusing the one on your workstation, so you can replace or revoke it without affecting anything else. If CI already uses a user API token, the member who generated it can convert it into an organization API token on the token's page, and CI keeps the same secret. [Authentication](https://docs.configdirector.com/integrations/admin-api#authentication) compares the two kinds.

## Configure

### Sign in on your machine

```bash
configdirector login
```

`login` asks you to paste the token and hides it while you do. It asks ConfigDirector which organization the token belongs to and what it can do, refuses a token without `Projects: Read`, and saves it as your sign-in for that organization, with the organization's name, where only your user can read it:

<table>
<thead>
  <tr>
    <th>
      System
    </th>
    
    <th>
      Saved in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      macOS
    </td>
    
    <td>
      <code>
        ~/Library/Application Support/configdirector/sign-ins.json
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Linux
    </td>
    
    <td>
      <code>
        ~/.config/configdirector/sign-ins.json
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Windows
    </td>
    
    <td>
      <code>
        %APPDATA%\configdirector\sign-ins.json
      </code>
    </td>
  </tr>
</tbody>
</table>

When `XDG_CONFIG_HOME` is set, the sign-ins are saved in `$XDG_CONFIG_HOME/configdirector/sign-ins.json` instead. `configdirector login --token <token>` saves a sign-in without asking.

`login` says which [kind](https://docs.configdirector.com/integrations/admin-api#authentication) of token it signed in with, as in `Signed in to Acme with a user API token.` or `Signed in to Acme with an organization API token.` When the token is limited to selected projects, it adds `The token reaches only its selected projects, which configdirector projects list shows.`

You keep one sign-in per organization. Running `login` again with a token of an organization you are signed in to replaces that sign-in, and with a token of another organization adds one, so you can work for two organizations from one machine, as [More than one organization](#more-than-one-organization) describes. `configdirector logout` removes the sign-in the commands in the current directory would use; the token itself keeps working until you revoke it on the **API tokens** page.

Versions before `0.10.0-beta.1` saved one token in `config.json` in the same directory. The first command you run after upgrading moves that token into a sign-in, with one request to learn its organization, and deletes `config.json`. A token ConfigDirector no longer accepts is deleted without becoming a sign-in, and the command says so; when the Admin API cannot be reached, `config.json` stays for the next run.

In CI, skip `login` and set `CONFIGDIRECTOR_TOKEN` to an organization API token. The CLI uses `--token` first, then `CONFIGDIRECTOR_TOKEN`, then the sign-in for the organization the repository names, then your only sign-in. `configdirector api-token get` shows which token a command in the current directory would use, with its organization, name, kind, permissions, project access and expiration, as [Browse the project](#browse-the-project) describes.

### Link the repository to a project

From the repository root, with your project's slug, shown as **Project slug** on the project's **Project details** page:

```bash
configdirector init --project web-app
```

`init` looks for the project through each of your sign-ins, or through the token you give it, and writes `configdirector.json` in the current directory with the project's slug and the id of its organization. It never overwrites an existing file, except to add `organization` to a file from an earlier version that has none, keeping its other fields. Commit the file, so every run and every CI job uses the same project, and run the CLI from the directory that holds it.

```json [configdirector.json]
{
  "project": "web-app",
  "organization": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "include": ["src/**"],
  "exclude": ["src/generated/**"],
  "ignoreKeys": ["billing-flag-from-other-project"]
}
```

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        project
      </code>
    </td>
    
    <td>
      The project's slug. <code>
        --project
      </code>
      
       and <code>
        CONFIGDIRECTOR_PROJECT
      </code>
      
       take precedence over it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        organization
      </code>
    </td>
    
    <td>
      The id of the project's organization. A command in the directory uses your sign-in for it, and refuses a token of another organization, such as a <code>
        CONFIGDIRECTOR_TOKEN
      </code>
      
       set for an MCP server, when that organization has a project with the same slug. <code>
        --organization
      </code>
      
       and <code>
        CONFIGDIRECTOR_ORGANIZATION
      </code>
      
       take precedence over it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        include
      </code>
    </td>
    
    <td>
      Globs of the files to scan, relative to <code>
        configdirector.json
      </code>
      
      . <code>
        init
      </code>
      
       writes <code>
        ["**"]
      </code>
      
      , every file.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        exclude
      </code>
    </td>
    
    <td>
      Globs of the files to skip, on top of the files <a href="#what-the-scan-reads">
        the scan always skips
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ignoreKeys
      </code>
    </td>
    
    <td>
      Keys that <code>
        validate
      </code>
      
       never reports, such as the key of a config another project serves.
    </td>
  </tr>
</tbody>
</table>

### More than one organization

A project's slug is unique within its organization, so two organizations can each have a `web-app`. With one sign-in per organization and the organization's id in each repository's `configdirector.json`, every command uses the right token without a variable per directory. Sign in once per organization, with a token of each:

```bash
configdirector login   # paste a token of Acme
configdirector login   # paste a token of Globex
```

Then run `init` in each repository. It looks for the project through both sign-ins and writes the organization that has it:

```bash
cd ~/code/acme-storefront
configdirector init --project web-app
# Linked this directory to the project Web App (web-app) of the organization Acme in .../configdirector.json

cd ~/code/globex-portal
configdirector init --project web-app
# Linked this directory to the project Web App (web-app) of the organization Globex in .../configdirector.json
```

From then on, a command in either repository uses that organization's sign-in. When both organizations have a project with the slug, `init` stops and asks you to name one with `--organization`, by the organization's name as `login` saved it, whatever its case, or by its id. `--organization` and `CONFIGDIRECTOR_ORGANIZATION` also pick the sign-in for a command run outside a linked repository, such as `projects list`; a command run with two sign-ins and no organization named stops and lists them.

A token you pass with `--token` or `CONFIGDIRECTOR_TOKEN` is always used as it is, so a `CONFIGDIRECTOR_TOKEN` set for every terminal, for example for an [MCP server](https://docs.configdirector.com/integrations/mcp#more-than-one-organization), takes precedence over your sign-ins. In a repository that names another organization, the command then stops before changing anything and names the variable, as long as that organization has a project with the same slug. Give the MCP server a variable named for its organization instead, and leave `CONFIGDIRECTOR_TOKEN` unset.

### Options and environment variables

Every command takes these options, as well as `--help` and `--version`:

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Environment variable
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --token <token>
      </code>
    </td>
    
    <td>
      <code>
        CONFIGDIRECTOR_TOKEN
      </code>
    </td>
    
    <td>
      The API token. Without either, the sign-in saved by <code>
        login
      </code>
      
       for the organization named below, or your only sign-in.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --organization <name or id>
      </code>
    </td>
    
    <td>
      <code>
        CONFIGDIRECTOR_ORGANIZATION
      </code>
    </td>
    
    <td>
      The organization whose sign-in to use, by the name <code>
        login
      </code>
      
       saved or by its id. Without either, the <code>
        organization
      </code>
      
       in <code>
        configdirector.json
      </code>
      
      . Giving one together with <code>
        --token
      </code>
      
       or <code>
        CONFIGDIRECTOR_TOKEN
      </code>
      
       is a mistake, and the command exits with 2.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --project <slug>
      </code>
    </td>
    
    <td>
      <code>
        CONFIGDIRECTOR_PROJECT
      </code>
    </td>
    
    <td>
      The project's slug. Without either, every command that reads a project uses the <code>
        project
      </code>
      
       in <code>
        configdirector.json
      </code>
      
      . <code>
        projects list
      </code>
      
       and <code>
        targeting-rules reference
      </code>
      
       ignore all three.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --base-url <url>
      </code>
    </td>
    
    <td>
      <code>
        CONFIGDIRECTOR_BASE_URL
      </code>
    </td>
    
    <td>
      The Admin API host. Defaults to <code>
        https://api.configdirector.com
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      Print JSON instead of text. See <a href="#output">
        Output
      </a>
      
      .
    </td>
  </tr>
</tbody>
</table>

An option takes precedence over its environment variable. An empty variable counts as unset, so a CI job whose token secret is missing stops with `No API token found` rather than sending an empty token.

## Scan

```bash
configdirector scan
```

`scan` lists every place your code reads a config key, grouped by key, with the file, the line, the SDK call and the SDK:

```txt
max-cart-items
  src/admin/feature-list.ts:1 (indirect)
  src/checkout.ts:6 getValue (js-server)

new-checkout
  src/admin/feature-list.ts:1 (indirect)
  src/checkout.ts:5 getValue(NEW_CHECKOUT) (js-server)
  test/checkout.test.ts:3 createTestClient (js-server, test)

Dynamic references (calls whose key is not a string literal)
  src/settings.ts:3 getValue(setting.key) (js-server)

3 direct, 2 indirect and 1 dynamic references in 5 scanned files.
```

Each place is one of three kinds of code reference:

- **Direct**: an SDK call whose key is known, either a string such as `getValue("max-cart-items", 20)` or a constant that holds one, shown after the call as `getValue(NEW_CHECKOUT)`. These are the references `validate` checks.
- **Indirect**: one of the project's keys written as a quoted string anywhere else, such as a list of keys, the argument of your own wrapper function, or a test fixture. The key is used there, but not through a call `validate` can check, so look at these before you rename or archive the config.
- **Dynamic**: an SDK call whose key cannot be known from the code, such as a variable, a key built at runtime, or a constant assigned a different string in two places. These are listed so you know they exist. They are never checked, so they never fail the build; to have one checked, pass the key as a string or a constant.

A reference is marked `test` when it is a call to an SDK test client, such as `createTestClient` or `setValue`, or an indirect reference in a test directory or a test file such as `checkout.test.ts`.

The scan exits with 0 whenever it ran, whether it found references or not. `configdirector scan src` scans only `src`.

### What the scan reads

A call is found when its file imports a ConfigDirector SDK or the OpenFeature SDK. In JavaScript, TypeScript, Python, Dart, Go and Ruby, it is also found when the file imports one of your own files that does, such as the setup module the SDK pages create, which a Ruby file names with `require_relative`. In Kotlin, Java, C# and Ruby, it is also found when the file uses a class of your own that holds the client, such as `object Flags`, in a file named after the class (`Flags.kt`, `Flags.java`, `Flags.cs`, or `feature_flags.rb` for a Ruby `FeatureFlags` module) that imports the SDK. That is how a Rails controller, which requires nothing, is found. In PHP, the file imports the SDK with a `use` statement that names one of its classes, such as `use ConfigDirector\ConfigDirectorClient;` in a controller that receives the client. In Ruby, the file imports the SDK with `require "configdirector"` or by naming it, as in `ConfigDirector::Context.new`, and OpenFeature with `require "open_feature/sdk"` or by naming `OpenFeature::SDK`. In Swift and Go, it is enough for another file of the same target or package to import the SDK, and Nuxt's auto-imported composables need no import. A `getValue` from another library in a file that imports none of these is not reported.

The scan skips the files `.gitignore` ignores, the `node_modules`, `vendor`, `build`, `dist` and `target` directories, binary files, and files over 1 MB. `include` and `exclude` in `configdirector.json` narrow it further.

If a call you expected is missing, the file most likely reaches the SDK client in one of these ways:

- Through two of your own files, such as a module that imports the setup module and passes the client on. Import the setup module directly, or have the module in between re-export the client with `export { client } from "./setup"`.
- Through a path alias that only your bundler knows, such as `resolve.alias` in `vite.config.ts`. Add the alias to `compilerOptions.paths` in `tsconfig.json`.
- Through a CommonJS re-export, such as `module.exports = require("./setup")`.
- In Kotlin, Java or C#, through a class of your own declared in a file with another name, such as an `object Flags` inside `ConfigDirectorSetup.kt`, or through a class that gets the client from another class of yours. Move the class that holds the client into a file named after it, or declare the client with its SDK type, such as a `ConfigDirectorClient` parameter or property, so the file names the SDK.
- In Kotlin, through a client declared at the top level of a file, outside any object or class. Declare it in an object, such as `object Flags`.
- In Kotlin or Java, through a class of another source directory or module, such as a test in `src/test/java` using a class of `src/main/java`. Declare the client with its SDK type in the file that calls it.
- In Kotlin or Java, through an import in a file whose directory does not match its `package`, such as `package com.example.web` in `src/main/kotlin/web/`. Classes in the file's own directory are still found.
- In C#, in a file with no `.csproj` in its directory or above it, up to the directory the scan runs in.
- In PHP, through a file you include with `require`, or through a class of your own that holds the client. Declare the client with its SDK type, such as a `ConfigDirectorClient` parameter or property, so the file names the SDK in a `use` statement.
- In Ruby, through Rails configuration or a global variable, such as `Rails.configuration.configdirector.get_value("new-checkout", false)`. Read the client through a class or module of your own in a file named after it, such as `FeatureFlags.client` with `FeatureFlags` in `feature_flags.rb`.
- In Ruby, through a class of your own, in a file with no `Gemfile` in its directory or above it, up to the directory the scan runs in.
- In PHP or Ruby, on the last line of a string written over several lines, after its closing quote, as in a multi-line SQL query that ends with `FROM orders", [$client->getValue('new-checkout', false)]);`. Move the call to a line of its own.

### Snippets

With `--json` or `--upload`, each direct and indirect reference comes with a snippet: its line and the 2 lines before and after it, so ConfigDirector can show the code around the reference without opening the repository. The text output shows no snippets, and dynamic references have none.

```bash
configdirector scan --json --context-lines 4
```

`--context-lines <number>` sets how many lines before and after the reference to include, from 0 to 5, and `--context-lines 0` includes the reference line alone. A snippet stops at the start and end of the file, and a line longer than 250 characters is cut to its first 250. `--no-snippets` leaves every snippet out. Giving both, or a `--context-lines` that is not a whole number from 0 to 5, exits with 2.

### Upload the scan to ConfigDirector

```bash
configdirector scan --upload
```

`--upload` sends the scan to your project, so the dashboard can show where each config is read and which configs no repository reads. ConfigDirector keeps the latest scan of each repository: every upload replaces all the references the project held for that repository, so a reference you remove from the code is gone after the next upload.

Upload from your default branch, after each push to it. `scan --upload` does not check which branch is checked out, so an upload from a feature branch replaces the default branch's references with that branch's. Keep `validate` for pull requests. On GitHub, the [ConfigDirector Code Scan action](#github-actions) does both: it runs `validate` on pull requests and uploads only on pushes to the default branch.

On GitLab, add a job that runs only on the default branch:

```yaml [.gitlab-ci.yml]
configdirector-upload:
  image: node:24
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  script:
    - npx --yes @configdirector/cli scan --upload
```

The repository is named after the path of its `origin` remote, without the host and `.git`: `https://github.com/acme/shop.git`, `git@github.com:acme/shop.git` and `ssh://git@github.com/acme/shop.git` all upload to `acme/shop`, and a GitLab project in a subgroup keeps its whole path, such as `group/subgroup/app`. The upload also sends the remote's URL and the SHA of the commit that is checked out, which the CLI reads by running `git`. A user name and password in an `https` remote, such as the job token GitLab CI puts there, are removed before the URL is sent.

`--repository <name>` names the repository yourself, for a clone whose `origin` points somewhere else or a directory that is not a git repository. Without it, `scan --upload` exits with 2 when `git` is not installed, when the directory is not in a git repository, or when that repository has no `origin` remote. With it, each of those cases uploads with no remote URL and no commit. A repository with no commit yet uploads with no commit.

The scan's output ends with what was uploaded:

```txt
new-checkout
  src/checkout.ts:5 getValue(NEW_CHECKOUT) (js-server)

1 direct, 0 indirect and 0 dynamic references in 3 scanned files.

Uploaded the scan of acme/shop at 4d40f50 to web-app: 1 reference and 0 dynamic references, with 0 left out for a key that cannot be a config key.
```

The upload holds the direct, indirect and dynamic references that `scan --json` prints; `ignoreKeys` changes nothing in it. A reference to a key that cannot be a config key, such as one shorter than 4 characters, is left out and counted on that last line. When the scan finds no source file, `scan --upload` exits with 2 and uploads nothing, so a wrong path or `include` never empties the repository's references. A scan that reads files and finds no reference is uploaded, and the repository then has no references. With `--json`, `scan --upload` prints the Admin API's response as received, the [scanned repository](https://docs.configdirector.com/integrations/admin-api#scanned-repositories) with its reference counts, in place of the scan.

A project holds at most 50 scanned repositories, and one upload holds at most 10,000 references, dynamic references included. Uploading another repository to a project that holds 50, or a larger scan, exits with 2.

`scan --upload` needs `Projects: Read`, `Configs: Read` and `Code references: Update` (`code-references:update`), and makes three Admin API requests. Uploads do not appear in the audit log.

#### What leaves your repository

An upload sends ConfigDirector:

- the path of each file with a reference, from the directory the scan ran in, and the line of each reference;
- the config keys the code reads;
- for each SDK call, the SDK, the call's name, the key argument as written when it is not a plain string, and the in-code default value when it is a literal;
- whether each reference is in a test;
- the [snippet](#snippets) of each direct and indirect reference: at most 11 lines of code, the reference line and up to 5 lines on each side, each cut to 250 characters;
- how many files the scan read;
- the URL of the `origin` remote, without the user name and password of an `https` remote;
- the SHA of the commit that is checked out, without its changes, author or message.

Nothing else from the repository is sent.

To send no code, add `--no-snippets`: the upload then sends everything above but the snippets. To keep a project from storing any code, an owner or an admin can turn off **Store code snippets** in the **Code snippets** card of the project's **Project details** page. The project then removes the snippets it holds, and `scan --upload` sends none and says so after what it uploaded:

```txt
Uploaded the scan of acme/shop at 4d40f50 to web-app: 1 reference and 0 dynamic references, with 0 left out for a key that cannot be a config key.
Code snippets were not sent: this project does not store them.
```

If the setting is turned off while `scan --upload` runs, the upload still succeeds, and the project stores it without its snippets.

## Scanned repositories

ConfigDirector keeps the latest upload of every repository that ran [`scan --upload`](#upload-the-scan-to-configdirector), and nothing removes one on its own. A repository that is renamed or retired keeps its last upload, keeps counting toward the 50 a project can hold, and its references still count when the dashboard shows where each config is read and which configs no repository reads. These commands list a project's scanned repositories and remove one.

```bash
configdirector repositories list
```

`repositories list` prints a header row, then one line per repository, with the commit of its latest upload, when it was scanned in UTC, and how many references and dynamic references it holds, and ends with how many scanned repositories the project has out of the 50 it can hold:

```txt
REPOSITORY           COMMIT    SCANNED                REFERENCES      DYNAMIC REFERENCES
ConfigDirector/cli   4d40f50   2026-10-17 10:00 UTC   12 references   1 dynamic reference
acme/storefront      9f3e2a1   2026-10-16 09:12 UTC   1 reference     0 dynamic references

web-app has 2 of the 50 scanned repositories a project can hold.
```

A repository uploaded without a commit shows `no commit`, and `--no-headers` leaves out the header row. With `--json`, it prints the Admin API's response as received: the [scanned repositories](https://docs.configdirector.com/integrations/admin-api#scanned-repositories), which also give each one's remote URL and how many files its scan read.

```bash
configdirector repositories remove acme/storefront
```

`repositories remove` removes the repository and all its references from the project, with no confirmation:

```txt
Removed acme/storefront and its code references from web-app.
```

A removed repository that uploads again is added back, so remove the upload step from its CI first. To rename a repository, remove the old name and upload under the new one.

`repositories remove` exits with 0 when it removed the repository, and with 2 when no scanned repository in the project has the name, listing the names the project has. With `--json`, it prints `{ "removedRepository": "acme/storefront" }`, with the name as you gave it, since the Admin API answers with no body.

`repositories list` needs `Projects: Read` and `Code references: Read` (`code-references:read`). `repositories remove` needs `Projects: Read` and `Code references: Update` (`code-references:update`), and `Code references: Read` to list the names when none matches. Each makes two Admin API requests, and `repositories remove` one more when no repository has the name. Removals do not appear in the audit log.

## Validate

```bash
configdirector validate
```

`validate` runs the same scan, then checks every direct reference against the project's configs. It lists the problems it found by kind, and exits with 1 when there is at least one:

```txt
Unknown keys
  src/checkout.ts:9 free-shiping: no config in web-app has this key.

Deprecated keys
  src/checkout.ts:6 checkout-v2: the config was renamed to new-checkout.

Type mismatches
  src/checkout.ts:8 checkout-timeout: read as string, but the config's type is timespan, served as a float.

Availability mismatches
  src/theme.tsx:4 fraud-threshold: read from a client SDK (react), but the config is server-only.

Enum values not allowed
  src/theme.tsx:3 theme: "system" is not one of the allowed values: light, dark.

Checked 7 direct references in 4 scanned files and found 5 problems. 1 dynamic reference was not checked.
```

<table>
<thead>
  <tr>
    <th>
      Problem
    </th>
    
    <th>
      What it means for your app
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Unknown keys
      </strong>
    </td>
    
    <td>
      No config in the project has this key, as its current key or an old one, so the SDK returns the in-code default value every time. The key of an archived config is unknown too.
    </td>
    
    <td>
      Correct the key, or create the config. If another project serves the key, add it to <code>
        ignoreKeys
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Deprecated keys
      </strong>
    </td>
    
    <td>
      The config was renamed, and the code still reads an old key. The old key works until ConfigDirector removes it once it is no longer used, as <a href="https://docs.configdirector.com/getting-started/configs#key">
        Key
      </a>
      
       explains.
    </td>
    
    <td>
      Replace it with the current key, which the output names.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Type mismatches
      </strong>
    </td>
    
    <td>
      The in-code default value, or a getter whose name sets the type such as <code>
        getBoolean
      </code>
      
      , reads the config as a type the SDKs do not serve it as, so the SDK can return the in-code default value instead of the config's value.
    </td>
    
    <td>
      Read the config as the type the output names.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Availability mismatches
      </strong>
    </td>
    
    <td>
      A client SDK reads a server-only config, or a server SDK reads a client-only one. That SDK never receives the config, so it returns the in-code default value every time.
    </td>
    
    <td>
      Change the config's <a href="https://docs.configdirector.com/getting-started/configs#sdk-availability">
        SDK availability
      </a>
      
      , or read the config where it is served.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Enum values not allowed
      </strong>
    </td>
    
    <td>
      The in-code default value is not one of the enum's allowed values.
    </td>
    
    <td>
      Use an allowed value as the in-code default value, or add the value to the enum.
    </td>
  </tr>
</tbody>
</table>

The SDKs serve a timespan as a number in its unit and a URL as a string. So an in-code default value, or a getter whose name sets the type, reads a config of these types: a boolean reads a boolean config; an integer reads an integer, float or timespan config; a decimal number reads a float or timespan config; a string reads a string, enum or URL config; and an object or array reads a JSON config. Read a timespan with a number, not a string such as `"30s"`. An enum whose values are numbers can also be read with a number.

A test client call is checked for unknown and deprecated keys only, since ConfigDirector never serves a test client. Indirect and dynamic references are never checked, and a config's lifecycle state is never a problem.

### Exit codes

<table>
<thead>
  <tr>
    <th>
      Code
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      The command succeeded. For <code>
        validate
      </code>
      
      , it found no problem.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        1
      </code>
    </td>
    
    <td>
      <code>
        validate
      </code>
      
       found at least one problem, or <code>
        configs create
      </code>
      
       found a config that already has the key.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        2
      </code>
    </td>
    
    <td>
      The command could not run: a mistake in the command, no token or a rejected one, a token of another organization than the repository's, a missing permission, a suspended service, an unreachable API, or something the command names that does not exist, such as a config key, an environment, a saved context, a segment key, a tag or a scanned repository. <code>
        segments delete
      </code>
      
       also exits with 2 when the targeting rules of a config use the segment. <code>
        metrics get
      </code>
      
      , <code>
        metrics update
      </code>
      
       and <code>
        metrics delete
      </code>
      
       also exit with 2 when several metrics have the event name they are given. The message says which.
    </td>
  </tr>
</tbody>
</table>

A CI job can therefore tell a wrong config key from an outage.

### Run it in CI

Generate an organization API token for CI, so the job keeps running when the member who generated it changes role or leaves, and limit it to the project the repository is linked to: on the **API tokens** page, choose **Organization API token**, then **Selected projects** under **Project access**, and pick that project. Add the token as a secret named `CONFIGDIRECTOR_TOKEN`. On GitHub, the ConfigDirector Code Scan action runs `validate` and uploads the scan. On GitLab and other CI systems, run the CLI with `npx`.

#### GitHub Actions

Add the secret under the repository's **Settings → Secrets and variables → Actions**, and add this workflow, or its last step to an existing job that checks out the code:

```yaml [.github/workflows/configdirector.yml]
name: ConfigDirector

on:
  pull_request:
  push:
    branches: [main]

jobs:
  configdirector:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: ConfigDirector/scan-code@v1
        with:
          token: ${{ secrets.CONFIGDIRECTOR_TOKEN }}
```

On a pull request, the action runs `validate`. On a push to the repository's default branch, it runs `validate` and then [`scan --upload`](#upload-the-scan-to-configdirector), so the dashboard shows where each config is read. It uploads even when `validate` found a problem, so the dashboard shows the code as it is, and the job still fails.

`validate` needs `Projects: Read` and `Configs: Read`, and the upload also needs `Code references: Update`. With `upload: false`, the action never uploads, and a token with only the two read permissions is enough.

<table>
<thead>
  <tr>
    <th>
      Input
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        token
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      Required. The API token, from a secret.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        version
      </code>
    </td>
    
    <td>
      <code>
        latest
      </code>
    </td>
    
    <td>
      The version of <code>
        @configdirector/cli
      </code>
      
       to run, or an npm dist-tag. A version number from the <a href="https://github.com/ConfigDirector/cli/blob/main/CHANGELOG.md" rel="noopener" target="_blank">
        changelog
      </a>
      
      , <code>
        0.9.0-beta.1
      </code>
      
       or later, upgrades on your own schedule.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        working-directory
      </code>
    </td>
    
    <td>
      <code>
        .
      </code>
    </td>
    
    <td>
      The directory that holds <code>
        configdirector.json
      </code>
      
      . The scan reads the files under it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        upload
      </code>
    </td>
    
    <td>
      <code>
        auto
      </code>
    </td>
    
    <td>
      When the scan is uploaded: <code>
        auto
      </code>
      
       on pushes to the default branch only, <code>
        true
      </code>
      
       on every run, <code>
        false
      </code>
      
       never.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        context-lines
      </code>
    </td>
    
    <td>
      <code>
        2
      </code>
    </td>
    
    <td>
      How many lines before and after each reference its <a href="#snippets">
        snippet
      </a>
      
       holds, from 0 to 5.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        snippets
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
      
       uploads no code, as <code>
        --no-snippets
      </code>
      
       does.
    </td>
  </tr>
</tbody>
</table>

The action sets up Node.js 24, and the steps after it in the same job run with that Node.js too, so in a job that sets up another version, put the action after the steps that need it. The [action's README](https://github.com/ConfigDirector/scan-code) also covers pull requests from forks, which GitHub runs without your secrets.

#### GitLab

Add the token as a masked variable under the project's **Settings → CI/CD → Variables**, which GitLab passes to every job as an environment variable, and add this job to `.gitlab-ci.yml`. A variable marked **Protect variable** reaches only pipelines of protected branches and tags, so leave it unmarked for the check to run on merge requests.

```yaml [.gitlab-ci.yml]
configdirector-validate:
  image: node:24
  script:
    - npx --yes @configdirector/cli validate
```

To upload the scan from GitLab too, add the job in [Upload the scan to ConfigDirector](#upload-the-scan-to-configdirector).

#### Other CI systems

Run `npx --yes @configdirector/cli validate` with Node.js 20 or later and `CONFIGDIRECTOR_TOKEN` set, for every change, and `npx --yes @configdirector/cli scan --upload` after each push to the default branch.

Each `scan` or `validate` run makes two Admin API requests, `scan --upload` makes three, `login` makes one, and `init` makes one per sign-in it searches; the first command run after upgrading to `0.10.0-beta.1` makes one more, to move the token an earlier version saved. A project slug that matches no project the token can reach costs one more request, to learn whether the token is limited to selected projects, and with `init` up to one more per sign-in it searched. The GitHub action makes two on a pull request and five on a push to the default branch. They count toward your organization's monthly [free allowance](https://docs.configdirector.com/getting-started/pricing-and-billing#the-free-allowance) like any other Admin API request.

## Evaluate

```bash
configdirector evaluate new-checkout --environment production --context-id 123 --context-trait plan=pro
```

`evaluate` shows the value a context gets for a config in one environment, and why. It evaluates the environment's saved targeting rules with the same evaluator the SDKs use, so the value is the one your application would get:

```txt
new-checkout in Production for user 123

true, served by rule 2

1. 50% get true                     not matched: bucket 71.3 is outside 0 to 50
2. plan is one of pro, team: true   matched
3. in segment Beta testers: true    not evaluated
Default targeting rule: false
```

The first line names the config, the environment and the context. The next gives the value and the rule that served it, or the default targeting rule when no rule matched. Then comes each targeting rule in order, with what it tests, the value it serves, and its outcome:

<table>
<thead>
  <tr>
    <th>
      Outcome
    </th>
    
    <th>
      What it means
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        matched
      </code>
    </td>
    
    <td>
      The context meets every condition of the rule, and for a percentage rollout, its bucket falls in a share. The value comes from this rule.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        not matched
      </code>
    </td>
    
    <td>
      The rule does not apply to the context. The output names the first condition that failed and the context's value for it, such as <code>
        plan is one of pro, team, but it is "free"
      </code>
      
      , or the bucket the context fell in outside the rule's shares.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        rollout skipped
      </code>
    </td>
    
    <td>
      The context reached a percentage rollout, either a percentage rule or the rollout a conditional rule serves once its conditions are met, and it has no identifier, so it has no bucket. The line reads <code>
        rollout skipped: the context has no identifier
      </code>
      
      , and the rules after it are tried; the context gets the default targeting rule value when none of them applies.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        not evaluated
      </code>
    </td>
    
    <td>
      An earlier rule served the value, so this rule was not checked.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        errored
      </code>
    </td>
    
    <td>
      The rule could not be evaluated, so it was skipped, as an SDK skips it.
    </td>
  </tr>
</tbody>
</table>

A percentage rollout gives each context a bucket from 0 to 100, worked out from the config, the context kind and the identifier, so a context keeps its bucket from one evaluation to the next. A context without an identifier gets no bucket: a percentage rollout it reaches is skipped and shows as `rollout skipped: the context has no identifier`, the rules after it are tried and show their own outcomes, and the context gets the default targeting rule value when none of them applies. Versions before 0.20.0 show the skipped rollout as `not matched`.

### The context

Give the context one of three ways:

- **Options**: `--context-kind` (`user` when left out), `--context-id`, `--context-name`, and `--context-trait name=value` for each trait. A trait's value is a string; write `name:=` followed by JSON for a number, a boolean, an array or an object, as in `--context-trait beta:=true` or `--context-trait age:=30`. `--context-trait` sets a top-level trait; for a nested one, use `--context-json`.
- **JSON**: `--context-json '{"identifier": "123", "traits": {"address": {"country": "NZ"}}}'`, or `--context-json @context.json` to read the JSON from a file. The object has the fields `kind`, `identifier`, `name` and `traits`, with `kind` defaulting to `user`.
- **A saved context**: `--saved-context user:123` evaluates a context ConfigDirector has stored from SDK evaluations in that environment, named by its context kind and identifier, with its stored name and traits. It needs the `Contexts: Read` permission.

Using two of these at once is a mistake in the command, and `evaluate` exits with 2. With none of them, the config is evaluated for an empty context, as an SDK given no context would, and the first line says `for an empty context`.

### Environment, project and exit codes

`--environment` takes the environment's slug, shown as **Environment slug** on the project's **Environments** tab, and is required: there is no default environment. The project comes from `--project`, `CONFIGDIRECTOR_PROJECT` or `configdirector.json`, as for `scan`. A renamed config can be evaluated by an old key, and the output then starts with a line naming its current key.

`evaluate` exits with 0 whenever it evaluated the config, whichever value it got and whichever rule served it. It exits with 2 when it could not, for instance when no config in the project has the key, when no environment has the slug, in which case the message lists the project's environments, or when no saved context in the environment has that context kind and identifier.

`evaluate` needs a token with `Projects: Read`, `Configs: Read` and `Environments: Read`, and `Contexts: Read` as well for `--saved-context`. Nothing is recorded: an evaluation from the CLI is not SDK activity, so it does not keep a config in use or count toward your SDK usage. Each run makes three Admin API requests. With `--json`, `evaluate` prints the Admin API's response as it was received, which [Evaluating a config](https://docs.configdirector.com/integrations/admin-api#evaluating-a-config) describes.

## Browse the project

These commands read what a project holds, so you, or a coding agent working in your terminal, can look a config up without opening the dashboard:

<table>
<thead>
  <tr>
    <th>
      Command
    </th>
    
    <th>
      What it shows
    </th>
    
    <th>
      Permission
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        configdirector projects list
      </code>
    </td>
    
    <td>
      The projects your token can reach, with their slugs and names
    </td>
    
    <td>
      <code>
        Projects: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector environments list
      </code>
    </td>
    
    <td>
      The project's environments, with their slugs and names, marking the live ones
    </td>
    
    <td>
      <code>
        Environments: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector configs list
      </code>
    </td>
    
    <td>
      The project's configs, with their type, role, lifetime and lifecycle state
    </td>
    
    <td>
      <code>
        Configs: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector configs get <key>
      </code>
    </td>
    
    <td>
      A config's settings, then its targeting rules in every environment
    </td>
    
    <td>
      <code>
        Configs: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector configs activity <key>
      </code>
    </td>
    
    <td>
      When SDKs last evaluated the config, per environment, SDK key kind, SDK name and SDK version
    </td>
    
    <td>
      <code>
        Configs: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector segments list
      </code>
    </td>
    
    <td>
      The project's segments, with how many configs use each
    </td>
    
    <td>
      <code>
        Segments: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector segments get <key>
      </code>
    </td>
    
    <td>
      A segment's condition groups and its environment overrides
    </td>
    
    <td>
      <code>
        Segments: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector metrics list
      </code>
    </td>
    
    <td>
      The project's metrics, with their kinds, their direction, how many experiments use each, and their IDs
    </td>
    
    <td>
      <code>
        Metrics: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector metrics get <event name>
      </code>
    </td>
    
    <td>
      A metric's kinds and direction, and each experiment that uses it, with its role and the environments of its runs in progress
    </td>
    
    <td>
      <code>
        Metrics: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector metrics get --id <metric id>
      </code>
    </td>
    
    <td>
      The same for a ratio, a funnel or a retention metric, or for one of several metrics with the same event name
    </td>
    
    <td>
      <code>
        Metrics: Read
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configdirector api-token get
      </code>
    </td>
    
    <td>
      The token a command here would use: its organization, name, kind, permissions, project access and expiration, and whether it came from <code>
        --token
      </code>
      
      , <code>
        CONFIGDIRECTOR_TOKEN
      </code>
      
       or a sign-in. Never the token itself
    </td>
    
    <td>
      Any valid token
    </td>
  </tr>
</tbody>
</table>

`projects list` lists every project the token can reach, whatever `--project`, `CONFIGDIRECTOR_PROJECT` or `configdirector.json` names, and `api-token get` reads no project. The other commands take the project from `--project`, `CONFIGDIRECTOR_PROJECT` or `configdirector.json`, as `scan` does, and also need `Projects: Read` to find it.

`configs get` shows the config's settings, then each environment's targeting rules in order, written as `evaluate` writes them, with the default targeting rule value last:

```txt
new-checkout
  Description: Shows the new checkout flow
  Type: boolean
  Role: flag
  Lifetime: temporary
  Availability: client and server SDKs
  Lifecycle state: in-use
  Tags: checkout

test
  Default targeting rule: false

production (live)
  1. plan is one of pro, team: true
  2. 30% get true, 70% get false
  3. in segment Beta testers: true
  Default targeting rule: false
```

On an experiment, each value comes after the name of its variation, as in `40% get control (Start free trial), 60% get treatment-a (Try it free for 14 days)`. `evaluate` names the variation it served the same way, as in `treatment-a (Try it free for 14 days), served by rule 2`, and `configs create` names the variation of the default targeting rule value it starts with. Versions before 0.18.0 show the value alone.

A segment condition names the segment when the token has `Segments: Read`, and shows the segment's ID otherwise. In the same way, `segments get` names the environment of each environment override by its slug when the token has `Environments: Read`, and by its ID otherwise. A renamed config can be read by an old key, and the output then starts with a line naming its current key.

`configs list` takes options that narrow the list:

- `--tag <name>` lists the configs that have that tag. Repeat it to list the configs that have any of the tags. It needs `Tags: Read` to look the names up, and a name no tag has stops the command with exit code 2.
- `--untagged` lists the configs that have no tags. It cannot be combined with `--tag`.
- `--state <state>` lists the configs in one lifecycle state: `new`, `in-use`, `settled`, `archive-ready` or `stale`.

`configs activity` prints a header row, then one line per environment, SDK key kind, SDK name and SDK version, with the time of the most recent evaluation in UTC:

```txt
ENVIRONMENT   SDK KEY   SDK               LAST EVALUATED
production    server    js-server 1.4.0   2026-10-17 14:03 UTC
test          client    react 2.1.0       2026-10-16 09:12 UTC
```

`projects list`, `environments list`, `configs list`, `configs activity`, `segments list` and `metrics list` print a header row that names their columns above their lines, such as `KEY   TYPE   ROLE   LIFETIME   STATE` for `configs list`, and `--no-headers` leaves it out. An empty list prints only a sentence, such as `No configs found in web-app.`

`api-token get` prints one line each for the organization, with its name and id, the token's name, its [kind](https://docs.configdirector.com/integrations/admin-api#authentication), `user API token` or `organization API token`, its permissions as the Admin API spells them, its project access, `all projects` or `selected projects` followed by the ids of those projects, or by `none` once every one of them is deleted, when it expires, or `never`, and where the token came from:

```txt
Organization: Acme (9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d)
Name: Laptop
Kind: user API token
Permissions: configs:read, projects:read
Project access: all projects
Expires: 2027-01-31 09:30 UTC
Source: the CLI sign-in for Acme
```

With `--json`, each of these commands prints the Admin API's response as it was received, except `configs list --state`, which prints only the configs in that state, and `metrics get`, which prints the metric as the Admin API listed it for its event name, or returned it for its ID. A key no config or segment has, or an event name or ID no metric has, exits with 2. An event name finds only a metric of one event name: a ratio, a funnel or a retention metric has no event name of its own, so `metrics get --id <metric id>` shows one, with the ID `metrics list` prints. When several metrics have the event name you give `metrics get`, it lists them with their IDs and exits with 2, and `metrics get --id <metric id>` shows one of them, as [Metrics](#metrics) describes. `projects list` and `api-token get` make one Admin API request and the others make two, plus one per `--tag` name, one for `configs get` when a rule uses a segment, one for `segments get` when the segment has an environment override, and one for `metrics get` when an experiment that uses the metric has a run in progress.

## Create a config

```bash
configdirector configs create --key new-checkout --type boolean --role flag --default-value false
```

`configs create` creates a config in the project from options that match the Admin API's fields one to one. It never guesses a type or a role and never asks for a missing option, so you, a script or a coding agent always say exactly what to create:

```txt
Created new-checkout in web-app: boolean, flag, temporary, client and server SDKs.
Default targeting rule in every environment: false
```

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --key <key>
      </code>
    </td>
    
    <td>
      Required. The config's <a href="https://docs.configdirector.com/getting-started/configs#key">
        key
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --type <type>
      </code>
    </td>
    
    <td>
      Required. <code>
        boolean
      </code>
      
      , <code>
        string
      </code>
      
      , <code>
        integer
      </code>
      
      , <code>
        float
      </code>
      
      , <code>
        timespan
      </code>
      
      , <code>
        enum
      </code>
      
      , <code>
        url
      </code>
      
       or <code>
        json
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --role <role>
      </code>
    </td>
    
    <td>
      Required. <code>
        config
      </code>
      
      , <code>
        flag
      </code>
      
      , <code>
        kill-switch
      </code>
      
       or <code>
        experiment
      </code>
      
      . Flags and kill switches are booleans, as <a href="https://docs.configdirector.com/getting-started/configs#roles">
        Roles
      </a>
      
       describes.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --lifetime <lifetime>
      </code>
    </td>
    
    <td>
      Required for the <code>
        config
      </code>
      
       role. <code>
        temporary
      </code>
      
       or <code>
        permanent
      </code>
      
      . The other roles decide their own lifetime, as described below.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --default-value <value>
      </code>
    </td>
    
    <td>
      Required. The default targeting rule value every environment starts with. It is not the in-code default value your application passes to the SDK.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --description <text>
      </code>
    </td>
    
    <td>
      A description shown with the config in the dashboard.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --client-only
      </code>
      
      , <code>
        --server-only
      </code>
    </td>
    
    <td>
      Serve the config to one kind of SDK only. Without either, client and server SDKs both receive it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tag <name>
      </code>
    </td>
    
    <td>
      A tag the project already has, by its name. Repeat it for each tag. A name no tag has stops the command with exit code 2.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --new-tag <name>
      </code>
    </td>
    
    <td>
      A tag to create in the project's tag catalog and assign, by its name. Repeat it for each tag. A name a tag already has stops the command with exit code 2.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --variation <name=value>
      </code>
    </td>
    
    <td>
      A variation of an experiment. Repeat it for each variation.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --hypothesis <text>
      </code>
    </td>
    
    <td>
      What an experiment is expected to do, such as <code>
        Urgency copy raises checkout completion by 5%
      </code>
      
      . Each run keeps the hypothesis it started with. Only an experiment takes one.
    </td>
  </tr>
</tbody>
</table>

The values of `--default-value` and `--variation` are read in the config's type: `true` or `false` for a boolean, a number for an integer, float or timespan, the text as written for a string, enum or URL, and JSON for a JSON config, where `@values.json` reads the JSON from a file. A value that does not fit the type stops the command with exit code 2 before anything is sent.

The role decides the [lifetime](https://docs.configdirector.com/getting-started/configs#lifetime) of a feature flag, a kill switch or an experiment, so you can leave `--lifetime` out for them: a feature flag and an experiment are always temporary, and a kill switch is always permanent. A lifetime the role does not have, such as `--role kill-switch --lifetime temporary`, stops the command with exit code 2 before anything is sent, and so does `--role config` without `--lifetime`. Versions before 0.16.0 need `--lifetime` for every role.

A config can have up to 20 tags, from `--tag` and `--new-tag` together. Every `--tag` name is looked up before any tag is created, so a misspelled `--tag` creates nothing, and `--tag` never creates a tag. A `--new-tag` name given twice, or a name given with both options, stops the command with exit code 2 before anything is sent, and case doesn't matter in tag names. When a step after creating tags fails, for example because the key is taken, the tags stay in the project's tag catalog, and the command names them so you can pass them with `--tag` next time:

```txt
Created the tag "Payments". It stays in web-app's tag catalog, so pass it with --tag next time.
```

Constraints have options of their own, and each one belongs to the types listed with it:

<table>
<thead>
  <tr>
    <th>
      Type
    </th>
    
    <th>
      Options
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        integer
      </code>
      
      , <code>
        float
      </code>
    </td>
    
    <td>
      <code>
        --min
      </code>
      
       and <code>
        --max
      </code>
      
       set bounds a value may equal; <code>
        --exclusive-min
      </code>
      
       and <code>
        --exclusive-max
      </code>
      
       set bounds a value must stay inside.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        timespan
      </code>
    </td>
    
    <td>
      <code>
        --unit
      </code>
      
       (<code>
        milliseconds
      </code>
      
      , <code>
        seconds
      </code>
      
       or <code>
        minutes
      </code>
      
      ), <code>
        --min
      </code>
      
       and <code>
        --max
      </code>
      
      , which a timespan needs, and <code>
        --allow-fractions
      </code>
      
       to accept values such as <code>
        1.5
      </code>
      
      . A value may equal either bound.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        enum
      </code>
    </td>
    
    <td>
      <code>
        --allowed-value
      </code>
      
       for each value the config can take, and <code>
        --enum-value-type number
      </code>
      
       when the values are numbers. They are strings otherwise.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        url
      </code>
    </td>
    
    <td>
      <code>
        --https-only
      </code>
      
       to accept only HTTPS URLs. Without it, any HTTP or HTTPS URL is accepted.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        json
      </code>
    </td>
    
    <td>
      <code>
        --json-schema <file>
      </code>
      
      , a file holding the <a href="https://docs.configdirector.com/getting-started/json-schema-validation">
        JSON Schema
      </a>
      
       every value must match.
    </td>
  </tr>
</tbody>
</table>

An option given with another type, such as `--unit` with `--type integer`, stops the command with exit code 2 and names the types it belongs to. A timespan without `--unit`, `--min` or `--max` stops it with exit code 2 too. `configdirector configs create --help` lists the options grouped by type.

A timespan read only by server SDKs, from 1 to 120 seconds and starting at 30 in every environment:

```bash
configdirector configs create --key checkout-timeout --type timespan --role config --lifetime permanent \
  --unit seconds --min 1 --max 120 --default-value 30 --server-only
```

`configs create` exits with 0 when it created the config. When the project already has a config with that key, as its current key or an old one, it creates nothing, prints that config and exits with 1:

```txt
web-app already has a config with the key new-checkout, so no config was created:
new-checkout   boolean   flag   temporary   in-use
```

It exits with 2 when ConfigDirector refuses the config, with the reasons it gave, such as a type the role does not allow or a default targeting rule value outside the bounds. With `--json`, it prints the created config as the Admin API returned it, or, when the key is taken, the existing config as `configs get --json` prints it.

`configs create` needs `Projects: Read`, `Configs: Create`, and `Configs: Read` to show the config that already has the key. `--tag` also needs `Tags: Read` to look the names up, and `--new-tag` needs `Tags: Create` to create the tags. Each run makes two Admin API requests, plus one per `--tag` name, one per `--new-tag` name, and one more when ConfigDirector refuses the key, to look for the config that has it. The config shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**, as every change made with the CLI does.

## Copy a config

```bash
configdirector configs copy search-ranking --key search-ranking --to mobile-app --environment qa=staging
```

`configs copy` creates a new config from an existing one, under the key `--key` gives, in the same project or, with `--to`, in another project of the organization. It never asks for anything, and prints the plan it followed:

```txt
Copied search-ranking in web-app to search-ranking in mobile-app.
Environments:
  production (live)   from production   2 rules copied   rule 3 dropped: mobile-app has no segment beta-testers
  qa                  from staging      1 rule copied
Skipped source environments:
  test   mobile-app has no environment with this slug; create it there to copy its rules
Tags:
  search   matched
  growth   created
```

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        <key>
      </code>
    </td>
    
    <td>
      Required. The key of the config to copy, in the linked project. An old key of the config works too.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --key <key>
      </code>
    </td>
    
    <td>
      Required. The copy's <a href="https://docs.configdirector.com/getting-started/configs#key">
        key
      </a>
      
      , which no config in the destination project may have.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --to <project slug>
      </code>
    </td>
    
    <td>
      The project to copy the config into, another project of the organization. Without it, the copy is created in the config's own project.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --environment <destination slug>=<source slug>
      </code>
    </td>
    
    <td>
      The environment of the config's project that an environment of the destination project copies its targeting rules from. Repeat it for each one.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --dry-run
      </code>
    </td>
    
    <td>
      Print the plan without creating anything.
    </td>
  </tr>
</tbody>
</table>

The copy gets the config's role, lifetime, type, constraints, variations, SDK availability, description, hypothesis and tags, and every environment's targeting rules and default targeting rule value. It starts as a new config, with no old keys, evaluations or code references, and shares nothing with the config it came from. An archived config cannot be copied; restore it first.

In another project, environments are matched by slug. A destination environment with no environment of the same slug in the config's project needs `--environment` to name the one it copies from, and the command stops with exit code 2, naming each such environment, until every one has a source; `--environment` can also replace a slug match. An environment of the config's project with no environment of its slug in the other project is skipped, and the plan says so. Tags are matched by name: a tag the other project doesn't have is created when the token has `Tags: Create`, and skipped otherwise. Segments are matched by key: a targeting rule that uses a segment the other project doesn't have is dropped, and the plan names it by its position and the segment's key. Create the segment in the other project first to keep the rule. Within one project, everything carries over as it is.

Run it with `--dry-run` first to see the plan without creating anything. The plan then says what would be copied, dropped, skipped and created:

```txt
Nothing was created: this is the plan for copying search-ranking in web-app to search-ranking in mobile-app.
Environments:
  production (live)   from production   2 rules would be copied   rule 3 would be dropped: mobile-app has no segment beta-testers
  qa                  from staging      1 rule would be copied
Source environments that would be skipped:
  test   mobile-app has no environment with this slug; create it there to copy its rules
Tags:
  search   matched
  growth   would be created
```

`configs copy` exits with 0 when it copied the config or printed the plan of a dry run, even when the plan drops a rule. It exits with 2 when ConfigDirector refuses the copy, with the reasons it gave, for example a key already in use or an environment with nothing to copy from, and when no config has the key or no project the token can reach has the `--to` slug. With `--json`, it prints the Admin API's response as it was received: the plan, and, unless `--dry-run` was given, the created config with its targeting rules.

`configs copy` needs `Projects: Read` and `Configs: Create`, and `Tags: Create` to create the tags another project doesn't have. It makes two Admin API requests. The copy shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**, noting the config it was copied from.

## Targeting rules

```bash
configdirector targeting-rules set new-checkout --environment production --rules rules.json
```

`targeting-rules set` replaces a config's targeting rules in one environment with the rules in a JSON file. It shows no diff and asks for no confirmation, and it treats a live environment like any other, so look over the file before you run it.

The file holds the default targeting rule value and the rules, in the format the [Admin API](https://docs.configdirector.com/integrations/admin-api#updating-targeting-rules) takes. This one serves `true` to contexts on the `pro` or `team` plan, and `false` to everyone else:

```json
{
  "defaultValue": false,
  "rules": [
    {
      "type": "conditional",
      "order": 0,
      "conditions": [
        {
          "kind": "attribute",
          "attribute": "traits",
          "trait": "/plan",
          "operator": "is one of",
          "targetType": "text",
          "targetValues": ["pro", "team"]
        }
      ],
      "target": "value",
      "value": true
    }
  ]
}
```

```txt
Replaced the targeting rules of new-checkout in production with 1 rule and the default targeting rule value false.
```

- **Every rule of the environment is replaced.** The file holds all the rules the environment keeps, in the order they are evaluated, and a rule left out of the file is removed. The config's other environments are not touched.
- **IDs.** Every rule, condition and percentage in ConfigDirector has an `id`. Leave it out of a new one, and the CLI gives it a new ID before sending the file. An `id` in the file is sent as written, so the rules you keep keep their IDs.
- **Start from the current rules.** `configs get --json` prints each environment's rules as an entry of `targets`, in the shape the file takes. Save the environment's entry, edit it, and pass it to `--rules`; its other fields, such as `environment`, are ignored:```bash
configdirector configs get new-checkout --json \
  | jq '.targets[] | select(.environment.slug == "production")' > rules.json
# edit rules.json, then:
configdirector targeting-rules set new-checkout --environment production --rules rules.json
```

<br />

`--rules -` reads the file from stdin instead, for a script that builds the rules.
- **ConfigDirector checks the rules.** The CLI only checks that the file holds a JSON object. ConfigDirector checks the rules against the config's type and constraints, as the dashboard does, and when it refuses them the command exits with 2 and lists its reasons.

`configdirector targeting-rules reference` prints the format the rules take: notes on how they are evaluated, then the condition kinds, the attributes a condition can test, and the operators of context kind conditions, segment conditions and each target type. With `--json`, it prints the whole [reference document](https://docs.configdirector.com/integrations/admin-api#targeting-rules-reference) as received, including the JSON Schema of the request `targeting-rules set` sends, which is the file with `environmentId` added. The notes are the ones the [MCP server](https://docs.configdirector.com/integrations/mcp) gives, so they name its tools: `update_targeting_rules` does what `targeting-rules set` does, and `get_config` what `configs get` does.

`targeting-rules set` exits with 0 when it replaced the rules, and with 2 when it could not: no config in the project has the key, no environment has the slug, in which case the message lists the project's environments, or ConfigDirector refused the rules. `--environment` takes the environment's slug, as for `evaluate`, and a renamed config can be changed by an old key. With `--json`, it prints the request it sent, with the IDs it gave, since the Admin API answers with no body.

`targeting-rules set` needs `Projects: Read`, `Environments: Read` and `Configs: Update targeting rules`, and makes three Admin API requests. `targeting-rules reference` needs a valid token, whatever its permissions, and no project, and makes one request. The change shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**.

## Experiment runs

```bash
configdirector configs runs checkout-cta-copy --environment production
configdirector configs ship checkout-cta-copy --environment production --variation treatment-a
configdirector configs stop checkout-cta-copy --environment production
```

A run is a period during which an experiment's targeting rules in one environment split traffic between its variations. Saving a percentage rollout starts one, and removing the last rollout ends it. Only experiments have runs.

`configs runs` lists the experiment's runs in an environment, newest first. For each rollout, it shows how many distinct contexts each variation reached, called exposures, next to the share configured when the run started, and whether the split matches those shares. When the experiment measures [metrics](#metrics), each rollout also shows their results:

```txt
Runs of checkout-cta-copy in production (live), newest first:

Running since 2026-11-03 12:00 UTC
  Hypothesis: Urgency copy raises checkout completion by 5%
  Rollout: everyone not caught by a rule above
    control (Start free trial)              412 exposures   configured 50%
    treatment-a (Try it free for 14 days)   398 exposures   configured 50%
    810 contexts exposed, 3201 evaluations. The split matches the configured shares.
    Primary metric: checkout_completed, conversion, higher is better
      control (Start free trial)              2.9%   control
      treatment-a (Try it free for 14 days)   3.5%   +19% (-43% to +154%)   69% chance to beat control   no clear difference
    How long to run, at the pace since 2026-11-04 00:00 UTC: about 98 new exposures a day
      For a real lift of +2%    810 of about 2,082,762 exposures   more than a year remaining
      For a real lift of +5%    810 of about 338,034 exposures     more than a year remaining
      For a real lift of +10%   810 of about 86,501 exposures      more than a year remaining
      For a real lift of +20%   810 of about 22,617 exposures      about 222 days remaining
      For a real lift of +50%   810 of about 4,089 exposures       about 34 days remaining
    A row's lift is one a variation might really have over the control, not the lift measured so far: the smaller it is, the longer the run.
    Whatever the estimate says, a run should cover at least one full week, so every day of the week is in the result.
    Guardrail: support_ticket_opened, count per context, lower is better
      control (Start free trial)              0.12   control
      treatment-a (Try it free for 14 days)   0.13   +8% (-10% to +29%)   22% chance to beat control   no clear difference
  Events with no metric: add_to_cart (340 contexts)
  Results can be up to 25 minutes behind.

Stopped, 2026-10-01 09:00 UTC to 2026-10-15 09:30 UTC
  Hypothesis: Shorter copy raises checkout completion
  Ended with note: No clear difference after two weeks
  Rollout: IF context's trait /plan is one of [pro, team]
    control (Start free trial)              1200 exposures   configured 90%
    treatment-a (Try it free for 14 days)   130 exposures    configured 10%
    1330 contexts exposed, 5120 evaluations. The split matches the configured shares.
    Primary metric: checkout_completed, conversion, higher is better
      control (Start free trial)              3.1%   control
      treatment-a (Try it free for 14 days)   3.8%   +23% (-38% to +96%)   72% chance to beat control   no clear difference
    Guardrail: support_ticket_opened, count per context, lower is better
      control (Start free trial)              0.11   control
      treatment-a (Try it free for 14 days)   0.10   -9% (-41% to +38%)   65% chance to beat control   no clear difference
  Final results, as of 2026-10-15 09:30 UTC, when the run ended.
```

Each kind a metric reports gets a line with the metric's role (primary metric, secondary metric or guardrail), its name, the kind and its direction, then one row per variation, the control first. Every row shows the variation's value: the share of its exposed contexts that sent the event for **conversion**, and an average per exposed context for **count per context** and **value per context**. Every other variation also shows its lift against the control with the range it is likely in, its chance to beat control, and the verdict: likely better, likely worse or no clear difference, in the metric's direction. With three or more variations, each row also shows the variation's chance to be best. Until every variation has enough exposures, the rollout says the run needs more exposures and shows the values alone. A context exposed to more than one variation is left out of every metric, and the rollout says how many were. [How results are computed](https://docs.configdirector.com/getting-started/experiments/how-results-are-computed) explains every number. A verdict is a reading of the data so far: what to ship is your call.

While a run is going, its results can be up to 25 minutes behind. Once a run has ended and its final results are in, the last line says so instead. The run's hypothesis, which the run copied from the experiment when it started, and the note it ended with show under its first line. `Events with no metric` lists the events your application sent with `track` during the run that no metric measures, with how many contexts sent each. Versions before 0.21.0 show the exposures alone.

A run counts a metric with a [filter or a value field](#metrics) only from the moment the metric is attached to the experiment. When that was while the run was going, a line under each of the metric's kinds says since when, and that the events reported before then are not in its numbers. When the metric was not attached while the run was open, the run shows the metric's line, says it did not count it, and shows no numbers:

```txt
Secondary metric: checkout_completed · /plan is one of [team], conversion, higher is better
      Counted since 2026-11-05 09:30 UTC, when this metric was attached to the experiment. Events reported before then are not in these numbers.
      control (Start free trial)              2.1%   control
      treatment-a (Try it free for 14 days)   3.0%   +43% (-5% to +110%)   91% chance to beat control   no clear difference
    Guardrail: checkout_completed · value from /refunded, lower is better
      This run did not count this metric: a metric with a filter or a value field is counted from the moment it is attached to an experiment, and this one was not attached while the run was open.
```

Versions before 0.23.0 show such a metric by its event name alone, without the line about since when it was counted, and leave out a metric the run did not count.

A ratio, a funnel or a retention metric reports one kind, so its line names it kind first and leaves the kind out after it. A ratio's rows show each variation's ratio beside its numerator and denominator totals, and a variation with nothing added to its denominator yet has no ratio to compare. A funnel's rows show each variation's share of exposed contexts that reached the last step beside how many reached each step, in the order of the steps:

```txt
Primary metric: Ratio: order_completed value ÷ order_completed events, higher is better
      control (Start free trial)              37.42   4,976.86 ÷ 133   control
      treatment-a (Try it free for 14 days)   41.10   5,630.7 ÷ 137    +10% (-3% to +24%)   86% chance to beat control   no clear difference
    Secondary metric: Funnel: cart_viewed → checkout_started → checkout_completed, higher is better
      control (Start free trial)              25.0%   steps 300 → 180 → 103   control
      treatment-a (Try it free for 14 days)   29.4%   steps 310 → 200 → 117   +18% (-2% to +39%)   91% chance to beat control   no clear difference
```

A retention metric counts a context only once its last day has ended. A line above its rows says over how many contexts it is measured so far and how many more have been exposed, and each row shows how many of the variation's measured contexts came back. Until the first context's last day has ended, the line says when that will be, in place of the numbers, and on an ended run it says how many contexts the run measured and how many it never will:

```txt
Guardrail: Retention: app_opened · days 7 to 13, higher is better
      Measured over the 412 contexts whose days 7 to 13 have passed. 61 more have been exposed and are measured once their day 13 ends.
      control (Start free trial)              41.3%   85 of 206 came back   control
      treatment-a (Try it free for 14 days)   39.8%   82 of 206 came back   -4% (-21% to +18%)   38% chance to beat control   no clear difference
    Guardrail: Retention: app_opened · days 7 to 13, higher is better
      No context has had its days 7 to 13 yet. A context is measured once its day 13 has ended, 14 days after its exposure. The first ones finish on 2026-11-17 12:00 UTC, and the numbers show from then on; a lift shows once enough contexts of every variation are measured. 473 contexts have been exposed so far.
```

A retention metric's variations are compared once enough of each variation's contexts are measured, which can come after the run's other metrics are compared. Versions before 0.24.0 fail on a run that measures a ratio, a funnel or a retention metric.

While a run is going, `How long to run` follows each rollout's primary metric results once its variations can be compared. For a real lift of 2%, 5%, 10%, 20% and 50% on the primary metric, in its better direction, so -2% to -50% when lower is better, it gives the rollout's exposures so far against those it needs before a variation with that lift has a good chance of reading likely better, and about how many days remain at the pace of new exposures since the time it names. A row's lift is one a variation might really have, not the lift measured so far: the smaller it is, the longer the run. A lift the rollout already has enough exposures for says so, and more than 365 days reads as more than a year. When no new contexts were exposed since that time, the line says the days cannot be estimated, and the rows give the exposures alone. A lift that would take a conversion past 100% gets no row, and the estimate doesn't show while the control's numbers give nothing to estimate from, as when none of its contexts has sent the event yet. For a retention primary, every number of days includes the days the last contexts exposed wait before they are measured, so a lift whose exposures are all in reads up to that many days remaining, and one with enough contexts measured says so. New contexts usually arrive more slowly as a run goes on, so take the days as the least the run needs, and run for at least one full week whatever they say. [How long a run needs](https://docs.configdirector.com/getting-started/experiments/how-results-are-computed#how-long-a-run-needs) says what the estimate assumes. Versions before 0.22.0 don't show it.

Exposures are counted every so often, so the latest evaluations may not be included yet. A run also says how many evaluations it left out of the exposures: those of anonymous contexts, which have no identifier or are marked `anonymous`, and those from SDK versions that do not report exposures yet.

`configs ship` serves one variation to everyone in the environment and ends the run. `--variation` takes the variation's name or its ID, as `configs get --json` lists them. In one save of the targeting rules, the default targeting rule value becomes the variation's value and every percentage rollout is removed, including one a conditional rule serves. A conditional rule that serves a single value stays, so the contexts it matches keep getting that value. With no rollout saved, `configs ship` only changes the default targeting rule value. [Experiments](https://docs.configdirector.com/getting-started/experiments) walks through a whole A/B test, up to removing the config once it has settled.

`configs stop` ends the run without choosing a variation. Every percentage rollout is removed, including one a conditional rule serves, and the default targeting rule value stays, so the contexts that were in a rollout get that value. A conditional rule that serves a single value stays here too.

Both print the rules they saved:

```txt
Shipped treatment-a (Try it free for 14 days) in production (live).

production (live)
  1. plan is one of pro, team: control (Start free trial)
  Default targeting rule: treatment-a (Try it free for 14 days)
```

Both take `--note <text>`, up to 1,000 characters on why the variation is shipped or the run is stopped. The ended run keeps it, and `configs runs` and the dashboard show it with the outcome.

Neither asks for confirmation, and both treat a live environment like any other, so check the environment before you run them. The change takes effect right away.

`configs runs` says so when the config has no runs in the environment, and exits with 0. `configs ship` exits with 2 when `--variation` matches none of the experiment's variations, or several with the same name, and lists them with their IDs, and when the config has no variations, since only an experiment has them. `configs stop` exits with 2 when the config is not an experiment or the environment holds no percentage rollout, since there is no run to stop. All three exit with 2 when no config has the key or no environment has the slug, and the message then lists the project's environments. You can name a renamed experiment by an old key. With `--json`, they print the Admin API's response as it was received: the runs, or the config with its targeting rules in every environment.

`configs runs` needs `Projects: Read`, `Environments: Read` and `Configs: Read`, and makes four Admin API requests. `configs ship` needs those and `Configs: Update targeting rules`, and also makes four requests. `configs stop` needs `Projects: Read`, `Environments: Read` and `Configs: Update targeting rules`, and makes three. `configs ship` and `configs stop` make one more when a rule uses a segment. A shipped or stopped run shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**.

## Segments

```bash
configdirector segments create --segment beta-testers.json
configdirector segments update beta-testers --segment beta-testers.json
configdirector segments delete beta-testers
```

`segments create` and `segments update` write a [segment](https://docs.configdirector.com/getting-started/segments) from a JSON file, and `segments delete` deletes one. They show no diff and ask for no confirmation, so look over the file before you run them.

The file holds the segment's key, its name and its condition groups, in the format the [Admin API](https://docs.configdirector.com/integrations/admin-api#segments) takes. A context is in the segment when every condition of any one group matches. `overrides` is optional, and maps an environment's ID to the condition groups that environment uses instead, as [Environment overrides](https://docs.configdirector.com/getting-started/segments#environment-overrides) describes. This segment holds the contexts whose email ends in `@example.com`, and those on the `beta` plan in New Zealand or Australia, except in the environment with the ID `7e6d5c4b-3a29-4810-8f7e-6d5c4b3a2918`, where it holds only staff:

```json
{
  "key": "beta-testers",
  "name": "Beta testers",
  "groups": [
    [
      {
        "kind": "attribute",
        "attribute": "traits",
        "trait": "/email",
        "operator": "ends with any of",
        "targetType": "text",
        "targetValues": ["@example.com"]
      }
    ],
    [
      {
        "kind": "attribute",
        "attribute": "traits",
        "trait": "/plan",
        "operator": "is one of",
        "targetType": "text",
        "targetValues": ["beta"]
      },
      {
        "kind": "attribute",
        "attribute": "traits",
        "trait": "/country",
        "operator": "is one of",
        "targetType": "text",
        "targetValues": ["NZ", "AU"]
      }
    ]
  ],
  "overrides": {
    "7e6d5c4b-3a29-4810-8f7e-6d5c4b3a2918": [
      [
        {
          "kind": "attribute",
          "attribute": "traits",
          "trait": "/email",
          "operator": "ends with any of",
          "targetType": "text",
          "targetValues": ["@staff.example.com"]
        }
      ]
    ]
  }
}
```

`segments create --segment beta-testers.json` prints what it created, the way `segments get` shows a segment:

```txt
Created segment beta-testers in web-app.
beta-testers
  Name: Beta testers

Project definition
  1. email ends with any of @example.com
  2. plan is one of beta and country is one of NZ, AU

Override in production
  1. email ends with any of @staff.example.com
```

- **IDs.** Every condition in ConfigDirector has an `id`. Leave it out of a new one, in the condition groups or in an override, and the CLI gives it a new ID before sending the file. An `id` in the file is sent as written, so the conditions you keep keep their IDs.
- **Start from the current segment.** `segments get --json` prints a segment in the shape the file takes. Save it, edit it, and pass it to `--segment`; its other fields, such as `usages`, are ignored:```bash
configdirector segments get beta-testers --json > beta-testers.json
# edit beta-testers.json, then:
configdirector segments update beta-testers --segment beta-testers.json
```

<br />

`--segment -` reads the file from stdin instead, for a script that builds the segment.
- **Environment IDs.** `overrides` is keyed by the environment's ID, not its slug. `environments list --json` prints the ID of each environment.
- **What update replaces.** `segments update <key>` replaces the key, the name and the condition groups of the segment the key names, so a different `key` in the file renames it. The segment keeps its own ID whatever `id` the file holds, so a file saved from another segment updates the one you name. Without `overrides` in the file, the environment overrides stay as they are. With `"overrides": {}`, they are all removed, and with a map, exactly those environments are overridden and the others go back to the project definition.
- **ConfigDirector checks the segment.** The CLI only checks that the file holds a JSON object. ConfigDirector checks the rest, as the dashboard does, and when it refuses the segment, for example because another segment has its key, the command exits with 2 and lists its reasons.

`segments delete <key>` deletes the segment and its environment overrides:

```txt
Deleted segment beta-testers from web-app.
```

It is refused while the targeting rules of any config use the segment, in any environment; archived configs are not counted. The command then exits with 2 and lists those configs with the environments whose rules use the segment, so you can remove those segment conditions with [`targeting-rules set`](#targeting-rules) first:

```txt
Error: The targeting rules of 2 configs use the segment beta-testers, so it was not deleted:
  new-checkout in production
  dark-mode in test, production
Remove those segment conditions first, with configdirector targeting-rules set.
```

The three commands exit with 0 when they wrote or deleted the segment, and with 2 when they could not: no segment in the project has the key given to `update` or `delete`, ConfigDirector refused the segment, or a config uses the segment you tried to delete. With `--json`, `create` and `update` print the segment as the Admin API returned it, and `delete` prints `{ "deletedSegmentKey": "beta-testers" }`, with the key as you gave it, since the Admin API answers with no body.

`segments create` needs `Projects: Read` and `Segments: Create`, `segments update` needs `Projects: Read`, `Segments: Read` and `Segments: Update`, and `segments delete` needs `Projects: Read` and `Segments: Delete`. With `Environments: Read`, the output names environments by their slug, and without it, by their ID. `create` makes two Admin API requests and `update` three, plus one to name the environments when the segment has an override; `delete` makes two, plus one to name the environments when it is refused. The change shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**.

## Metrics

```bash
configdirector metrics create --event-name checkout_completed --kind conversion --kind value-per-context --direction higher-is-better
configdirector metrics create --event-name checkout_completed --filter team-plan.json --value-field /items --kind value-per-context --direction higher-is-better
configdirector metrics create --retention second-week.json --direction higher-is-better
configdirector metrics update checkout_completed --direction lower-is-better
configdirector metrics delete --id 4f5a6b7c-8d9e-4f0a-9b1c-3d4e5f6a7b8c
```

A metric is what an [experiment](https://docs.configdirector.com/getting-started/experiments) measures, from the events your application sends with the SDK's `track` call: the numbers it reports, and whether a higher or a lower number is better. A metric of one event name counts the events with that name, all of them or only those whose details match the metric's filter, and a project can have several metrics on one event name, told apart by their filter and value field. A ratio divides one total by another, such as revenue per order; a funnel gives the share of exposed contexts that reached the last of its steps, such as getting from the cart to a purchase; and a retention metric gives the share of contexts that sent an event between a first and a last day after their first exposure, such as coming back in the second week, among the contexts whose last day has ended.

The commands show a metric of one event name by its event name, then its filter's conditions, then its value field, as in `checkout_completed · /plan is one of [team] · value from /items`, and a ratio, a funnel or a retention metric kind first, as in `Ratio: order_completed value ÷ order_completed events`, `Funnel: cart_viewed → checkout_started → checkout_completed` and `Retention: app_opened · days 7 to 13`. They take a metric of one event name by its event name, exactly as your application sends it, while only one metric has it, and any metric by the ID `metrics list` prints, with `--id`. `configs runs` shows the results of the metrics an experiment measures, as [Experiment runs](#experiment-runs) describes. You attach metrics to an experiment, and choose its primary metric, on the experiment's **Settings** tab in the dashboard, or through the [Admin API](https://docs.configdirector.com/integrations/admin-api) or the [MCP server](https://docs.configdirector.com/integrations/mcp); the CLI has no command for it.

`metrics create` creates a metric of one event name, or a ratio, a funnel or a retention metric:

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --event-name <event name>
      </code>
    </td>
    
    <td>
      For a metric of one event name, the event name, exactly as your application passes it to <code>
        track
      </code>
      
      , 1 to 150 characters. A metric needs one of <code>
        --event-name
      </code>
      
      , <code>
        --ratio
      </code>
      
      , <code>
        --funnel
      </code>
      
       and <code>
        --retention
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --ratio <file>
      </code>
    </td>
    
    <td>
      For a ratio metric, a JSON file holding its numerator and its denominator, or <code>
        -
      </code>
      
       to read them from stdin.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --funnel <file>
      </code>
    </td>
    
    <td>
      For a funnel metric, a JSON file holding its steps, or <code>
        -
      </code>
      
       to read them from stdin.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --retention <file>
      </code>
    </td>
    
    <td>
      For a retention metric, a JSON file holding its event name and its days, or <code>
        -
      </code>
      
       to read them from stdin.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --kind <kind>
      </code>
    </td>
    
    <td>
      Required with <code>
        --event-name
      </code>
      
      , and only taken with it. A number the metric reports. Repeat it for each: <code>
        conversion
      </code>
      
      , the share of exposed contexts that sent the event at least once; <code>
        count-per-context
      </code>
      
      , how many times each exposed context sent it, on average; <code>
        value-per-context
      </code>
      
      , the value your application sent with the event per exposed context, on average. A context that sent nothing counts as zero.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --direction <direction>
      </code>
    </td>
    
    <td>
      Required. <code>
        higher-is-better
      </code>
      
      , as for purchases, or <code>
        lower-is-better
      </code>
      
      , as for support tickets or errors. Every verdict on the metric follows it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --filter <file>
      </code>
    </td>
    
    <td>
      With <code>
        --event-name
      </code>
      
      , a JSON file holding the conditions an event's details must match for the event to count, or <code>
        -
      </code>
      
       to read them from stdin. Without it, every event with the name counts.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --value-field <pointer>
      </code>
    </td>
    
    <td>
      With <code>
        --event-name
      </code>
      
      , a JSON pointer, such as <code>
        /items
      </code>
      
      , to the field of the event's details holding the number that value per context sums in place of the event's value. It needs <code>
        --kind value-per-context
      </code>
      
      . An event without a number there still counts as an event and adds nothing to the sum.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --description <text>
      </code>
    </td>
    
    <td>
      What the metric means.
    </td>
  </tr>
</tbody>
</table>

The `--filter` file holds 1 to 5 conditions, all of which an event must match, in the shape `metrics get --json` prints a metric's `filter` in. For the checkouts on the Team plan:

```json
[{ "field": "/plan", "targetType": "text", "operator": "is one of", "targetValues": ["team"] }]
```

`field` is a JSON pointer into the details your application sends with the event. A `text` condition takes `is one of` or `is NOT one of`, with up to 20 target values; a `number` condition takes `=`, `!=`, `>`, `>=`, `<` or `<=`, with one number written as text, such as `"2"`; and a `boolean` condition takes `equals`, with `"true"` or `"false"`. A condition means what it means in a targeting rule, so a field an event lacks reads as empty text, and `is NOT one of` and `!=` count an event without it. The [Admin API](https://docs.configdirector.com/integrations/admin-api#metrics) describes the conditions in full.

The `--ratio`, `--funnel` and `--retention` files each hold the whole definition, in the shape `metrics get --json` prints the field of the same name in, and the metric reports that one kind: `ratio`, `funnel` or `retention`. A ratio's numerator and denominator each add up the `events` of an event name, or its `value`, the value sent with each event or the number in the side's `valueField`, a JSON pointer into the event's details. For revenue per order:

```json
{
  "numerator": { "eventName": "order_completed", "adds": "value" },
  "denominator": { "eventName": "order_completed", "adds": "events" }
}
```

A funnel has 2 to 5 steps, in the order a context reaches them. For getting from the cart to a purchase:

```json
{ "steps": [{ "eventName": "cart_viewed" }, { "eventName": "checkout_started" }, { "eventName": "checkout_completed" }] }
```

A retention metric counts the contexts that sent the event between a first and a last day after their first exposure, from day 1 to day 90, day 0 being the first 24 hours. A context is measured once its last day has ended, so a run shows no numbers for it during its first `lastDay` + 1 days. For coming back in the second week:

```json
{ "eventName": "app_opened", "firstDay": 7, "lastDay": 13 }
```

Each side of a ratio, each step of a funnel and a retention metric can take a `filter`, in the shape of the `--filter` file. The Admin API describes [ratio](https://docs.configdirector.com/integrations/admin-api#ratio-metrics), [funnel](https://docs.configdirector.com/integrations/admin-api#funnel-metrics) and [retention](https://docs.configdirector.com/integrations/admin-api#retention-metrics) metrics in full.

A metric keeps its definition for its whole life: its event name, filter and value field, or its ratio, funnel or retention. For another, create another metric. A run counts a metric with a filter or a value field, and every ratio, funnel and retention metric, only from the moment the metric is attached to the experiment, as [Experiment runs](#experiment-runs) shows. ConfigDirector refuses a metric with the same definition as another of the project.

It prints the metric it created, the way `metrics get` shows one:

```txt
Created metric checkout_completed in web-app.
checkout_completed
  Kinds: conversion, value per context
  Direction: higher is better

No experiment uses it.
```

Once experiments use a metric, `metrics get` lists them with the metric's role in each, the kind a primary metric decides on, and the environments where a run is in progress:

```txt
checkout_completed
  Description: Orders paid for.
  Kinds: conversion, value per context
  Direction: higher is better

Used by
  checkout-cta-copy: primary metric on conversion, running in production
  pricing-page-copy: guardrail
```

`metrics update <event name>` changes what its options name and leaves the rest as it is: `--kind`, repeated, replaces the kinds, `--direction` the direction, and `--description` the description, which `--description ""` removes. A metric keeps its definition; for another, create another metric. A ratio, a funnel or a retention metric also keeps its one kind, so `metrics update --id <metric id> --kind` exits with 2 for one. Removing a kind an experiment's primary metric decides on is refused, and the command lists those experiments:

```txt
Error: 1 experiment decides on a kind this change removes, so checkout_completed was not updated:
  checkout-cta-copy decides on value per context
Give it another primary kind first, on the experiment's Settings tab in the dashboard.
```

`metrics delete <event name>` deletes the metric and detaches it from the experiments that use it. Events with its name keep being counted, so a metric created again for the name without a filter or a value field, and attached again, shows their history, while one with a filter or a value field is counted from the moment it is attached. The deletion is refused while an experiment that uses the metric has a run in progress, and the command lists those experiments with the environments of their runs:

```txt
Error: 1 experiment with a run in progress uses checkout_completed, so it was not deleted:
  checkout-cta-copy, running in production
Ship or stop each run first, with configdirector configs ship or configs stop, or detach the metric on the experiment's Settings tab in the dashboard.
```

`metrics get`, `metrics update` and `metrics delete` take the event name of a metric of one event name while only one metric has it, and `--id <metric id>` for a ratio, a funnel or a retention metric, which has no event name of its own. When no metric of one event name has the event name you give, the error says a ratio, funnel or retention metric is named by its ID. When several metrics have it, they change nothing: they list the metrics with their IDs and exit with 2, and `--id <metric id>`, in place of the event name, names one of them:

```txt
Error: 2 metrics in web-app have the event name "checkout_completed". Name one with --id:
  1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f   checkout_completed
  4f5a6b7c-8d9e-4f0a-9b1c-3d4e5f6a7b8c   checkout_completed · /plan is one of [team]
```

<note>

Version 0.24.0 is the first that reads a ratio, a funnel or a retention metric. Earlier versions fail `metrics list` in a project that has one, `metrics get`, `metrics update` and `metrics delete --id` on one, and `configs runs` on an experiment that measures one. Upgrade every CLI used with your projects, CI included, once a project has one.

</note>

<note>

Version 0.23.0 is the first that handles several metrics on one event name. Earlier versions act on the first metric ConfigDirector lists for the event name, so their `metrics update` and `metrics delete` can change or delete another metric than the one you mean. Upgrade every CLI that changes your metrics, CI included, before you create a second metric on an event name.

</note>

None of the three asks for confirmation. They exit with 0 when they wrote or deleted the metric, and with 2 when they could not: no metric in the project has the event name or ID given to `update` or `delete`, several have the event name, ConfigDirector refused the metric, for example because the project already has one with the same event name, filter and value field, or an experiment's primary metric or run in progress stopped the change. With `--json`, `create` and `update` print the metric as the Admin API returned it, and `delete` prints `{ "deletedMetricId": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "deletedEventName": "checkout_completed" }`, since the Admin API answers with no body, with `null` as the event name of a ratio, a funnel or a retention metric.

`metrics create` needs `Projects: Read` and `Metrics: Create`, `metrics update` needs `Projects: Read`, `Metrics: Read` and `Metrics: Update`, and `metrics delete` needs `Projects: Read`, `Metrics: Read` and `Metrics: Delete`. With `Environments: Read`, `update` and `delete` name environments by their slug, and without it, by their ID. `create` makes two Admin API requests, and `update` and `delete` three, plus one to name the environments when a run is in progress. The change shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**.

## Archive a config

```bash
configdirector configs archive new-checkout
```

`configs archive` archives a config: it is removed from the project and from what SDKs receive, so your applications get their in-code default value for it. You can restore it from the dashboard for 30 days, with its targeting rules intact, and after that it is deleted for good, as [Archiving](https://docs.configdirector.com/monitoring/lifecycle#archiving) describes:

```txt
Archived new-checkout in web-app. It can be restored from the dashboard for 30 days.
```

It asks for no confirmation and does not check whether your code still reads the key. Run [`scan`](#scan) first and look at every reference to the key, the indirect ones included, since an application that still reads it after the archive gets its in-code default value and raises a [Config not found alert](https://docs.configdirector.com/monitoring/alerts#config-not-found). A renamed config can be archived by an old key.

`configs archive` exits with 0 when it archived the config, and with 2 when no config in the project has the key, which includes a config already archived. With `--json`, it prints `{ "archivedConfigKey": "new-checkout" }`, with the key as you gave it, since the Admin API answers with no body.

`configs archive` needs `Projects: Read` and `Configs: Archive` (`configs:archive`), and makes two Admin API requests. The change shows in the [audit log](https://docs.configdirector.com/integrations/admin-api#terraform-opentofu-the-cli-and-the-audit-log) with the source **CLI**.

## Output

Every command prints text for people by default. With `--json`, it prints JSON instead, for scripts and CI. Errors and the token prompt go to stderr, so with `--json` the JSON is all that reaches stdout:

```bash
configdirector scan --json | jq -r '.references[] | select(.key == "new-checkout") | "\(.file):\(.line)"'
```

`validate --json` prints the scan's JSON with a `findings` array, and still exits with 1 when the array is not empty. Shortened to one reference of each kind and one finding:

```json
{
  "project": "web-app",
  "filesScanned": 4,
  "references": [
    {
      "key": "new-checkout",
      "file": "src/checkout.ts",
      "line": 5,
      "kind": "direct",
      "sdk": "js-server",
      "call": "getValue",
      "argument": "NEW_CHECKOUT",
      "default": { "type": "boolean", "value": false },
      "test": false
    },
    {
      "key": "new-checkout",
      "file": "src/flags.ts",
      "line": 1,
      "kind": "indirect",
      "test": false
    }
  ],
  "dynamicReferences": [
    {
      "file": "src/theme.tsx",
      "line": 5,
      "sdk": "react",
      "call": "useConfigValue",
      "argument": "setting.key"
    }
  ],
  "findings": [
    {
      "kind": "availability-mismatch",
      "key": "fraud-threshold",
      "file": "src/theme.tsx",
      "line": 4,
      "sdk": "react",
      "sdkType": "client",
      "configAvailableTo": ["server"]
    }
  ]
}
```

A direct reference has `argument` when its key came from a constant, `default` when the call passes an in-code default value, and `getterType` when the getter's name sets the type. In `scan --json`, each direct and indirect reference also has its [snippet](#snippets), which `validate --json` leaves out:

```json
"snippet": {
  "firstLine": 3,
  "lines": [
    "const client = createClient(\"YOUR-SERVER-SDK-KEY\");",
    "",
    "export const isNewCheckout = () => client.getValue(NEW_CHECKOUT, false);",
    "",
    "export const checkoutPath = () => (isNewCheckout() ? \"/checkout/v2\" : \"/checkout\");"
  ],
  "language": "typescript",
  "truncatedLines": []
}
```

`firstLine` is the number of the snippet's first line in the file, `language` the language to highlight the lines as, and `truncatedLines` the numbers of the lines cut to 250 characters. Each finding has a `kind`, the `key`, the `file` and the `line`, and the config facts it was checked against:

<table>
<thead>
  <tr>
    <th>
      <code>
        kind
      </code>
    </th>
    
    <th>
      Also has
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        unknown-key
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        deprecated-key
      </code>
    </td>
    
    <td>
      <code>
        currentKey
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        type-mismatch
      </code>
    </td>
    
    <td>
      <code>
        configType
      </code>
      
      , <code>
        servedAs
      </code>
      
      , and <code>
        default
      </code>
      
      , <code>
        getterType
      </code>
      
       or both
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        availability-mismatch
      </code>
    </td>
    
    <td>
      <code>
        sdk
      </code>
      
      , <code>
        sdkType
      </code>
      
      , <code>
        configAvailableTo
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        enum-value-not-allowed
      </code>
    </td>
    
    <td>
      <code>
        default
      </code>
      
      , <code>
        allowedValues
      </code>
    </td>
  </tr>
</tbody>
</table>

The [JSON Schema](https://github.com/ConfigDirector/cli/blob/main/schema/scan-output.schema.json) in the package describes every field.


## Sitemap

See the full [sitemap](https://docs.configdirector.com/sitemap.md) for all pages.
