Connect Your Coding Agent to OneDev with TOD and Skills

TOD—short for TheOneDev—is a cross-platform CLI for OneDev 15.1 and later. It lets coding agents query and update issues, pull requests, and builds; run CI/CD jobs against local changes; inspect build failures; and check out issue or pull request branches. Companion skills teach Codex, Claude Code, Cursor, OpenCode, and other SKILL.md-aware agents how to combine those commands into complete workflows.
The two layers have distinct jobs:
- TOD is the tool. It reads and changes OneDev data, checks out work, and runs CI/CD.
- Skills are the playbook. They tell an agent which commands to use, in what order, what context to gather, and where to stop for confirmation.
Install and Configure TOD
On macOS, Linux, or FreeBSD:
curl -fsSL https://code.onedev.io/onedev/tod/~raw/main/install.sh | bash
On Windows PowerShell:
irm https://code.onedev.io/onedev/tod/~raw/main/install.ps1 | iex
The installer detects the operating system and CPU architecture, then places the tod binary on PATH. TOD can also be built from source with Go 1.22.1 or later.
Next, connect it to your OneDev server:
tod config set
The interactive setup asks for the OneDev server URL and a personal access token. For scripts, set each value directly:
tod config set server-url https://onedev.example.com
tod config set access-token your-personal-access-token
If your server uses a self-signed certificate or private certificate authority, add a PEM file:
tod config set trust-certs-file /path/to/trust-certs.pem
Use tod config get to inspect the active settings with the token redacted, and tod config path to see where the configuration is stored. Environment variables—ONEDEV_SERVER_URL, ONEDEV_ACCESS_TOKEN, and ONEDEV_TRUST_CERTS_FILE—override the file, which is convenient in containers and automation.
Repository context: Run project-related TOD commands from a Git working directory with at least one remote pointing to the OneDev project. TOD uses that remote to infer the current project. Check the result with
tod project currentand the selected remote withtod remote. See the TOD project for source and documentation.
The TOD Command Map
TOD commands are grouped by OneDev object. Follow each category link for every command and flag in the complete CLI reference.
| Category | What you can do |
|---|---|
| Issues | List, read, create, edit, link, comment on, and change the state of issues; log work; create or check out issue branches |
| Pull requests | Read a PR and its patch, comments, code comments, and builds; create or edit a PR; check it out; approve, request changes, merge, or discard |
| Code comments | Reply to, resolve, and reopen line-anchored review comments |
| Builds | Query build history, read logs and code-problem reports, inspect changes since the last success, run jobs, and validate the CI/CD spec |
| Projects | Query accessible projects and identify the OneDev project for the current Git checkout |
| Configuration | Set and inspect the server URL, access token, and trusted certificates |
| Utilities | Resolve the current user and Git remote, check commit-message requirements, discover valid labels, download attachments, and convert dates to timestamps |
Most commands accept familiar references such as 123, #123, myproject#123, or a project-key form such as PROJ-123. When a command works with the current project, TOD normally infers it from the OneDev Git remote.
Here are a few useful examples:
# Find open issues assigned to you
tod issue list --query '"Assignees" is me and "State" is "Open"'
# Check out a pull request
tod pr checkout PROJ-123
# Inspect a failed build
tod build get PROJ-456
tod build get-log PROJ-456
# Run the ci job against uncommitted local changes
tod build run --local ci
# Validate and upgrade the CI/CD spec
tod build check-spec
For a local build, TOD creates a temporary commit from the current tracked changes, pushes it to a dedicated temporary ref in OneDev, starts the selected job, and streams its log back to the terminal.
Skills Turn Commands into Workflows
Each TOD skill is a tool-agnostic SKILL.md file that defines prerequisites, evidence to collect, commands to run, safety checks, and the expected handoff.
Install all TOD skills with:
npx skills add https://code.onedev.io/onedev/tod.git
The installer detects supported coding agents and lets you choose where the skills should be available. To refresh installed skills later:
npx skills update
See the TOD skills guide for installation details.
TOD currently ships eight skills:
| Skill | Purpose |
|---|---|
using-tod |
General OneDev queries and actions |
edit-build-spec |
Create or update .onedev-buildspec.yml, then validate it against the server schema |
fix-failed-build |
Gather build evidence and fix a prompt-specified failed build |
generate-commit-message |
Compose a commit message that satisfies OneDev branch and PR requirements |
work-on-issue |
Check out an issue branch, gather its full context, and implement the work |
submit-issue-work |
Commit and push issue work, then update or create its pull request |
work-on-pull-request |
Review, improve, merge, or otherwise continue work on a pull request |
submit-pull-request-work |
Push PR changes and apply the prepared review or discussion actions |
The separation between “work” and “submit” skills is deliberate. An agent can prepare code and draft comments first, leaving you a clear review point before it commits, pushes, or changes OneDev state.
Typical Agent Workflows
A skill-aware agent selects the matching workflow from a natural-language request.
Write and Verify a CI/CD Spec
Try: “Create a OneDev CI job that tests this Maven project and caches dependencies.”
The edit-build-spec skill first retrieves the authoritative schema with tod build get-spec-schema. If a spec already exists, it validates and upgrades it before editing. After inspecting the project files and making the change, it runs tod build check-spec again until the result is valid.
Run CI/CD Against Local Changes
Try: “Run the ci job against my current changes and investigate any failure.”
TOD runs:
tod build run --local ci
The job executes in OneDev and streams its log into the agent's terminal. This is useful before committing, and it also lets the agent iterate on code or .onedev-buildspec.yml using real CI feedback.
Work on an Issue
Try: “Work on issue PROJ-123.”
The issue workflow checks out the issue branch, reads the issue description and discussion, downloads linked screenshots or files, inspects the repository, and implements the requested change. When you are ready, “Submit the issue work” invokes the companion submission workflow to create a compliant commit, push it, and create or update the related PR.
Fix a Build Error
Try: “Fix failed build PROJ-456.”
The agent reads both build details and the full log. It can follow failed dependency builds, fetch code-problem reports, compare changes with the previous successful build, and inspect the CI/CD spec when configuration is involved. The fix is left in the working copy for review.
If the failed build belongs to an issue or PR you are already working on, the corresponding issue or PR skill incorporates the same build-investigation procedure while preserving that wider context.
Review a Pull Request
Try: “Review PR PROJ-789.”
The PR workflow checks out the correct source branch and gathers the PR, fixed issues, discussion, existing line comments, builds, and a review-scoped patch. It checks correctness, edge cases, security, style, and test coverage, then prepares line-anchored findings and an approve or request-changes outcome when appropriate.
Improve a Pull Request
Try: “Address the feedback and improve PR PROJ-789.”
The same PR skill can resolve review feedback, fix a failed build, add tests, handle merge conflicts, or make a broader improvement. Its submission partner composes a compliant commit, pushes the source branch, replies to or resolves addressed comments, and applies the prepared PR action after confirmation.
Zero Setup Inside a OneDev Workspace
If you are vibe coding in a OneDev workspace, the setup section above is already handled for you. Official OneDev workspace images include TOD and its companion skills, and the workspace configures them to talk to the current OneDev instance.
Open the workspace, start Codex, Claude Code, Cursor, OpenCode, or another supported terminal agent, and ask it to work with the current issue, pull request, build, or CI/CD spec. The agent begins with the repository, OneDev connection, and workflow knowledge already in place.
Follow the OneDev workspace tutorial to create a preconfigured development environment and start vibe coding in the browser.