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
13 changes: 13 additions & 0 deletions docker/codex-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARG CEEKER_VERSION=0.3.7
ARG BABASHKA_VERSION=1.12.218
ARG LAZYGIT_VERSION=0.61.1
ARG YAZI_VERSION=26.5.6
ARG CURSOR_AGENT_VERSION=2026.06.12-19-59-36-f6aba9a
ARG NODE_MAJOR=24

ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -79,6 +80,18 @@ RUN set -eux; \
install -m 0755 "$(find "$tmp/yazi" -type f -name ya | head -n 1)" /usr/local/bin/ya; \
rm -rf "$tmp"

RUN set -eux; \
tmp="$(mktemp -d)"; \
curl --retry 5 --retry-all-errors --connect-timeout 30 --max-time 300 -fsSL \
"https://downloads.cursor.com/lab/${CURSOR_AGENT_VERSION}/linux/x64/agent-cli-package.tar.gz" \
-o "$tmp/cursor-agent.tar.gz"; \
rm -rf /opt/cursor-agent; \
mkdir -p /opt/cursor-agent; \
tar --strip-components=1 -xzf "$tmp/cursor-agent.tar.gz" -C /opt/cursor-agent; \
ln -sf /opt/cursor-agent/cursor-agent /usr/local/bin/cursor-agent; \
ln -sf /opt/cursor-agent/cursor-agent /usr/local/bin/agent; \
rm -rf "$tmp"

RUN locale-gen en_US.UTF-8 \
&& if getent group 1000 >/dev/null; then \
existing_group="$(getent group 1000 | cut -d: -f1)"; \
Expand Down
31 changes: 31 additions & 0 deletions docs/project_docs/add-cursor-agent-to-codex-workspace/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Add Cursor Agent to Codex workspace

## Goal

Make Cursor Agent available inside the `ghcr.io/boxp/arch/codex-workspace` image.

## Design

- Add `CURSOR_AGENT_VERSION` to `docker/codex-workspace/Dockerfile`.
- Download the pinned Cursor Agent Linux x64 package from `downloads.cursor.com`.
- Extract the full package into `/opt/cursor-agent` because the CLI depends on bundled runtime files.
- Expose both commands expected by the installer:
- `/usr/local/bin/cursor-agent`
- `/usr/local/bin/agent`
- Track `CURSOR_AGENT_VERSION` with Renovate by reading the current installer script from `https://cursor.com/install`.

## Tasks

- [x] Inspect the current Cursor Agent installer output and package layout.
- [x] Add Cursor Agent to the Codex workspace image.
- [x] Add Cursor Agent version tracking to Renovate.
- [x] Add this project plan.
- [x] Verify Dockerfile build and CLI availability.
- [ ] Create PR.

## Verification

- `bash -n docker/codex-workspace/entrypoint.sh`
- `docker build -t codex-workspace:cursor-agent docker/codex-workspace`
- `docker run --rm --entrypoint /bin/bash codex-workspace:cursor-agent -lc 'agent --version && cursor-agent --version'`
- `npx --yes --package renovate renovate-config-validator renovate.json5`
21 changes: 21 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@
datasourceTemplate: "github-releases",
extractVersionTemplate: "^v(?<version>.*)$"
},
{
customType: "regex",
managerFilePatterns: ["/^docker/codex-workspace/Dockerfile$/"],
matchStrings: [
"ARG CURSOR_AGENT_VERSION=(?<currentValue>[^\\s]+)"
],
depNameTemplate: "cursor-agent",
packageNameTemplate: "cursor-agent",
datasourceTemplate: "custom.cursor-agent",
versioningTemplate: "loose"
},
// Codex workspace NodeSource major version
{
customType: "regex",
Expand All @@ -160,6 +171,12 @@
datasourceTemplate: "node-version"
}
],
customDatasources: {
"cursor-agent": {
defaultRegistryUrlTemplate: "https://cursor.com/install",
format: "plain"
}
},
packageRules: [
{
additionalBranchPrefix: '{{packageFileDir}}-',
Expand All @@ -174,6 +191,10 @@
allowedVersions: "<5.0.0",
description: "Allow v4.x updates only. Block v5.x until official migration tools are available (March 2026)"
},
{
matchDatasources: ["custom.cursor-agent"],
extractVersion: "downloads\\.cursor\\.com/lab/(?<version>[^/]+)/\\$\\{OS\\}/\\$\\{ARCH\\}/agent-cli-package\\.tar\\.gz"
},
// Kubernetes components (manual review required)
{
matchManagers: ["custom.regex"],
Expand Down
Loading