Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

Add the OneDev CLI (tod) and its Claude Code skills to all images - #22

Merged
lightningspirit merged 1 commit into
mainfrom
tod-cli
Oct 14, 2026
Merged

lightningspirit merged 1 commit into
mainfrom
tod-cli

Conversation

@lightningspirit

Copy link
Copy Markdown
Contributor

Summary

Phase 1 of the OneDev move: Claude Code in every workspace can work with OneDev issues, pull requests and builds through tod and its skills. (tod dropped its MCP server in v3.0.0; CLI + skills is OneDev's current agent integration.)

  • Dockerfiles: new tod build stage: git clone --branch v4.3.2, check commit 9e280c96…, go build (golang:1.27.0-bookworm). The final image gets /usr/local/bin/tod and the 8 skills in /etc/claude-code/.claude/skills/ (managed skills: all users, cannot be changed, same version as the binary). The official installer is not used: it always downloads the latest binary, unverified.
  • Version: tod 4.3.3+ needs OneDev 16.5.11; our server is 16.4.1, so v4.3.2 (needs 16.1.0). renovate.json holds tod below 4.3.3 until the server upgrade.
  • main.tf: variable onedev_url (https://host[:port] only) → ONEDEV_SERVER_URL, set only when not empty (tod treats an empty env value as an override). Image tags: node v0.7.0, php-wordpress v0.7.0, ops v0.6.0.
  • Claude policy (all three): allow tod read commands; ask for commands that change OneDev (issue create/edit/..., pr create/merge/..., code-comment, build run); deny tod config set and Read(~/.config/tod/**). Read(/etc/claude-code/**) narrowed to Read(/etc/claude-code/*.json) so the skills folder stays readable. No other rule changed (checked rule by rule).
  • Smoke test: tod version and 8 readable skills. Renovate: tod tag + commit.
  • READMEs: "Connect tod to OneDev" first step (user's own access token via tod config set access-token), root README section, vars.example.yaml.
  • Fix: pre-commit json-valid passed all staged JSON files to python3 -m json.tool, which takes [infile] [outfile]: with 2 files it overwrote the second. Now each file is parsed separately.

Checks

  • just lint, just validate pass; onedev_url validation tested (http, paths, $() rejected)
  • Local node-js build: smoke test passes (tod skills: 8)
  • Not tested: tod v4.3.2 against our 16.4.1 server with a real token (the version check runs after login)

After merge

just wait-image <t>, then release (vars.yaml now has onedev_url), update workspaces, and in one workspace: tod config set access-token <token> + tod project list.

🤖 Generated with Claude Code

- Dockerfiles: build tod v4.3.2 from its tag (commit checked) in a
  golang stage; install the binary and the 8 skills into
  /etc/claude-code/.claude/skills (managed, all users).
- main.tf: template variable onedev_url -> ONEDEV_SERVER_URL (only when
  set); image tags bumped (node/php v0.7.0, ops v0.6.0).
- Claude policy: tod read commands allowed, changes ask first,
  tod config set and the tod config denied; deny on /etc/claude-code
  narrowed to *.json so the skills stay readable.
- Smoke test checks tod and the skills; Renovate tracks tod (held below
  4.3.3: it needs OneDev 16.5.11, server is 16.4.1).
- pre-commit json-valid: check each file (json.tool with two files
  overwrote the second one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lightningspirit
lightningspirit merged commit 83b32ba into main Oct 14, 2026
7 checks passed
@lightningspirit
lightningspirit deleted the tod-cli branch October 14, 2026 12:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant