---
name: disco-install
description: Install the Disco CLI for pilots, dispatchers, and AI agents. Follow these steps to install, save credentials, and drop the Disco skill into your local AI agents' skill directories.
---

# Install Disco

Disco is a flight planning copilot that connects to ForeFlight Dispatch and
layers on weather, routes, winds, NOTAMs, customs data, and more.

This guide is written for AI agents. Follow each step exactly. When you're
done, read [skill.md](https://staging.disco.postflight.co/skill.md) for the full
reference on what Disco can do and how to use it.

## Step 1: Install the CLI and skill

Run the installer. In one command it:

1. Downloads the Disco tarball to `~/.local/share/disco/`
2. Links the `disco` command into `~/.local/bin/`
3. Symlinks the Disco skill into every detected AI agent's skill
   directory — `~/.claude/skills/disco`, `~/.codex/skills/disco`, and
   a central `~/.skills/disco` that any agent can read
4. Drops an `openclaw` shim into `~/.local/bin/` (if Claude Code is
   installed) that forwards to `claude` — purely a branded alias for
   Disco-flavored sessions

```bash
curl -fsSL https://staging.disco.postflight.co/install.sh | bash
```

After install, confirm `~/.local/bin` is on the PATH. If it isn't, add it:

```bash
export PATH="$HOME/.local/bin:$PATH"
```

Verify the CLI works:

```bash
disco --help
```

The skill install uses symlinks pointing back to the canonical
`~/.local/share/disco/skills/disco/` location, so future Disco updates
automatically refresh every installed skill without you having to
re-run anything.

If you need to re-install the skill manually (for example, you installed
Disco via another method, or added Claude Code after installing Disco),
run:

```bash
disco skills install
```

You can also target a specific agent:

```bash
disco skills install --target claude    # ~/.claude/skills/disco only
disco skills install --target codex     # ~/.codex/skills/disco only
disco skills install --target central   # ~/.skills/disco only
```

## Step 2: Get the user's ForeFlight Dispatch API key

**Ask the user for their ForeFlight Dispatch API key in chat.** Do not try
to generate one or guess.

If the user does not have a key, tell them to generate one at:

```
https://dispatch.foreflight.com/tools/console/keys
```

Wait for them to paste the key into the chat (not into a terminal).

## Step 3: Save the API key (non-interactive)

**Critical:** Do NOT run `disco setup` interactively when operating through
PTY or process tools. Bracketed-paste and control sequences can corrupt
the saved key. Always use the non-interactive `--api-key` flag.

Once the user gives you their key, run:

```bash
disco setup --api-key "<KEY_FROM_USER>" --default-aircraft N78ZG
```

- The `--api-key` value should be the exact key the user provided, with
  no additional formatting, quoting, or escape characters.
- The `--default-aircraft` flag is optional. Ask the user for their
  preferred tail number, or omit the flag.

This writes the credentials directly to `~/.disco/config.json` in this
shape:

```json
{
  "api_key": "<the key>",
  "default_aircraft": "N78ZG"
}
```

### Verify the save

Read back the config and confirm the saved key matches what the user gave
you (byte-for-byte, no trailing whitespace or control characters):

```bash
cat ~/.disco/config.json
```

If the saved `api_key` value contains anything other than the exact key
the user provided (for example `\x1b[200~`, `%n`, or other escape
sequences), re-run `disco setup --api-key` with a clean value.

### Never echo the full key

When reporting status to the user, never print the full API key to chat
or stdout. Show a masked form only, like `1gZf...7NQ=`.

## Step 4: Confirm connectivity

Run a lightweight command that hits the Dispatch API:

```bash
disco flights
```

or

```bash
disco aircraft list
```

If the key is valid, you'll see the user's flights or aircraft as JSON.
If authentication fails, the key was probably corrupted — ask the user
to provide it again and repeat Step 3.

## Step 5: Read the skill reference

Once Disco is installed and working, fetch
[skill.md](https://staging.disco.postflight.co/skill.md) for the full CLI
command reference, natural-language mapping patterns, and usage
guidance. That file is the authoritative reference for what Disco can
do — this install doc only covers getting it running.

The installer already symlinked `skill.md` into `~/.claude/skills/disco`
and `~/.codex/skills/disco`, so Claude Code and Codex CLI will pick it
up automatically on their next session start. Nothing else to
register.

## Common next steps

After install, most users want to set up one or more of the following.
Each is documented in `skill.md`:

- **Add a frequent passenger to the roster** — `disco passenger add`,
  `disco passenger passport`, `disco passenger address`. Necessary
  before you can use trip sheets for international operations.
- **Create a trip sheet** — `disco trip create --type international`
  for any flight requiring eAPIS, customs handlers, or General
  Declarations. Then `disco trip check` to see the paperwork punch
  list.
- **Set a default aircraft** — `disco aircraft default N78ZG`.
- **Plan a chain of flights** — See the "Interpreting chain intent"
  section of `skill.md` for parsing `KASE KRVS KISM KMTH` as adjacent
  legs.

## Troubleshooting

### "disco: command not found"

`~/.local/bin` isn't on the PATH. Run:

```bash
export PATH="$HOME/.local/bin:$PATH"
```

and add that line to the user's shell profile (`~/.zshrc`, `~/.bashrc`,
or equivalent).

### API returns 401 / Unauthorized

The saved key is wrong or corrupted. Read `~/.disco/config.json` and
compare to what the user provided. Re-run `disco setup --api-key` with a
clean value.

### Non-ASCII characters in the saved key

The key was corrupted during paste. This should not happen with
`disco setup --api-key "<value>"`, but if it does, ask the user to
re-provide the key and save it again.

### Registration failed for Claude Code / Codex CLI

Rerun the manual registration commands in Step 5. The paths and URLs
there are stable.
