Tool📅 Updated 2024-01-18

Agent of Empires

Claude Code, OpenCode Coding Agent Terminal Session manager via TMUX and Git Worktrees

session-managementai-workflowdevelopment-toolsterminaltmuxcli
323
Stars
njbrake
Author

Agent of Empires (aoe) is a terminal session manager for Linux and macOS using tmux to aid in management and monitoring of AI coding agents, written in Rust.

功能特点

  • Git worktree management - Easily handle parallel agents in one codebase
  • Docker sandboxing - Sandbox your agents in docker containers
  • TUI & CLI - Interact via either terminal UI or command line
  • Automatic cleanup - Cleans up worktrees and sandboxes after sessions
  • Status detection - Automatically detects Claude Code and OpenCode status

前置要求

  • tmux (required)
  • Docker (optional, for sandboxing)

快速开始

安装

Quick install (Linux & macOS):

curl -fsSL \\
  https://raw.githubusercontent.com/njbrake/agent-of-empires/main/scripts/install.sh \\
  | bash

Homebrew:

brew install njbrake/aoe/aoe

Build from source:

git clone https://github.com/njbrake/agent-of-empires
cd agent-of-empires
cargo build --release

使用

启动TUI界面:

aoe

或直接从CLI添加会话:

aoe add /path/to/project

核心特性

TUI Dashboard

Visual interface to manage all your AI coding sessions

Session Management

Create, attach, detach, and delete sessions easily

Group Organization

Organize sessions into hierarchical folders

Multi-profile Support

Separate workspaces for different projects:

aoe                  # Uses "default" profile
aoe -p work         # Uses "work" profile
aoe -p client-xyz   # Uses "client-xyz" profile

Configuration

Configuration is stored in ~/.agent-of-empires/:

~/.agent-of-empires/
├── config.toml           # Global configuration
├── profiles/
│   └── default/
│       ├── sessions.json # Session data
│       └── groups.json   # Group structure
└── logs/                 # Session logs

tmux集成

aoe is a wrapper around tmux. Once you attach to a session, you're working directly in tmux.

Basic tmux commands:

  • Ctrl+b d - Detach from session (return to Agent of Empires)
  • Ctrl+b [ - Enter scroll/copy mode
  • Ctrl+b n / Ctrl+b p - Next/previous window

Important: With Claude Code you'll need to enter scroll mode (Ctrl+b [) in order to scroll up in the window.

常见问题

What happens when I close aoe?

Nothing! Your sessions keep running as tmux sessions. You can freely open and close aoe, and your sessions will be there when you come back.

Using with mobile SSH clients

If connecting via SSH from a mobile app like Termius, run aoe inside a tmux session:

tmux new-session -s main
aoe

When attaching to an agent session, use Ctrl+b L to switch back to aoe.

相关资源