Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/cli/src/shared/agent-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ async function setupCursorConfig(runner: CloudRunner, _apiKey: string): Promise<
// Spawn rule should be world-readable (not sensitive)
await runner.runServer("chmod 644 ~/.cursor/rules/spawn.mdc");

// Persist PATH so agent binary is available
// Persist PATH so agent binary is available (cursor installs to ~/.local/bin since 2026-03-25)
const pathScript = [
'grep -q ".cursor/bin" ~/.bashrc 2>/dev/null || printf \'\\nexport PATH="$HOME/.cursor/bin:$PATH"\\n\' >> ~/.bashrc',
'grep -q ".cursor/bin" ~/.zshrc 2>/dev/null || printf \'\\nexport PATH="$HOME/.cursor/bin:$PATH"\\n\' >> ~/.zshrc',
'grep -q ".local/bin" ~/.bashrc 2>/dev/null || printf \'\\nexport PATH="$HOME/.local/bin:$PATH"\\n\' >> ~/.bashrc',
'grep -q ".local/bin" ~/.zshrc 2>/dev/null || printf \'\\nexport PATH="$HOME/.local/bin:$PATH"\\n\' >> ~/.zshrc',
].join(" && ");

await runner.runServer(pathScript);
Expand Down Expand Up @@ -1175,7 +1175,7 @@ function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
runner,
"Cursor CLI",
"curl https://cursor.com/install -fsS | bash && " +
'export PATH="$HOME/.cursor/bin:$PATH" && ' +
'export PATH="$HOME/.local/bin:$PATH" && ' +
"agent --version",
),
envVars: (apiKey) => [
Expand All @@ -1184,8 +1184,8 @@ function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
],
configure: (apiKey) => setupCursorConfig(runner, apiKey),
launchCmd: () =>
'source ~/.spawnrc 2>/dev/null; export PATH="$HOME/.cursor/bin:$PATH"; agent --endpoint https://openrouter.ai/api/v1',
updateCmd: 'export PATH="$HOME/.cursor/bin:$PATH"; agent update',
'source ~/.spawnrc 2>/dev/null; export PATH="$HOME/.local/bin:$PATH"; agent --endpoint https://openrouter.ai/api/v1',
updateCmd: 'export PATH="$HOME/.local/bin:$PATH"; agent update',
},
};
}
Expand Down
4 changes: 2 additions & 2 deletions sh/e2e/lib/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,9 @@ verify_cursor() {
local app="$1"
local failures=0

# Binary check — cursor installs to ~/.cursor/bin/agent
# Binary check — cursor installs to ~/.local/bin/agent (since 2026-03-25)
log_step "Checking cursor binary..."
if cloud_exec "${app}" "PATH=\$HOME/.cursor/bin:\$HOME/.bun/bin:\$PATH command -v agent" >/dev/null 2>&1; then
if cloud_exec "${app}" "PATH=\$HOME/.local/bin:\$HOME/.cursor/bin:\$HOME/.bun/bin:\$PATH command -v agent" >/dev/null 2>&1; then
log_ok "cursor (agent) binary found"
else
log_err "cursor (agent) binary not found"
Expand Down
Loading