Deploy an existing Rulesync project to the AI coding agents installed on your machine.
rulesync-deploy detects your installed agents and uses Rulesync to generate their native configuration files from a single .rulesync/ source directory. You don't need to maintain a target list or install the Rulesync CLI separately.
You'll need:
- Node.js 24.19.0 or newer
- An existing Rulesync project with
rulesync.jsoncand a.rulesync/directory
From your Rulesync project's directory, run:
npx --yes rulesync-deployThis generates project-level configuration for the detected agents and updates the project's .gitignore to exclude generated Rulesync files.
To deploy the same sources to your user-level agent configuration instead:
npx --yes rulesync-deploy --globalThe package is available on npm. npx downloads it and its dependencies into npm's cache on first use, so no global installation is needed.
rulesync-deploy [--root <path>] [--global] [--help]
| Option | Description |
|---|---|
--root <path> |
Select a Rulesync project. Defaults to the current directory. |
--global |
Generate user-level agent configuration instead of project-level files. |
--help, -h |
Show CLI help. |
You can run the command from outside the Rulesync project by passing its path:
npx --yes rulesync-deploy --root ../my-project
npx --yes rulesync-deploy --root ../my-project --global--global changes where Rulesync generates the configuration. It still reads the sources from the selected project.
- Validate the project. Check that
rulesync.jsoncand.rulesync/exist, and readrulesync.local.jsoncif present. - Detect installed agents. Look for supported agent commands, configuration directories, and product-specific installation signals.
- Install declared sources. If either Rulesync configuration declares sources, run
rulesync install --frozenbefore generating anything. - Generate native targets. Run Rulesync with the targets corresponding to detected agents, plus applicable open-standard targets.
- Update
.gitignorein project mode. Runrulesync gitignorefor all generated targets and features. Global deployment skips this step.
Deployment runs only when you invoke the command. It doesn't install a Git hook or automatically regenerate files when sources change.
The target registry covers the native targets supported by the Rulesync version bundled with this package. Detection uses signals such as an executable on PATH, an agent's user configuration directory, an application installation, or a specific editor extension.
Some directories are shared by multiple tools. For example, .kiro, .roo, .gemini, and .warp alone may not identify which product is installed. Ambiguous installations are reported and skipped until a more specific signal is available.
The CLI also:
- Includes open standards such as
AGENTS.mdand agent skills when the project's sources or existing paths make them applicable. - Reports recognized agents for which Rulesync has no native target.
- Includes a plugin packaging target, such as
claudecode-plugin, only whentargetsinrulesync.jsoncorrulesync.local.jsoncnames it. A plugin manifest in the project, such as.claude-plugin/plugin.json, does not select the target; the CLI reports it as skipped. Plugin targets and other project-only targets are skipped in global mode.
If no supported installed target is detected, deployment stops with an error instead of generating a target arbitrarily.
Development uses mise and Git. The repository pins Node.js 24.19.0, Rulesync 43.10.0, and OpenSpec 2.1.1 in mise.toml.
git clone https://github.com/chrisfls/rulesync-deploy.git
cd rulesync-deploy
mise trust
mise run setup
npm run build
npm linkAfter linking, rulesync-deploy is available as a local command. Run it from another Rulesync project, or use --root to select one:
rulesync-deploy --root ../my-project
rulesync-deploy --root ../my-project --globalFor development without linking, use the mise run deploy and mise run deploy-global tasks. Both accept --root <path> to select another project.
Run all checks with:
mise run checkThis typechecks and builds the TypeScript, runs the Node test suite, and validates the OpenSpec specifications.