Skip to content

Commit 2129611

Browse files
committed
add cursor cli
1 parent 07666c5 commit 2129611

11 files changed

Lines changed: 36 additions & 24 deletions

File tree

docker/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# aoe-sandbox: Docker image for Agent of Empires sandbox sessions
2-
# This image provides Claude Code, OpenCode, Mistral Vibe, Codex CLI, and Gemini CLI in an isolated environment
2+
# This image provides Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, and Cursor CLI in an isolated environment
33

44
FROM ubuntu:24.04
55

@@ -47,13 +47,17 @@ RUN npm install -g @google/gemini-cli
4747
RUN curl -LsSf https://mistral.ai/vibe/install.sh | bash
4848
ENV PATH="/root/.vibe/bin:${PATH}"
4949

50+
# Install Cursor CLI
51+
RUN curl -fsSL https://cursor.com/install | bash
52+
5053
# Create directories for credential mounts
5154
RUN mkdir -p /root/.claude \
5255
/root/.config/opencode \
5356
/root/.local/share/opencode \
5457
/root/.vibe \
5558
/root/.codex \
5659
/root/.gemini \
60+
/root/.cursor \
5761
/root/.ssh
5862

5963
# Allow Claude Code to use --dangerously-skip-permissions as root

docs/guides/sandbox.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ AOE provides two official sandbox images:
188188

189189
| Image | Description |
190190
|-------|-------------|
191-
| `ghcr.io/njbrake/aoe-sandbox:latest` | Base image with Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, git, ripgrep, fzf |
191+
| `ghcr.io/njbrake/aoe-sandbox:latest` | Base image with Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, Cursor CLI, git, ripgrep, fzf |
192192
| `ghcr.io/njbrake/aoe-dev-sandbox:latest` | Extended image with additional dev tools |
193193

194194
### Dev Sandbox Tools
@@ -213,7 +213,7 @@ default_image = "ghcr.io/njbrake/aoe-dev-sandbox:latest"
213213

214214
## Custom Docker Images
215215

216-
The default sandbox image includes Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, git, and basic development tools. For projects requiring additional dependencies beyond what the dev sandbox provides, you can extend either base image.
216+
The default sandbox image includes Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, Cursor CLI, git, and basic development tools. For projects requiring additional dependencies beyond what the dev sandbox provides, you can extend either base image.
217217

218218
### Step 1: Create a Dockerfile
219219

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ AoE lets you run multiple AI agents in parallel -- each in its own tmux session,
1010

1111
## Why AoE?
1212

13-
**The problem:** You're working with AI coding agents (Claude Code, OpenCode, Codex, etc.) and want to run several in parallel across different tasks or branches. Managing multiple terminal windows, git branches, and container lifecycles by hand gets tedious fast.
13+
**The problem:** You're working with AI coding agents (Claude Code, OpenCode, Cursor, Codex, etc.) and want to run several in parallel across different tasks or branches. Managing multiple terminal windows, git branches, and container lifecycles by hand gets tedious fast.
1414

1515
**AoE handles it for you:**
1616

@@ -22,7 +22,7 @@ AoE lets you run multiple AI agents in parallel -- each in its own tmux session,
2222

2323
## Supported Agents
2424

25-
Claude Code, OpenCode, Mistral Vibe, Codex CLI, and Gemini CLI. AoE auto-detects which are installed.
25+
Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, and Cursor CLI. AoE auto-detects which are installed.
2626

2727
<div class="cta-box">
2828
<p><strong>Ready to get started?</strong></p>

