load-rules
v1.0.0
Published
CLI tool to discover, search, and install AI coding rules for Claude Code, Cursor, Copilot, Codex, and more
Maintainers
Readme
load-rules
CLI tool to discover, search, and install AI coding rules for Claude Code, Cursor, Copilot, Codex, and more.
load-rules aggregates coding rules from multiple sources into a single searchable registry, letting you install any rule with one command. No more cloning repos or manually copying .cursorrules files.
Quick Start
# Install a rule instantly (no install needed)
npx load-rules install nextjs
# Or install globally
npm install -g load-rules
load-rules install react-expertFeatures
- 50+ rules from curated and community sources, pre-indexed and ready to install
- Multi-tool support — install rules for Claude Code, Cursor, Copilot, or Codex
- Fast search — find rules by name, description, or tags
- Auto-updater — update the registry from GitHub sources with
load-rules update - Programmatic API — use as a library in your own tools
Commands
Install a rule
load-rules install <name> # Install for Claude Code (default)
load-rules install <name> --tool cursor # Install for Cursor
load-rules install <name> --tool copilot # Install for GitHub Copilot
load-rules install <name> --global # Install globally (~/.claude/rules/)
load-rules install <name> -o ./my-path # Custom output path
load-rules <name> # Shorthand for installSearch & browse
load-rules list # List all rules
load-rules list --source awesome-cursorrules # Filter by source
load-rules list --tag frontend # Filter by tag
load-rules list --tool cursor # Filter by compatible tool
load-rules search react # Search by keyword
load-rules search react --tool cursor # Search with tool filter
load-rules search "api design" --tag backend
load-rules info react-expert # Detailed info about a rule
load-rules tags # Show all tags with counts
load-rules sources # Show all rule sourcesUpdate registry
load-rules update # Fetch latest rules from GitHub
GITHUB_TOKEN=ghp_xxx load-rules update # Use token for higher rate limitsJSON output
load-rules list --json # Machine-readable output
load-rules search react --json
load-rules info react-expert --jsonSupported Tools
| Tool | Install Location (local) | Install Location (global) |
|------|-------------------------|--------------------------|
| Claude Code | .claude/rules/<name>.md | ~/.claude/rules/<name>.md |
| Cursor | .cursor/rules/<name>.md | ~/.cursor/rules/<name>.md |
| Copilot | .github/copilot-instructions.md | ~/.github/copilot-instructions.md |
| Codex | .codex/rules/<name>.md | ~/.codex/rules/<name>.md |
Rule Sources
| Source | Repository | Type | |--------|-----------|------| | Awesome CursorRules | PatrickJS/awesome-cursorrules | Curated | | Cursor Directory | pontusab/cursor.directory | Community | | Awesome Cursor Rules | sanjeed5/awesome-cursor-rules | Community |
Programmatic API
const { findRule, searchRules, installRule } = require('load-rules');
// Search
const results = searchRules('react', { tag: 'frontend' });
// Get rule info
const rule = findRule('react-expert');
// Install programmatically
await installRule(rule, { tool: 'claude-code', global: true });Rebuild the Registry
The scraper fetches rule metadata from all configured GitHub sources:
npm run scrape # Rebuild from GitHub
GITHUB_TOKEN=ghp_xxx npm run scrape # With auth for higher rate limitsContributing
- Fork the repo
- Add rules to
data/rules-registry.jsonor add a new source insrc/scraper/index.js - Submit a PR
Adding a new rule source
Add an entry to the SOURCES array in src/scraper/index.js:
{
id: 'your-source',
repo: 'owner/repo',
path: 'rules',
type: 'community',
url: 'https://github.com/owner/repo',
compatible: ['cursor', 'claude-code', 'copilot'],
}License
MIT
