Skip to main content

A terminal window: stratarc sync is typed, the stratarc wordmark appears, and each runtime is checked off

Stratarc

One agent configuration source, rendered into any agent runtime you use.

PyPI version Python versions Latest release MIT license No runtime dependencies Five supported runtimes

Installation · Quick Start · How It Works · Commands · Docs · Contributing


If you use more than one coding agent, you already know the problem. Claude Code wants a CLAUDE.md and a settings.json. Codex wants AGENTS.md. Gemini CLI, Cursor and OpenCode each want their own layout, their own hook format and their own idea of what a rule or a skill looks like. You end up with five copies of the same instructions, and they drift apart the moment you stop paying attention.

Stratarc gives you one place to write it all down. You keep a single source tree of instructions, rules, hooks, skills, commands, agents and permissions. Stratarc compiles that tree into the native format of any runtime you enable and deploys it into the right directory. Edit once, sync, and every agent sees the same configuration.

Highlights

  • Any runtime, one source. Claude Code, Codex, Gemini CLI, Cursor and OpenCode are all rendered from the same tree; enable the ones you use.
  • Everything agents read. Instructions, rules, hooks, skills, commands, subagents and permissions, each translated into the form the runtime expects.
  • Safe by default. diff and check show exactly what would change before sync writes anything, and Stratarc only ever touches files it owns.
  • Validated before deploy. The source root is checked against bundled JSON Schemas and the engine's own rules on every run.
  • Projects too. Managed project checkouts receive their configuration alongside the user-level runtime directories.
  • Bring your own runtime. A runtime Stratarc does not ship with is one Python file in your source root; stratarc adapter new writes the starting point, and it is managed like the rest.
  • Nothing to install but Python. Pure standard library at runtime, no dependencies.

Installation

Stratarc needs Python 3.11 or newer. pipx is the easiest way to get a command-line tool onto your path:

pipx install stratarc

Or pin a tagged release straight from GitHub:

pipx install git+https://github.com/klappe-pm/stratarc@v0.2.0

Then check the install and see which runtimes Stratarc found on your machine:

stratarc doctor

Quick Start

Scaffold a source root wherever you like to keep it:

stratarc init ~/stratarc-source

Open ~/stratarc-source/stratarc.toml and enable the runtimes you use. Then fill in the rules, skills and hooks under the same directory; every file the scaffold writes is commented, so it shows you where each piece goes.

Preview what a deploy would change. diff is read only, so run it as often as you like:

cd ~/stratarc-source && stratarc diff

When the diff looks right, write it out to the enabled runtimes:

cd ~/stratarc-source && stratarc sync

That is the whole loop. From here on, changing your agent setup means editing one tree and running sync.

How It Works

A source root is an ordinary directory. This is roughly what stratarc init gives you:

stratarc-source/
├── stratarc.toml        which runtimes are enabled and where they live
├── AGENTS.md            shared instructions any runtime receives
├── rules/               one Markdown file per rule, plus tiers.json
├── hooks/               hook scripts and hooks.json, the hook registry
├── skills/              one folder per skill
├── commands/            slash commands
├── agents/              subagent definitions
├── permissions.json     the single permission policy
├── components.json      MCP servers, plugins and other external components
└── projects-root/       per-project configuration overrides

On sync, Stratarc validates the tree, hands it to one adapter per enabled runtime, and each adapter renders the files that runtime expects into its target directory:

Runtime Target Receives
Claude Code ~/.claude CLAUDE.md, settings.json, hooks, skills, commands, agents
Codex ~/.codex AGENTS.md, config.toml, rules, hooks, skills, prompts
Gemini CLI ~/.gemini GEMINI.md, settings.json, policies, hooks, skills
Cursor ~/.cursor rules, hooks, hooks.json
OpenCode ~/.config/opencode AGENTS.md, opencode.jsonc, rules, hooks, skills

The runtime directories are generated output. Change the source, run sync, and they are rebuilt.

A complete worked example lives in examples/notes-cli: a small source root beside the exact output each runtime receives from it.

Commands

Command What it does
stratarc init TARGET Scaffolds a new source root from the bundled template.
stratarc doctor Reports the health of the install without changing anything.
stratarc validate Checks the source root against the bundled schemas and engine rules.
stratarc diff Prints what a sync would change and writes nothing.
stratarc check Compares each runtime directory with the source and exits non-zero when anything is stale.
stratarc sync Renders the source root into the enabled runtimes and managed projects.
stratarc prune Removes files a runtime holds that the source no longer produces.
stratarc reconcile Refreshes control-plane.md, the table that records which item reaches which scope.
stratarc adapter Lists the adapters, and writes the starting point for a runtime of your own.

Every command accepts --help and --json. The CLI reference covers the full surface, including exit statuses and the JSON envelope.

Documentation

The docs live in one tree under docs/, following the Diátaxis layout: tutorials, how-to guides, reference and explanation.

Contributing

Contributions are welcome. Read CONTRIBUTING.md first; it will save you a round trip. If you are stuck or have found a bug, SUPPORT.md says where to ask and where to file an issue.

Security

Please report vulnerabilities privately as described in SECURITY.md rather than opening a public issue.

License

Stratarc is released under the MIT License.

Metadata

Release files for stratarc 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stratarc 0.2.0
File Size Uploaded
stratarc-0.2.0.tar.gz 435.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stratarc 0.2.0
File Interpreter ABI Platform
stratarc-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 695.8 kB

Release files / stratarc-0.2.0.tar.gz

Download URL stratarc-0.2.0.tar.gz
Size 435.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0df3b552889477136764af0d9ec03d8bf6df28161b57bbe0d05c39dd4bb06add
BLAKE2b-256 checksum
How to use checksums
77aac8e2459482f692d5ebe86800a10d3ba13d6c5479476b78cc5f94895c6812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / stratarc-0.2.0-py3-none-any.whl

Download URL stratarc-0.2.0-py3-none-any.whl
Size 260.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27d7e723062da01db94282cbca17a27c781102e5e0029fb605f61083098b9dda
BLAKE2b-256 checksum
How to use checksums
ff3bc60246aae3a231df0ec0d569765d9bcbcfa1646c212ce23719357e30afc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.3.1

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page