Ruler CLI

A CLI that keeps agent instructions in one place and distributes them to the right config files for Claude Code, Cursor, Codex, Copilot and two dozen other tool

  • 2,968 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Each ruler apply run overwrites CLAUDE.md, AGENTS.md and .cursor files
  • Propagates MCP server settings into agent configs and edits .gitignore
All reasons and checks

intellectronica/ruler

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/ruler

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Each ruler apply run overwrites CLAUDE.md, AGENTS.md and .cursor files
  • Propagates MCP server settings into agent configs and edits .gitignore

This is third-party code. Review the repository files before installing.

What it does

Ruler reads markdown files from a .ruler folder at the project root, including nested .ruler folders for parts of a monorepo, and distributes their content into each supported agent's own config format: CLAUDE.md for Claude Code, AGENTS.md for Codex and most others, .cursor files for Cursor and so on. Alongside rules, Ruler can also propagate MCP server settings into the format a given agent understands, and automatically adds the generated files to .gitignore so the repository keeps only the .ruler folder as the single source of truth.

Who it is for. For teams and developers who use several different AI agents on one project and are tired of manually duplicating instructions across CLAUDE.md, AGENTS.md and other formats.

Good fit when

  • The team uses Claude Code, Cursor, Codex or other agents at once and wants one set of rules for all of them
  • The project is large and parts of the monorepo need their own extra instructions on top of shared ones
  • You need to centrally propagate MCP server settings to several agents at once

Not a fit when

  • Only one agent is used on the project, so there is nothing to duplicate instructions to
  • The project does not want auto-generated config files in .gitignore and prefers to maintain them by hand
  • The tool is marked by the author as a beta research preview, so critical production workflows should verify stability separately

Example request

Consolidate the project's rules in .ruler and distribute them to Claude Code, Cursor and Codex configs

Limitations

The author explicitly calls the project a beta research preview and asks users to test behavior carefully in their own environment. Ruler overwrites agent config files on every apply run, so manual edits to generated files are lost. The list of supported agents and their formats can lag behind new versions of the tools themselves.

How to disable. Remove the package: npm uninstall -g @intellectronica/ruler. Generated agent config files can be deleted or left as-is; they do not depend on Ruler remaining installed.

FAQ

Do rules need to be rewritten for every agent?

No, rules are written once in .ruler, and Ruler distributes them into CLAUDE.md, AGENTS.md, .cursor and other supported config formats.

What happens to manual edits in CLAUDE.md?

They are lost on the next ruler apply run because the file is treated as generated. All edits should go into the .ruler sources instead.

Discussion

No questions or reviews yet.

CLI tools

A CLI that keeps rules, commands, MCP, subagents and skills in one source and generates config files for many AI coding tools

CLIExtended access1.6KRepository stars

A CLI that analyses a repository in six model phases and writes AGENTS.md or CLAUDE.md, with ExecPlan planning on top.

CLIExtended access124Repository stars

Skill that generates matching project rules for Cursor, Claude Code and Codex built around layered development and BDD

SkillExtended access2Repository stars

A CLI that generates and maintains AI context files, CLAUDE.md, Cursor rules, AGENTS.md and Copilot instructions, keeping them accurate as code changes

CLIExtended access1.3KRepository stars

A Rust coding agent with a native GUI, a terminal mode, an ACP mode for Zed and an MCP server

CLIBroad access189Repository stars

One rules directory generates instructions, skills, MCP and settings for 52 AI coding assistants and checks them in CI

CLIExtended access169Repository stars

README in short

The README presents Ruler as a single source of truth for AI agent instructions: rules live in markdown files under .ruler, including nested folders for complex project structures, and get automatically distributed into the config formats of more than twenty agents, from Claude Code and Cursor to Aider, Windsurf, Gemini CLI and Kiro. It separately covers propagating MCP server settings and support for skills and subagents where an agent's format allows it. Installation is via npm, with ruler.toml settings to fine-tune which agents get rules and where. MIT licensed, in beta research preview status.

README badge

Report a problem