README.md (2777 bytes)
1 # ai-config-render (`aicr`) 2 3 Write your AI-agent rules, skills, and MCP servers once. `aicr` renders them into the native files of Claude Code, Codex, Copilot CLI, Gemini CLI, Antigravity, Cursor, Windsurf, or any agent you describe in five lines of TOML. 4 5 It never takes over a file. It owns only: 6 7 - **Instruction files:** the blocks between `<!-- aicr:NAME -->` and `<!-- /aicr:NAME -->`. Your own text stays. 8 - **MCP configs:** the server entries it wrote. Your other servers and settings stay. 9 - **Skills and plain files:** the paths it wrote last run (tracked in a state file). 10 11 It backs up every file before it changes it (`<file>.aicr-bak-<timestamp>`). Python 3.11+ standard library only. 12 13 ## Quickstart 14 15 ```bash 16 pipx install git+https://github.com/equwal/ai-config-render 17 aicr list-targets --source examples/basic # built-in targets; * = enabled 18 aicr diff --source examples/basic # dry run: unified diff of every change 19 aicr render --source examples/basic # write, with backups 20 aicr check --source examples/basic # exit 1 if any target drifted (CI, cron) 21 ``` 22 23 ## Source layout 24 25 Any folder works, git or not: 26 27 ``` 28 aicr.toml targets, rules, MCP servers, skills, files, vars 29 rules/<name>.md one block per rule; rules/<name>.<target>.md overrides for one target 30 skills/<name>/ copied whole into each target's skills folders 31 ``` 32 33 See [`examples/basic/aicr.toml`](examples/basic/aicr.toml). Enable a built-in target with `[targets.claude]`; override any field, or define a new target: 34 35 ```toml 36 [targets.myagent] 37 instructions = "${home}/.myagent/RULES.md" 38 skills = ["${home}/.myagent/skills"] 39 mcp = { format = "json", path = "${home}/.myagent/mcp.json", key = "servers" } # or format = "toml" 40 ``` 41 42 Any rule, server, skill, or file takes `targets = [...]` and `machines = [...]` filters. 43 44 ## Per-machine values 45 46 `~/.config/aicr/machine.toml` (or `--machine FILE`) holds what differs per computer: `name`, `[vars]`, `skip_targets`, `state`, and `[mcp.<server>]` overrides. `${var}` works in every path and string. Built-in vars: `home`, `home_posix`, `os`, `machine`. See [`examples/machine.example.toml`](examples/machine.example.toml). 47 48 ## Why not ruler, rulesync, or chezmoi? 49 50 - **ruler / rulesync** generate project-level agent files and mostly overwrite them. `aicr` targets user-level config, edits only its own blocks and entries, and backs up first, so it can share a file with your hand edits and with other tools. 51 - **chezmoi** manages whole dotfiles. A single `~/.claude.json` mixes your MCP servers with app state that changes every minute; `aicr` merges one key instead of owning the file. 52 53 ## Development 54 55 ```bash 56 pip install -e .[dev] 57 pytest && ruff check . && ruff format --check . && mypy 58 ``` 59 60 MIT license.