tony1223/better-agent-terminal
Multi-workspace terminal aggregator with Claude Code AI integration
Better Agent Terminal – What It Is
Better Agent Terminal (BAT) is a desktop application that lets you run many command‑line terminals side‑by‑side while also chatting with AI coding assistants (Claude Code and OpenAI Codex). It’s built with Tauri 2 (a Rust‑backed native wrapper) and a React + TypeScript UI, so it works on Windows, macOS and Linux.
Core Idea
- One window, many workspaces – each workspace is tied to a project folder and can hold several terminals, a file browser, a Git viewer, and an AI‑agent panel.
- AI agents are first‑class – the app embeds the Anthropic Claude Code SDK and an optional OpenAI Codex SDK, letting you ask the model to edit files, run commands, or generate code without leaving the terminal.
- Everything stays local – the host layer is Rust, the UI is a webview, and only a tiny Node side‑car is used for SDKs that haven’t been ported to Rust yet.
Key Features (Plain‑English)
Workspace Management
- Multi‑workspace: Keep separate projects open in the same app.
- Drag‑and‑drop to reorder or group workspaces.
- Profiles: Save a set of workspaces (local or remote) and switch between them.
- Detachable windows: Pop a workspace out into its own window.
- Per‑workspace env vars and activity dots that show which terminals are still running.
Terminal & Tools
- xterm.js‑based terminals with full Unicode support.
- Split‑panel layout – a big main terminal plus a thumbnail strip of all terminals.
- Agent presets – open a terminal that is already wired to Claude Code, Claude Code (worktree), Codex, or a plain shell.
- Git worktree isolation – the AI can work in a temporary Git worktree so it never harms your main code.
- Snippet manager – store reusable code snippets (SQLite‑backed).
- Markdown preview – live preview of
.mdfiles. - Procfile‑style worker panel – run several processes defined in a Procfile and see combined logs.
Claude Code Agent Panel
- Runs the Claude Code model inside the app (no external terminal needed).
- Streaming output with collapsible “thinking blocks”.
- Permission modes – from prompting for every tool use to fully auto‑approving edits.
- Session handling – pause/resume, fork a conversation, auto‑compact context when token limits are hit.
- Rich status bar showing session ID, Git branch, token count, cost, API‑rate‑limit usage, etc.
- Cache awareness – shows how many cached tokens are being reused and warns when large caches expire.
- Slash commands (
/model,/resume,/auto‑continue, …) let you control the agent from the chat box.
Codex Agent (Optional)
- Uses the
@openai/codex-sdk. - Supports several OpenAI models (GPT‑5.5, 5.4, 5.3‑codex, o4‑mini, o3, GPT‑4.1).
- Same sandbox/worktree isolation and approval policies as Claude.
- Session transcripts are stored locally for fast resume.
Semantic Code Navigation (optional)
- Integrates the
cxCLI (tree‑sitter based) so the agent can ask for a quick file overview, symbol list, definitions, or references instead of loading whole files. This saves token budget on large codebases.
Internationalisation
- UI available in English, Traditional Chinese, and Simplified Chinese.
How to Get It
| Platform | Install method |
|---|---|
| macOS | brew install --cask tonyq-org/tap/better-agent-terminal |
| Windows | (planned) choco install better-agent-terminal |
| Linux | Download the .AppImage (x86_64 or arm64) from the GitHub releases page. |
| All | Run the one‑line quick‑install script: curl -fsSL https://raw.githubusercontent.com/tony1223/better-agent-terminal/main/install.sh | bash |
You can also build from source with Node 18+, Rust stable, and the usual Tauri build tools.
Architecture at a Glance
better-agent-terminal/
├─ renderer/ # React UI (TypeScript)
│ └─ components/ … # Workspaces, terminals, agent panels, etc.
├─ src-tauri/ # Rust host – PTY handling, IPC, remote server
├─ node-sidecar/ # Small Node process for SDKs not yet in Rust
├─ assets/ # Icons & screenshots
└─ package.json
- Frontend: React 18 + Vite + i18next.
- Terminal:
xterm.js+node-pty. - AI back‑ends:
@anthropic-ai/claude-agent-sdk(Claude) and@openai/codex-sdk(Codex). - Storage:
better-sqlite3for snippets and session data. - Remote control: Experimental WebSocket server (port 9876) that lets other BAT instances or mobile apps connect via QR code.
Who Might Use It?
- Developers who want a single window to run build/watch commands, view Git history, and ask an LLM to edit code.
- Teams that need a reproducible workspace layout (profiles) across machines.
- Power users who like keyboard‑driven shortcuts and want fine‑grained control over LLM tool permissions.
- Mobile‑first workers – a companion mobile app can connect to a desktop BAT instance for remote control.
Quick‑Start Checklist
- Install the app (brew, AppImage, or script).
- Open the app and create a workspace pointing at a project folder.
- Open a terminal in that workspace and select Claude Code (or Codex) from the Agent preset list.
- Type a prompt like
Create a React component that fetches data from /api/items. - Watch the model edit files, run commands, or ask for clarification – all inside the same window.
Bottom Line
Better Agent Terminal is a full‑featured, cross‑platform terminal manager that tightly integrates LLM coding assistants. It gives you the convenience of an IDE‑style layout while keeping the raw power of a terminal, and it lets you control how much autonomy the AI has over your codebase.
Related
- Project
- Project
- Project
- Project
- Project