Metadata-Version: 2.5
Name: claude-command-center
Version: 0.2.0
Summary: Multi-project terminal command center for Claude Code background agents
Project-URL: Homepage, https://github.com/RatulSikder97/claude-command-center
Project-URL: Issues, https://github.com/RatulSikder97/claude-command-center/issues
Project-URL: Changelog, https://github.com/RatulSikder97/claude-command-center/blob/main/CHANGELOG.md
Author: Ratul Sikder
License: MIT
License-File: LICENSE
Keywords: ai-agents,claude,claude-code,dashboard,developer-tools,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">

# ◆ Claude Command Center

**Mission control for Claude Code: run, watch and steer background agents across all your projects from one terminal.**

[![CI](https://github.com/RatulSikder97/claude-command-center/actions/workflows/ci.yml/badge.svg)](https://github.com/RatulSikder97/claude-command-center/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/claude-command-center.svg)](https://pypi.org/project/claude-command-center/)
[![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="claude-center demo: dashboard, live logs, task queue, new agent, command palette" width="100%">

`pipx install claude-command-center` · `claude-center --demo`

</div>

---

You've got Claude Code agents running in four repos. 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.

**claude-center** 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.
- ↻ **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.
- 🏢 **Office ≠ personal.** Per-environment `CLAUDE_CONFIG_DIR` keeps your accounts and projects separate.
- 🔒 **Safe by design.** It never passes bypass flags or approves anything for you, and it redacts secrets from logs and diffs.

It uses your existing Claude Code login (subscription or API) through the
public `claude` CLI. No extra API key, 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/tasks.png" alt="Task queues"><br><sub><b>Task queues</b>: priorities, retry, pause</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 claude-command-center        # or: uv tool install claude-command-center
claude-center doctor                      # checks Python, git, the claude CLI
claude-center --demo                      # try it with simulated agents
claude-center                             # 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/claude-command-center
cd claude-command-center && ./install.sh   # uv tool → pipx → private venv
```
</details>

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

```bash
claude-center add-project ~/code/api --group office --test-command "npm test"
claude-center 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+P` | Command palette | | |
| `1`–`5` | Dashboard · Projects · Sessions · Tasks · Settings | `?` | Help |

Every key can be rebound in `~/.config/claude-center/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 claude-center 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. |
| 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 claude-center.

## Configuration

`~/.config/claude-center/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
```

## 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 claude-center 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>Claude Command Center is an independent community project and is not affiliated with or endorsed by Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic, PBC.</sub>
