Metadata-Version: 2.5
Name: fleetdeck
Version: 0.3.1
Summary: Terminal mission control for coding agents: run, watch and steer Claude Code and Codex agents across all your projects
Project-URL: Homepage, https://github.com/RatulSikder97/fleetdeck
Project-URL: Issues, https://github.com/RatulSikder97/fleetdeck/issues
Project-URL: Changelog, https://github.com/RatulSikder97/fleetdeck/blob/main/CHANGELOG.md
Author: Ratul Sikder
License: MIT
License-File: LICENSE
Keywords: ai-agents,chatgpt,claude,claude-code,codex,dashboard,developer-tools,openai,terminal,textual,tui
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console :: Curses
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Terminals
Requires-Python: >=3.12
Requires-Dist: pyte>=0.8.2
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.7
Requires-Dist: textual<9,>=8.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

<div align="center">

# ◆ FleetDeck

**Mission control for coding agents: run, watch and steer Claude Code and Codex (ChatGPT) agents, across all your projects and accounts, from one terminal.**

[![CI](https://github.com/RatulSikder97/fleetdeck/actions/workflows/ci.yml/badge.svg)](https://github.com/RatulSikder97/fleetdeck/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/fleetdeck.svg)](https://pypi.org/project/fleetdeck/)
[![Python](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

<img src="docs/images/demo.gif" alt="fleetdeck demo: dashboard, live logs, task queue, new agent, command palette" width="100%">

`pipx install fleetdeck` · `fleetdeck --demo`

</div>

---

You've got coding agents running in four repos, maybe on two Claude accounts
and ChatGPT. One is waiting on a permission prompt, one finished ten minutes
ago, one failed, and you don't know which, because each one lives in a
different terminal tab.

**fleetdeck** puts them all in one keyboard-driven dashboard:

- 🟠 **See who needs you.** Agents waiting on a permission prompt or your input sort to the top and trigger a notification.
- ⏎ **Jump in instantly.** `Enter` attaches to the agent's real Claude Code session; `←` brings you back.
- ❯ **Terminal for every agent.** `Ctrl+T` opens a real shell in the selected agent's directory (or worktree) right inside the dashboard; `Ctrl+]` jumps back.
- ↻ **Follow up without attaching.** Press `m` on a finished agent, type the next instruction, and it continues the same conversation in the background.
- 📋 **Queue work.** Per-project task queues with priorities, templates and a concurrency cap. The dispatcher starts agents as slots free up.
- ⛓ **Chain tasks.** "Run B after A" starts B only once A completes; if A fails, B is cancelled.
- 🌳 **No collisions.** A second agent in the same repo automatically gets its own git worktree.
- 👥 **Every account, one screen.** Connect several Claude Code logins and ChatGPT (via Codex CLI). Switch the active account with `Ctrl+A`, pick one per project or per agent, and filter by account in the sidebar.
- ◎ **Codex too.** Launch, follow up, attach, stop and read logs for Codex agents, with real token counts.
- 🔒 **Safe by design.** It never passes bypass flags or approves anything for you, and it redacts secrets from logs and diffs.

It uses the logins you already have (Claude subscription or API, ChatGPT)
through the public `claude` and `codex` CLIs. No extra API keys, no scraping of
private files.

<table>
<tr>
<td><img src="docs/images/dashboard.png" alt="Dashboard"><br><sub><b>Dashboard</b>: projects, agents, details</sub></td>
<td><img src="docs/images/logs-panel.png" alt="Live logs"><br><sub><b>Live logs</b>: preview with Space</sub></td>
</tr>
<tr>
<td><img src="docs/images/terminal.png" alt="Terminal"><br><sub><b>Terminal</b>: a shell in the agent's directory</sub></td>
<td><img src="docs/images/new-agent.png" alt="New agent"><br><sub><b>New agent</b>: templates, model, plan mode, worktree</sub></td>
</tr>
</table>

## Install

```bash
pipx install fleetdeck        # or: uv tool install fleetdeck
fleetdeck doctor                      # checks Python, git, the claude CLI
fleetdeck --demo                      # try it with simulated agents
fleetdeck                             # the real thing
```

Requires Python 3.12+, git, and [Claude Code](https://docs.claude.com/en/docs/claude-code)
2.1+ (it uses `claude agents`, `--bg` and `attach`). Works on macOS and Linux.

<details>
<summary>From source</summary>

```bash
git clone https://github.com/RatulSikder97/fleetdeck
cd fleetdeck && ./install.sh   # uv tool → pipx → private venv
```
</details>

Register projects with `p` in the app, or from the shell:

```bash
fleetdeck add-project ~/code/api --group office --test-command "npm test"
fleetdeck add-project ~/code/side-project
```

## Keys

| Key | Action | Key | Action |
|---|---|---|---|
| `n` | New agent | `a` | Queue a task |
| `Enter` | Attach to agent | `Space` | Preview live logs |
| `l` | Full-screen logs | `d` | Git diff |
| `s` | Stop (asks first) | `r` | Restart (`claude respawn`) |
| `f` `/` | Filter | `t` | Pin project |
| `p` | Add project | `x` | Run project tests |
| `m` | Follow up on a finished agent | `z` | Pause / resume dispatch |
| `Ctrl+T` | Terminal in the agent's directory (`Ctrl+]` leaves) | `←` `→` | Move between Projects · Agents · Details |
| `[` `]` | Narrow / widen Details (or drag its edge) | `{` `}` | Narrow / widen Projects |
| `\` | Zoom Details to full width | | |
| `Ctrl+P` | Command palette | | |
| `1`–`5` | Dashboard · Projects · Sessions · Tasks · Settings | `?` | Help |

Every key can be rebound in `~/.config/fleetdeck/config.yaml`.
Double-click a row to attach.

## Status colours (only what Claude Code reports)

| | Status | From `claude agents --json` |
|---|---|---|
| 🟢 | Running | `state: working` / `status: busy` |
| 🟡 | Waiting for input | `waitingFor: input needed / dialog open` |
| 🟠 | Permission required | `waitingFor: permission prompt / sandbox request / worker request` |
| 🟣 | Planning | working **and** launched by fleetdeck in plan mode |
| 🔵 | Completed | `state: done` |
| 🔴 | Failed | `state: failed` |
| ⚪ | Idle / Stopped | `status: idle` / `state: stopped` |

No made-up progress bars or token counters. If the CLI doesn't report a
value, the dashboard shows `—`.

## How it works

```
claude agents --json --all ──► Monitor ──► status + project + git branch ──► UI
                                  │
task queue (SQLite) ──► Dispatcher ──► claude --bg --name … [--worktree] <prompt>
                                  │
Enter ──► claude attach <id>   (TUI suspends, you talk to Claude, ← returns)
```

| Purpose | Command |
|---|---|
| Discover / monitor | `claude agents --json --all` (polled, single-flight) |
| Launch | `claude --bg --name … [--model] [--permission-mode] [--worktree] [--append-system-prompt] <prompt>`, run in the project's directory |
| Follow up | `claude stop <id>`, then wait for the process to exit, then `claude --bg --resume <session> <prompt>`. Resuming a live session would fork a copy, so it continues in place instead. |
| Codex | `codex exec --json -s read-only\|workspace-write <prompt>` (detached, events logged to a file), follow-up with `codex exec … resume <thread> <prompt>`, attach with `codex resume <thread>`. Bypass flags and `danger-full-access` are never used. |
| Logs | `claude logs <id>`, replayed through a VT emulator so it reads like the terminal |
| Control | `claude stop` / `respawn` / `rm <id>`, each with a confirmation dialog |

Quitting the dashboard leaves every agent running; they belong to Claude
Code, not to fleetdeck.

## Configuration

`~/.config/fleetdeck/config.yaml` controls:

- theme
- refresh interval
- max concurrent agents (default 4)
- default model and permission mode
- worktree policy
- notifications (toast, bell, desktop)
- environments
- key bindings

See [`config.sample.yaml`](config.sample.yaml) for every key with defaults.

```yaml
environments:
  office:
    env:
      CLAUDE_CONFIG_DIR: ~/.claude-office   # separate account for work projects
```

## Accounts

**In the app:** press `Ctrl+A` (or pick **+ add account** in the sidebar) and choose
**Add account**. Pick Claude Code or Codex (ChatGPT), give it a name, and
FleetDeck:

1. installs the CLI if it's missing, using the vendor's official installer.
   It shows you the exact command and asks first, and never uses sudo;
2. hands your terminal to the CLI's own sign-in (`claude auth login` /
   `codex login`), using a separate config folder for that account;
3. checks the sign-in worked, then saves the account and starts showing its agents.

In the switcher, `l` signs an account in again and `Del` removes it from FleetDeck
(it stays signed in on disk).

**Switch your terminals too.** Run this once (or press `i` in the switcher):

```bash
fleetdeck shell-setup        # adds 3 guarded lines to ~/.zshrc or ~/.bashrc (backup first)
```

From then on, choosing an account (`Ctrl+A` → Enter, or `fleetdeck use work`)
also switches plain `claude` / `codex` in **every open terminal** from its next
prompt. `fleetdeck use` shows the current choice. Terminals started with their
own `CLAUDE_CONFIG_DIR` / `CODEX_HOME` stay on that account. Tokens are never
written to files. Undo with `fleetdeck shell-setup --uninstall`.

**Manage accounts.** In the sidebar's Accounts group, a click filters the agent
list; press Enter on an account (or click it again) to manage it: use it as the
active account, sign in again, **sign out** (runs the CLI's own `claude auth
logout` / `codex logout` for that account's folder only), show only its agents,
or remove it from FleetDeck. "⚙ manage accounts" (or `Ctrl+A` with no project
selected) lists them all; there `o` signs out, `l` signs in, `del` removes.
Token accounts can't be signed out by a CLI: revoke the token in your account
settings and delete its Keychain item yourself.

**Per project.** Select a project (sidebar, Projects view, or one of its agents)
and press `u` to choose its account. Its agents launch on that account, the
sidebar shows a badge (`◆work`), and inside the project's folder plain
`claude` / `codex` use it automatically. Leave the folder and your global choice
applies again. "Follow the active account" undoes it.

**From the shell:**

```bash
fleetdeck accounts --discover          # finds ~/.claude-* and ~/.codex-* logins
fleetdeck accounts --discover --save   # adds the signed-in ones to config.yaml
```

```yaml
accounts:
  - {name: personal, provider: claude}                       # your default login
  - {name: work, provider: claude, home: ~/.claude-work}     # CLAUDE_CONFIG_DIR
  - name: b                                                  # setup-token login
    provider: claude
    home: ~/.claude-b
    token_keychain: claude-account-b   # macOS Keychain item; read at runtime only
  - {name: chatgpt, provider: codex}                         # Codex CLI / ChatGPT
active_account: personal
```

With no `accounts:` section, FleetDeck uses your default Claude login, plus
ChatGPT via Codex if `codex` is installed. Each project can set a default
account, and the new-agent form lets you pick per launch. Tokens are never
written to config, the database or logs.

Codex has no machine-readable session list, so FleetDeck shows the Codex runs
it started itself (they keep running if you quit). Non-interactive Codex can't
ask for approvals, so its sandbox bounds it: plan mode is read-only, everything
else is workspace-write.

## FAQ

**Does it need an Anthropic API key?** No. It drives the `claude` CLI you
already use, so whatever login Claude Code has, it uses.

**Can it approve permission prompts for me?** No, by design. Press `Enter`
to attach and answer the prompt in Claude Code itself.

**Where's token usage or cost?** The CLI doesn't expose it in a structured
way, and fleetdeck won't guess.

**Ctrl+1…5 don't work.** Most terminals don't send those keys. Use `1`–`5`.

More in [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md).

## Contributing

PRs welcome; see [CONTRIBUTING.md](CONTRIBUTING.md). The test suite (unit,
integration against a fake `claude` binary, and headless UI tests) runs in
about 35 seconds without Claude Code installed.

## License

MIT © Ratul Sikder

<sub>FleetDeck is an independent community project and is not affiliated with or endorsed by Anthropic or OpenAI. "Claude" and "Claude Code" are trademarks of Anthropic, PBC; "ChatGPT" and "Codex" are trademarks of OpenAI.</sub>
