One source of truth, eleven AI CLI tools.
stdagent is a lightweight, pure Go CLI that keeps a single .stdai/ directory as the source of truth for your project's AI configuration, then fans it out to 11 AI CLI tools with their native file formats, frontmatter dialects, and quirks handled for you.
Stop maintaining CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules/, .windsurf/rules/, .clinerules/, .github/copilot-instructions.md, ... by hand. Edit once, sync everywhere.
- Single source — write
rules/skills/commands/referencesonce in YAML frontmatter + Markdown. - Eleven targets — Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, Gemini CLI, Aider, Cline, OpenCode, Continue.dev, Antigravity.
- Zero lock-in — the writer only touches a tiny whitelist of paths; backups before every sync;
cleanreverses everything. - Drift detection —
statusshows files modified outside stdagent;fixreapplies the source. - MCP — single
.stdai/standards/mcp.jsonfans out to.mcp.json/.cursor/mcp.json/.vscode/mcp.json - Monorepo aware — config lookup walks up from
cwd; works from any subdirectory. - Self-upgrading —
stdagent upgradepulls signed releases from GitHub with sha256 verification and atomic replace.
| Target | Primary outputs |
|---|---|
| Claude Code (Anthropic) | CLAUDE.md + .claude/{rules,skills,commands}/ + .mcp.json |
| Codex (OpenAI) | AGENTS.md + .agents/skills/ + .codex/rules/ (byte-budget spillover) |
| Cursor | .cursor/{rules/*.mdc,skills,commands}/ + .cursor/mcp.json |
| GitHub Copilot | .github/{copilot-instructions,instructions,prompts,agents}/ + .vscode/mcp.json |
| Windsurf (Codeium) | .windsurf/{rules,skills,workflows}/ |
| Gemini CLI (Google) | GEMINI.md + .gemini/commands/*.toml |
| Aider | reuses AGENTS.md (noop) |
| Cline | .clinerules/ + .clinerules/workflows/ |
| OpenCode | .opencode/{agents,commands}/ |
| Target | Primary outputs |
|---|---|
| Continue.dev | .continue/{rules,prompts}/ |
| Antigravity (Google) | .agents/{rules,workflows}/ |
Each integration is documented under docs/targets/.
# Install (macOS / Linux)
curl -fsSL https://raw.githubusercontent.com/StringKe/std-ai/main/install.sh | sh
# Install (Windows PowerShell)
irm https://raw.githubusercontent.com/StringKe/std-ai/main/install.ps1 | iex
# Initialize in your project
cd your-project
stdagent init
# Edit .stdai/standards/rules/example.md, then sync to all enabled targets
stdagent sync
# Inspect / fix drift
stdagent status
stdagent fix| Command | Purpose |
|---|---|
stdagent init |
Scaffold .stdai/ + config.toml + .stdaiignore + sample standards |
stdagent pull |
Update git-backed sources cached in .stdai/cache/ |
stdagent sync |
Core: pull → parse → convert → fan out |
stdagent fix |
Re-sync to repair drift (alias of sync) |
stdagent status |
Per-target drift + last sync time |
stdagent clean |
Remove generated files (preserves .stdai/) |
stdagent budget |
LLM context budget check (chars + token estimate) |
stdagent intro |
Print a migration prompt for an LLM to convert your existing config |
stdagent upgrade |
Self-upgrade from GitHub Releases (sha256 + atomic replace) |
stdagent version |
Build info |
Every command supports --help. Full reference: docs/commands.md.
A complete schema lives in docs/spec.md Part 1. The minimal shape:
---
type: rules # rules | skills | commands | references
name: coding-style
description: General coding style
priority: high # high | normal | low
targets: [claude-code, codex] # opt-in (or use exclude_targets to opt-out)
applyTo: ["**/*.go"]
alwaysApply: false
---
# Coding Style
Always use meaningful variable names...MCP servers (.stdai/standards/mcp.json):
{
"version": "1.0",
"servers": {
"github": { "type": "stdio", "command": "gh", "args": ["api"] },
"linear": { "type": "http", "url": "https://mcp.linear.app/sse" }
}
}.stdai/config.toml:
version = "1.0"
inject = true # inject "Generated by stdagent" footer in outputs
inject_whatis = true # add a one-line origin note inside skills
auto_pull = true # pull git sources on every sync
backup = true
backup_keep = 5
[targets]
claude-code = { enabled = true, convert = true }
codex = { enabled = true, convert = true }
cursor = { enabled = false, convert = true }
copilot = { enabled = false, convert = true }
windsurf = { enabled = false, convert = true }
gemini = { enabled = false, convert = true }
aider = { enabled = false, convert = true }
cline = { enabled = false, convert = true }
opencode = { enabled = false, convert = true }
continue-dev = { enabled = false, convert = true }
antigravity = { enabled = false, convert = true }
[sources.default]
url = "https://github.com/your-org/ai-standards.git"
branch = "main"
enabled = true
paths = ["standards/"]Full reference: docs/config-spec.md.
your-project/
├── .stdai/ Internal management area (single source of truth)
│ ├── config.toml One config file
│ ├── standards/ Authoring root
│ │ ├── rules/
│ │ ├── skills/
│ │ ├── commands/
│ │ ├── references/
│ │ └── mcp.json MCP servers (optional)
│ ├── cache/ Git source cache
│ ├── backups/ Auto-snapshot before each sync
│ └── state.json Runtime state
├── .stdaiignore gitignore-style globs to exclude source files
├── CLAUDE.md Fan-out: Claude Code
├── AGENTS.md Fan-out: Codex / Cursor fallback / Copilot agent / OpenCode / Antigravity
├── GEMINI.md Fan-out: Gemini CLI
├── .mcp.json MCP for Claude
└── .claude/ .codex/ .cursor/ .github/ .windsurf/ .gemini/ .clinerules/ .opencode/ .continue/ .agents/
Details: docs/file-structure.md.
When --config is omitted, stdagent walks up from cwd to find the nearest .stdai/config.toml. Run it from any subdirectory and it will locate the monorepo root automatically.
# Toolchain (mise + go + golangci-lint + gofumpt + git-cliff)
mise install
# Common tasks
mise run fmt # gofumpt + goimports
mise run lint # golangci-lint
mise run test # go test -race -cover
mise run check # fmt + lint + test in one go
mise run build # produces bin/stdagent
mise run run # go run ./cmd/stdagent- docs/spec.md — full spec: std-ai standard + 11-tool divergence + conversion strategy
- docs/prd.md — product requirements
- docs/architecture.md — module layout + data flow
- docs/commands.md — CLI command reference
- docs/conversion-rules.md — conversion matrix + frontmatter mapping
- docs/format-spec.md — frontmatter schema details
- docs/file-structure.md — directory conventions
- docs/roadmap.md — roadmap
- docs/targets/ — 11 per-tool research notes
MIT — see LICENSE.