Define AI coding agent configuration once in `.agentscfg/`, then generate equivalent config for Claude Code, OpenCode, and Codex CLI.
Define AI coding agent configuration once in .agentscfg/, then generate equivalent
config for Claude Code, OpenCode, and Codex CLI.
``bash`
npm install -g agentscfgor
npx agentscfg
`bash`
agentscfg initedit .agentscfg/instructions/ and .agentscfg/skills/
agentscfg gen --dry-run
agentscfg diff
agentscfg gen
agentscfg import --from codex
`text`
init [--force]
validate
diff [--to ...]
gen [--to ...] [--remove] [--adopt] [--force] [--allow-dirty] [--dry-run]
import --from
doctor
Run agentscfg for detailed help on each command.
``
.agentscfg/
agentscfg.jsonc
instructions/
BASE.md
PROJECT.md
skills/
SKILL.md
scripts/
references/
assets/
targets/
claude/
opencode/
codex/
mcp/
mcp.json
.managed.json
- Claude Code: CLAUDE.md, .claude/skills/.opencode/skill/
- OpenCode: (agent/config files come from .agentscfg/targets/opencode/**)AGENTS.md
- Codex CLI: , .codex/skills/
All files under .agentscfg/targets/ are generated into the tool's config
directory:
- .agentscfg/targets/claude/ → .claude/.agentscfg/targets/opencode/
- → .opencode/.agentscfg/targets/codex/
- → .codex/
MCP config:
- .agentscfg/mcp/mcp.json → .mcp.json
- Generated files include a agentscfg:generated ... sha256=... marker.--adopt
- By default, gen will not overwrite unmanaged files unless you pass --force
or the file already contains the marker.
- If a generated file's hash marker does not match, gen refuses to overwrite
unless is provided.--remove
- is disabled unless managed.allowRemove is set to true..agentscfg/.managed.json
- Managed tracking is stored in . If it's missing, runagentscfg gen --adopt
to create it.gen
- refuses to run on a dirty git working tree unless --allow-dirty is set.
Add generated paths to .gitignore and use agentscfg gen to regenerate them:
`text`
.claude/
.codex/
.opencode/
.mcp.json
AGENTS.md
CLAUDE.md
`bash``
npm install
npm test
npm run build
npm run tsc