CLI Agents
ADHDev supports standalone CLI-based AI agents like Gemini CLI, Claude Code, and Codex CLI. These agents run in a terminal (PTY) managed by the daemon, and you can interact with them from the dashboard.
Supported CLI Agents
| Agent | Command | Description |
|---|---|---|
| Gemini CLI | adhdev launch gemini | Google's Gemini AI in terminal |
| Claude Code | adhdev launch claude | Anthropic's Claude coding agent |
| Codex CLI | adhdev launch codex | OpenAI's Codex terminal agent |
Launching a CLI Agent
bash
# Start a Gemini CLI session
adhdev launch gemini
# Start a Claude Code session
adhdev launch claude
# Start a Codex CLI session
adhdev launch codexThe daemon spawns the CLI process with a PTY (pseudo-terminal), streams the output to the dashboard, and forwards your input back to the process.
WARNING
Each CLI tool handles its own authentication. Make sure you've set up API keys for the CLI agent before launching (e.g., GEMINI_API_KEY, ANTHROPIC_API_KEY).
Terminal View
CLI agents appear in the dashboard with a full interactive terminal (powered by xterm.js):
- Full TUI rendering — colors, cursor positioning, progress bars all work
- Input — type directly in the terminal from the dashboard
- Scrollback — scroll up to see previous output
- Reconnect — if P2P disconnects and reconnects, scrollback buffer is restored
ACP vs CLI
| Feature | CLI Agent (PTY) | ACP Agent (stdio) |
|---|---|---|
| Interface | Full terminal view | Chat-style messages |
| Rendering | xterm.js (TUI) | Markdown |
| Input method | Terminal typing | Chat input box |
| Use case | Interactive terminal tools | Structured agent protocol |
Troubleshooting
Agent doesn't launch
- Verify the CLI tool is installed (
gemini --version,claude --version) - Check that API keys are configured
- Look at daemon logs:
adhdev status
Terminal is blank
- The agent may be waiting for input — try typing a prompt
- Check P2P connection status (green dot = connected)
Output is garbled
- Resize the terminal window (the daemon adapts to terminal size changes)
- Try refreshing the dashboard page
Next Steps
- ACP Agents → — chat-style agents via Agent Client Protocol
- Dashboard → — dashboard basics
