> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gable CLI Docker Image

> Download the Gable CLI Docker image and run a local scan of your repository

Gable distributes its CLI as a Docker image. Run the image against a local copy of your repository to trace field-level data flows with static code analysis, enhanced by an LLM of your choice.

Two kinds of scans are available from the same image:

* **General repository scan** — traces field-level data flows through your application.
* **Agent project scan** — analyzes LangChain agent projects to discover agents, tools, models, workflow relationships, and the field-level data flows they capture.

## What you need

* **Docker installed and running.** Confirm with `docker info`.
* **A local copy of the repository you want to scan.** Gable analyzes code on disk, so the repository must be checked out on the machine running the image.
* **Your Gable API key and endpoint.** Repository scans upload their results to Gable, so the container needs your Gable credentials. Both are on [**Settings → API**](https://docs.gable.ai/docs/settings/api_keys.md).
* **One LLM authentication option.** Gable uses an LLM to enhance its static analysis. You can authenticate with an OpenAI or Anthropic API key, or with a ChatGPT/Codex or Claude subscription. Pick one — each option is covered in [Run the scan](#run-the-scan).

## 1. Download the image

Sign in to the Gable web console and go to [**Settings → API**](https://docs.gable.ai/docs/settings/api_keys.md). At the bottom of the page is the **Gable CLI Docker access** section, which holds the credentials and commands for your account.

![The Gable CLI Docker access section on the Settings → API
page](https://mintcdn.com/gable/zqJ_dZSkh4raDhvv/docs/assets/gable_cli_docker_access.png?fit=max\&auto=format\&n=zqJ_dZSkh4raDhvv\&q=85\&s=f363370ca67e276141a00ba72a9d983d)

The Gable CLI Docker access section on the Settings → API page

Click the copy icon next to each field and paste it into the same terminal window, in this order:

1. **Docker username export** — sets `GABLE_DOCKER_USERNAME`
2. **Docker token export** — sets `GABLE_DOCKER_TOKEN`
3. **Docker login command** — authenticates Docker using those two variables
4. **Gable CLI image command** — pulls the latest Gable CLI image

Together they look like this:

```bash theme={null}
export GABLE_DOCKER_USERNAME='<username>'
export GABLE_DOCKER_TOKEN='<token>'
printf '%s' "$GABLE_DOCKER_TOKEN" | docker login --username "$GABLE_DOCKER_USERNAME" --password-stdin
docker pull gableeng/gable_cli:orchestrator-latest
```

> [!NOTE]
>
> The exports and the login command must run in the same terminal window, since
> the login command reads the two variables the exports set. The **Docker
> token** field shows the raw token on its own if you need it for a credential
> store or CI secret.

Confirm the image is ready:

```bash theme={null}
docker run --rm gableeng/gable_cli:orchestrator-latest run --help
```

## 2. Go to your project

Change into the local copy of the repository you want analyzed.

```bash theme={null}
cd /absolute/path/to/your-repository
```

Every command below analyzes the current directory. Your project is mounted inside the container at `/workspace`, and results are written to a `gable_results/` directory in your project folder.

> [!NOTE]
>
> Run the commands from the root of the repository you want scanned. If you are
> not sure where you are, check with `pwd`.

## 3. Choose a profile

The `--profile` flag selects the kind of scan and the model provider. Use the profile that matches your scan and the LLM you authenticate with.

| Scan | OpenAI / Codex | Claude / Anthropic |
| - | - | - |
| Repository scan | `--profile quickstart` | `--profile quickstart-claude` |
| Agent project scan | `--profile agent` | `--profile agent --default-model-provider claude-cli` |

OpenAI is the default model provider and uses `Sol 6.1`. When Claude is the provider, `Opus 5.5` is used.

## 4. Set your Gable API credentials

Repository scans upload their results to Gable. Copy your API key and endpoint from [**Settings → API**](https://docs.gable.ai/docs/settings/api_keys.md) and export them so they can be passed into the container:

```bash theme={null}
export GABLE_API_KEY='your-api-key'
export GABLE_API_ENDPOINT='https://api-yourorg.gable.ai'
```

## 5. Run the scan

Use the section below that matches the LLM authentication option you chose. Each one shows the command for both scan types.

### OpenAI API key

Obtain a key from the OpenAI API dashboard and export it as `CODEX_API_KEY` so it can be passed into the container.

```bash theme={null}
export CODEX_API_KEY='your-openai-api-key'
```

Repository scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  --env CODEX_API_KEY \
  --env GABLE_API_KEY \
  --env GABLE_API_ENDPOINT \
  gableeng/gable_cli:orchestrator-latest \
  run --profile quickstart \
    --project-root /workspace \
    --out /workspace/gable_results
```

Agent project scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  --env CODEX_API_KEY \
  gableeng/gable_cli:orchestrator-latest \
  run --profile agent \
    --project-root /workspace \
    --out /workspace/gable_results
```

### OpenAI with a ChatGPT subscription

If you have the ChatGPT desktop app or the Codex CLI installed and signed in with a ChatGPT subscription, you can use that subscription instead of an API key. The Codex login is stored in `${CODEX_HOME:-$HOME/.codex}/auth.json`; mount that directory into the container so the CLI can read it.

Repository scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  -v "${CODEX_HOME:-$HOME/.codex}:/root/.codex" \
  --env GABLE_API_KEY \
  --env GABLE_API_ENDPOINT \
  gableeng/gable_cli:orchestrator-latest \
  run --profile quickstart \
    --project-root /workspace \
    --out /workspace/gable_results
```

Agent project scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  -v "${CODEX_HOME:-$HOME/.codex}:/root/.codex" \
  gableeng/gable_cli:orchestrator-latest \
  run --profile agent \
    --project-root /workspace \
    --out /workspace/gable_results
```

### Anthropic API key

Obtain a key from the Claude Console and export it as `ANTHROPIC_API_KEY`.

```bash theme={null}
export ANTHROPIC_API_KEY='your-anthropic-api-key'
```

Repository scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  --env ANTHROPIC_API_KEY \
  --env GABLE_API_KEY \
  --env GABLE_API_ENDPOINT \
  gableeng/gable_cli:orchestrator-latest \
  run --profile quickstart-claude \
    --project-root /workspace \
    --out /workspace/gable_results
```

Agent project scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  --env ANTHROPIC_API_KEY \
  gableeng/gable_cli:orchestrator-latest \
  run --profile agent \
    --project-root /workspace \
    --out /workspace/gable_results \
    --default-model-provider claude-cli
```

### Claude with a Claude subscription

If you have a Claude subscription and Claude Code installed, you can use that subscription instead of an API key. Generate a token with Claude Code:

```bash theme={null}
claude setup-token
```

Export the token as `CLAUDE_CODE_OAUTH_TOKEN`:

```bash theme={null}
export CLAUDE_CODE_OAUTH_TOKEN='your-claude-token'
```

Repository scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  --env CLAUDE_CODE_OAUTH_TOKEN \
  --env GABLE_API_KEY \
  --env GABLE_API_ENDPOINT \
  gableeng/gable_cli:orchestrator-latest \
  run --profile quickstart-claude \
    --project-root /workspace \
    --out /workspace/gable_results
```

Agent project scan:

```bash theme={null}
docker run --rm --init \
  -v "$PWD:/workspace" \
  --env CLAUDE_CODE_OAUTH_TOKEN \
  gableeng/gable_cli:orchestrator-latest \
  run --profile agent \
    --project-root /workspace \
    --out /workspace/gable_results \
    --default-model-provider claude-cli
```

## 6. View your results

When the run finishes, the result files are written to `gable_results/` in your project folder.

Agent project scans produce `agent-systems.json`, which contains the agentic discovery results — agent systems, components, relationships, and lineage. Several metadata files are written alongside it as outputs of the analysis:

* `strands.json`
* `strand-metadata.json`
* `framework-metadata.json`

## Troubleshooting

**Image download denied.** Repeat the Docker login using fresh credentials from the **Gable CLI Docker access** section of [**Settings → API**](https://docs.gable.ai/docs/settings/api_keys.md).

**Nothing was analyzed, or the wrong code was analyzed.** Run `pwd` to confirm you are at the root of the project you want scanned. Every command analyzes the current directory.

**LLM authentication or model error.** Confirm the key or token you exported is still valid, that it is present in the shell you are running from, and that the selected model is available to your account.

**Unrecognized option.** Pull the image again to pick up the latest version, and confirm the version with your Gable team. Agent scans use `--profile agent` for both providers; select Claude with `--default-model-provider claude-cli`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.