src/agents.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ pub const AGENTS: &[AgentDef] = &[
113113
AgentDef {
114114
name: "cursor",
115115
binary: "agent",
116-
aliases: &[],
117-
detection: DetectionMethod::RunWithArg("agent", "--version"),
118-
yolo: Some(YoloMode::CliFlag("--force")),
119-
instruction_flag: Some("--append-system-prompt {}"),
116+
aliases: &["agent"],
117+
detection: DetectionMethod::Which("agent"),
118+
yolo: Some(YoloMode::CliFlag("--yolo")),
119+
instruction_flag: None,
120120
set_default_command: false,
121121
supports_host_launch: true,
122122
detect_status: status_detection::detect_cursor_status,
@@ -212,8 +212,8 @@ mod tests {
212212
assert_eq!(resolve_tool_name("gemini"), Some("gemini"));
213213
assert_eq!(resolve_tool_name("cursor"), Some("cursor"));
214214
assert_eq!(resolve_tool_name(""), Some("claude"));
215+
assert_eq!(resolve_tool_name("agent"), Some("cursor"));
215216
assert_eq!(resolve_tool_name("unknown-tool"), None);
216-
assert_eq!(resolve_tool_name("agent"), None);
217217
}
218218

219219
#[test]

src/cli/add.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,14 @@ pub async fn run(profile: &str, args: AddArgs) -> Result<()> {
167167
}
168168

169169
if let Some(cmd) = &args.command {
170-
instance.command = cmd.clone();
171-
instance.tool = detect_tool(cmd)?;
170+
let tool_name = detect_tool(cmd)?;
171+
instance.tool = tool_name;
172+
// Only store a custom command when the user passed extra args
173+
// (e.g. "claude --resume xyz"). A bare tool name/alias should resolve
174+
// through the agent definition so the correct binary is used.
175+
if cmd.trim().contains(' ') {
176+
instance.command = cmd.clone();
177+
}
172178
}
173179

174180
if let Some(worktree_info) = worktree_info_opt {

website/src/pages/docs/cli/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This document contains the help content for the `aoe` command-line program.
4747

4848
## `aoe`
4949

50-
Agent of Empires (aoe) is a terminal session manager that uses tmux to help you manage and monitor AI coding agents like Claude Code and OpenCode.
50+
Agent of Empires (aoe) is a terminal session manager that uses tmux to help you manage and monitor AI coding agents like Claude Code, OpenCode, and Cursor CLI.
5151

5252
Run without arguments to launch the TUI dashboard.
5353

@@ -91,7 +91,7 @@ Add a new session
9191

9292
* `-t`, `--title <TITLE>` -- Session title (defaults to folder name)
9393
* `-g`, `--group <GROUP>` -- Group path (defaults to parent folder)
94-
* `-c`, `--cmd <COMMAND>` -- Command to run (e.g., 'claude', 'opencode', 'vibe', 'codex', 'gemini')
94+
* `-c`, `--cmd <COMMAND>` -- Command to run (e.g., 'claude', 'opencode', 'vibe', 'codex', 'gemini', 'cursor')
9595
* `-P`, `--parent <PARENT>` -- Parent session (creates sub-session, inherits group)
9696
* `-l`, `--launch` -- Launch the session immediately after creating
9797
* `-w`, `--worktree <WORKTREE_BRANCH>` -- Create session in a git worktree for the specified branch

website/src/pages/docs/guides/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ All settings below can also be edited from the TUI settings screen (press `s` or
4545

4646
```toml
4747
[session]
48-
default_tool = "claude" # claude, opencode, vibe, codex, gemini
48+
default_tool = "claude" # claude, opencode, vibe, codex, gemini, cursor
4949
yolo_mode_default = false
5050
```
5151

website/src/pages/docs/guides/repo-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ For sandboxed sessions, hooks run inside the Docker container.
4444
default_tool = "opencode" # Override the default agent for this repo
4545
```
4646

47-
Available tools: `claude`, `opencode`, `vibe`, `codex`, `gemini`.
47+
Available tools: `claude`, `opencode`, `vibe`, `codex`, `gemini`, `cursor`.
4848

4949
### Sandbox
5050

website/src/pages/docs/guides/sandbox.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Run AI coding agents in isolated Docker containers with Agent of Em
66

77
## Overview
88

9-
Docker sandboxing runs your AI coding agents (Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI) inside isolated Docker containers while maintaining access to your project files and credentials.
9+
Docker sandboxing runs your AI coding agents (Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, Cursor CLI) inside isolated Docker containers while maintaining access to your project files and credentials.
1010

1111
**Key Features:**
1212
- One container per session
@@ -88,11 +88,11 @@ environment = ["ANTHROPIC_API_KEY"]
8888

8989
### Shared Agent Config Directories
9090

91-
AOE shares your host agent credentials with sandboxed containers so agents can authenticate without re-login. This works for all supported agents: Claude Code, OpenCode, Codex, Gemini, and Vibe.
91+
AOE shares your host agent credentials with sandboxed containers so agents can authenticate without re-login. This works for all supported agents: Claude Code, OpenCode, Codex, Gemini, Vibe, and Cursor.
9292

9393
Rather than bind-mounting your actual host config directories (which would let container writes modify your host files), AOE creates a **shared sandbox directory** per agent:
9494

95-
1. For each agent whose host config directory exists (e.g. `~/.claude/`, `~/.codex/`, `~/.gemini/`, `~/.local/share/opencode/`, `~/.vibe/`), AOE syncs credential files into a shared sandbox directory.
95+
1. For each agent whose host config directory exists (e.g. `~/.claude/`, `~/.codex/`, `~/.gemini/`, `~/.local/share/opencode/`, `~/.vibe/`, `~/.cursor/`), AOE syncs credential files into a shared sandbox directory.
9696
2. The sandbox directory is mounted read-write into **all** containers that use that agent.
9797
3. Containers can read credentials and write runtime state freely without affecting your host config.
9898
4. In-container changes (e.g. permission approvals, settings tweaks) persist across sessions since all containers share the same directory.
@@ -121,6 +121,7 @@ If an agent's config directory doesn't exist on the host (e.g. you haven't insta
121121
~/.gemini/sandbox/ # Gemini (shared by all containers)
122122
~/.local/share/opencode/sandbox/ # OpenCode (shared by all containers)
123123
~/.vibe/sandbox/ # Vibe (shared by all containers)
124+
~/.cursor/sandbox/ # Cursor (shared by all containers)
124125
```
125126

126127
Deleting an agent's config directory (e.g. `rm -rf ~/.codex/`) removes everything related to that agent, including the sandbox directory. To reset just the sandbox state for an agent, delete its `sandbox/` subdirectory (e.g. `rm -rf ~/.claude/sandbox/`) -- it will be re-created on the next session start.
@@ -141,7 +142,7 @@ Example: `aoe-sandbox-a1b2c3d4`
141142

142143
1. **Session Creation:** When you add a sandboxed session, aoe records the sandbox configuration
143144
2. **Container Start:** When you start the session, aoe creates/starts the Docker container with appropriate volume mounts
144-
3. **tmux + docker exec:** Host tmux runs `docker exec -it <container> <tool>` (claude, opencode, vibe, codex, or gemini)
145+
3. **tmux + docker exec:** Host tmux runs `docker exec -it <container> <tool>` (claude, opencode, vibe, codex, gemini, or cursor)
145146
4. **Cleanup:** When you remove the session, the container is automatically deleted
146147

147148

@@ -191,7 +192,7 @@ AOE provides two official sandbox images:
191192

192193
| Image | Description |
193194
|-------|-------------|
194-
| `ghcr.io/njbrake/aoe-sandbox:latest` | Base image with Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, git, ripgrep, fzf |
195+
| `ghcr.io/njbrake/aoe-sandbox:latest` | Base image with Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, Cursor CLI, git, ripgrep, fzf |
195196
| `ghcr.io/njbrake/aoe-dev-sandbox:latest` | Extended image with additional dev tools |
196197

197198
### Dev Sandbox Tools
@@ -216,7 +217,7 @@ default_image = "ghcr.io/njbrake/aoe-dev-sandbox:latest"
216217

217218
## Custom Docker Images
218219

219-
The default sandbox image includes Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, git, and basic development tools. For projects requiring additional dependencies beyond what the dev sandbox provides, you can extend either base image.
220+
The default sandbox image includes Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, Cursor CLI, git, and basic development tools. For projects requiring additional dependencies beyond what the dev sandbox provides, you can extend either base image.
220221

221222
### Step 1: Create a Dockerfile
222223

website/src/pages/docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ AoE lets you run multiple AI agents in parallel -- each in its own tmux session,
1414

1515
## Why AoE?
1616

17-
**The problem:** You're working with AI coding agents (Claude Code, OpenCode, Codex, etc.) and want to run several in parallel across different tasks or branches. Managing multiple terminal windows, git branches, and container lifecycles by hand gets tedious fast.
17+
**The problem:** You're working with AI coding agents (Claude Code, OpenCode, Cursor, Codex, etc.) and want to run several in parallel across different tasks or branches. Managing multiple terminal windows, git branches, and container lifecycles by hand gets tedious fast.
1818

1919
**AoE handles it for you:**
2020

@@ -26,4 +26,4 @@ AoE lets you run multiple AI agents in parallel -- each in its own tmux session,
2626

2727
## Supported Agents
2828

29-
Claude Code, OpenCode, Mistral Vibe, Codex CLI, and Gemini CLI. AoE auto-detects which are installed.
29+
Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI, and Cursor CLI. AoE auto-detects which are installed.

0 commit comments

Comments
 (0)