Skip to content

feat: add Cursor CLI as a first-class agent type#414

Open
aslakknutsen wants to merge 1 commit intokelos-dev:mainfrom
aslakknutsen:cursor
Open

feat: add Cursor CLI as a first-class agent type#414
aslakknutsen wants to merge 1 commit intokelos-dev:mainfrom
aslakknutsen:cursor

Conversation

@aslakknutsen
Copy link
Contributor

@aslakknutsen aslakknutsen commented Feb 22, 2026

Cursor CLI joins claude-code, codex, gemini, and opencode as a natively supported agent. The integration follows the standard agent image interface: Dockerfile with UID 61100, entrypoint that handles AXON_MODEL, AXON_AGENTS_MD, AXON_PLUGIN_DIR (copied into .cursor/skills/), and AXON_MCP_SERVERS (written to ~/.cursor/mcp.json).

Usage parsing reuses the claude-code stream-json parser since both CLIs use the same --output-format stream-json output structure.


Summary by cubic

Adds Cursor CLI as a first-class agent type (type: "cursor") with a native image and entrypoint. Tasks can now run Cursor in Kubernetes with token/cost capture and the standard Axon agent interface.

  • New Features

    • New cursor image and entrypoint: installs Cursor CLI, runs as UID 61100, supports AXON_MODEL, AXON_AGENTS_MD, AXON_PLUGIN_DIR (copied into .cursor/skills), and AXON_MCP_SERVERS (~/.cursor/mcp.json).
    • Controller/CRDs/CLI: added "cursor" enum, --cursor-image and pull-policy flags, install manifests wire defaults, shell completion updated, and CURSOR_API_KEY mapping for both api-key and oauth.
    • Usage capture: reuses the claude-code stream-json parser for token and cost metrics.
  • Migration

    • Store your Cursor token under CURSOR_API_KEY in the referenced Secret.
    • Set task.spec.type to "cursor"; optionally set task.spec.image or use --cursor-image to override the default.
    • Makefile now builds the cursor image; build and push if you maintain your own registry.

Written for commit 86500dd. Summary will update on new commits.

Cursor CLI joins claude-code, codex, gemini, and opencode as a
natively supported agent. The integration follows the standard
agent image interface: Dockerfile with UID 61100, entrypoint that
handles AXON_MODEL, AXON_AGENTS_MD, AXON_PLUGIN_DIR (copied into
.cursor/skills/), and AXON_MCP_SERVERS (written to ~/.cursor/mcp.json).

Usage parsing reuses the claude-code stream-json parser since both
CLIs use the same --output-format stream-json output structure.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Aslak Knutsen <aslak@4fs.no>
@github-actions github-actions bot added needs-kind Indicates an issue or PR lacks a kind/* label needs-triage needs-actor needs-priority labels Feb 22, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 17 files

USER agent

# Cursor CLI installs to ~/.local/bin
RUN curl -fsSL https://cursor.com/install | bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we pin the cursor to a specific version? so that it will not be siliently updated?

if [ -n "${AXON_AGENTS_MD:-}" ]; then
mkdir -p ~/.cursor
printf '%s' "$AXON_AGENTS_MD" >~/.cursor/AGENTS.md
printf '%s' "$AXON_AGENTS_MD" >/workspace/AGENTS.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have to add /workspace/AGENTS.md? I guess ~/.cursor/AGENTS.md already cover it.

Comment on lines +39 to +55
if [ -n "${AXON_PLUGIN_DIR:-}" ] && [ -d "${AXON_PLUGIN_DIR}" ]; then
for plugindir in "${AXON_PLUGIN_DIR}"/*/; do
[ -d "$plugindir" ] || continue
if [ -d "${plugindir}skills" ]; then
for skilldir in "${plugindir}skills"/*/; do
[ -d "$skilldir" ] || continue
skillname=$(basename "$skilldir")
pluginname=$(basename "$plugindir")
targetdir="/workspace/.cursor/skills/${pluginname}-${skillname}"
mkdir -p "$targetdir"
if [ -f "${skilldir}SKILL.md" ]; then
cp "${skilldir}SKILL.md" "$targetdir/SKILL.md"
fi
done
fi
done
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the agents?
I guess we have to inject plugin.agents as well.

@github-actions github-actions bot removed needs-kind Indicates an issue or PR lacks a kind/* label needs-triage needs-priority needs-actor labels Feb 23, 2026
@gjkim42
Copy link
Collaborator

gjkim42 commented Feb 26, 2026

@aslakknutsen
are you working on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants