ruler

Ruler — apply the same rules to all coding agents

What is ruler?

Ruler — apply the same rules to all coding agents

Overview of ruler

What it is

Ruler is a command-line tool that centralises instructions for AI coding assistants. It stores all rules in a dedicated .ruler/ directory as Markdown files and automatically distributes them to the configuration files of supported AI agents. This eliminates the need to maintain separate instruction files for each tool, providing a single source of truth for project-wide AI guidance. Ruler supports nested rule loading, allowing different project components to have context-specific instructions. It is currently in beta research preview.

Key features

  • Centralised Rule Management: Store all AI instructions in a dedicated .ruler/ directory using Markdown files.
  • Nested Rule Loading: Support complex project structures with multiple .ruler/ directories for context-specific instructions.
  • Automatic Distribution: Ruler applies these rules to configuration files of supported AI agents.
  • Targeted Agent Configuration: Fine-tune which agents are affected and their specific output paths via ruler.toml.
  • MCP Server Propagation: Manage and distribute Model Context Protocol (MCP) server settings.
  • .gitignore Automation: Keeps generated agent config files out of version control automatically.
  • Simple CLI: Easy-to-use commands for initialising and applying configurations.

Use cases

Ruler is designed for teams and projects that use multiple AI coding assistants. It addresses inconsistent guidance across AI tools, duplicated effort in maintaining multiple config files, context drift as project requirements evolve, onboarding friction for new AI tools, and complex project structures requiring context-specific instructions for different components.

Getting started

See the repository README for installation and quick-start commands.

License and pricing

The license is MIT. The project is open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/intellectronicaruler.svg)](https://yunodb.com/tools/intellectronicaruler?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/intellectronicaruler?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/intellectronicaruler.svg" alt="Featured on YunoDB" height="20"></a>