JSPM

  • Created
  • Published
  • Downloads 39936
  • Score
    100M100P100Q139615F
  • License MIT

Unified AI rules management CLI tool that generates configuration files for various AI development tools

Package Exports

  • rulesync
  • rulesync/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rulesync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rulesync

CI npm version

A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files. Uses the recommended .rulesync/rules/*.md structure, with backward compatibility for legacy .rulesync/*.md layouts. Also imports existing AI tool configurations into the unified format.

Installation

npm install -g rulesync
# or
pnpm add -g rulesync
# or  
yarn global add rulesync

Getting Started

New Project

  1. Initialize your project:

    # Recommended: Use new organized structure
    npx rulesync init
    
    # Legacy: Use backward-compatible structure
    npx rulesync init --legacy
  2. Edit the generated rule files:

    • Recommended: Edit files in .rulesync/rules/ directory
    • Legacy: Edit files in .rulesync/ directory
  3. Generate tool-specific configuration files:

    npx rulesync generate

Existing Project

If you already have AI tool configurations:

# Import existing configurations (to recommended structure)
npx rulesync import --claudecode  # From CLAUDE.md
npx rulesync import --cursor      # From .cursorrules
npx rulesync import --copilot     # From .github/copilot-instructions.md
npx rulesync import --amazonqcli  # From .amazonq/rules/*.md
npx rulesync import --opencode    # From AGENTS.md

# Import to legacy structure (for existing projects)
npx rulesync import --claudecode --legacy
npx rulesync import --cursor --legacy
npx rulesync import --copilot --legacy
npx rulesync import --amazonqcli --legacy
npx rulesync import --opencode --legacy

# Generate unified configurations
npx rulesync generate

Supported Tools

rulesync supports both generation and import for 12 AI development tools:

  • GitHub Copilot Custom Instructions (.github/copilot-instructions.md + .github/instructions/*.instructions.md)
  • Cursor Project Rules (.cursor/rules/*.mdc + .cursorrules)
  • Cline Rules (.clinerules/*.md + .cline/instructions.md)
  • Claude Code Memory (./CLAUDE.md + .claude/memories/*.md + Custom Slash Commands .claude/commands/*.md)
  • Amazon Q Developer CLI (.amazonq/rules/*.md + .amazonq/mcp.json + Built-in Slash Commands support + Context Management)
  • OpenCode (AGENTS.md + opencode.json + 🔐 Permission-Based Security instead of traditional ignore files)
  • OpenAI Codex CLI (AGENTS.md + File Splitting with XML References .codex/memories/*.md + .codex/mcp-config.json + .codexignore)
  • AugmentCode Rules (.augment/rules/*.md)
  • Roo Code Rules (.roo/rules/*.md + .roo/instructions.md)
  • Gemini CLI (GEMINI.md + .gemini/memories/*.md + Custom Slash Commands .gemini/commands/*.md)
  • JetBrains Junie Guidelines (.junie/guidelines.md)
  • Kiro IDE Custom Steering Documents (.kiro/steering/*.md) + AI Ignore Files (.aiignore)
  • Windsurf AI Code Editor (.windsurf/rules/*.md + .windsurf/mcp.json + .codeiumignore)

Why rulesync?

🔧 Tool Flexibility

Team members can freely choose their preferred AI coding tools. Whether it's GitHub Copilot, Cursor, Cline, or Claude Code, each developer can use the tool that maximizes their productivity.

📈 Future-Proof Development

AI development tools evolve rapidly with new tools emerging frequently. With rulesync, switching between tools doesn't require redefining your rules from scratch.

🎯 Multi-Tool Workflow

Enable hybrid development workflows combining multiple AI tools:

  • GitHub Copilot for code completion
  • Cursor for refactoring
  • Claude Code for architecture design
  • Cline for debugging assistance
  • Amazon Q Developer CLI for comprehensive chat-based development with built-in commands and MCP integration
  • OpenCode for secure terminal-based development with granular permission controls
  • Windsurf for comprehensive AI-assisted editing

🔓 No Vendor Lock-in

Avoid vendor lock-in completely. If you decide to stop using rulesync, you can continue using the generated rule files as-is.

🎯 Consistency Across Tools

Apply consistent rules across all AI tools, improving code quality and development experience for the entire team.

📁 Organized Structure

New organized directory structure (.rulesync/rules/) keeps rules well-organized, while maintaining full backward compatibility with legacy layouts (.rulesync/*.md) for existing projects.

Quick Commands

# Initialize new project (recommended: organized rules structure)
npx rulesync init

# Initialize with legacy layout (backward compatibility)
npx rulesync init --legacy

# Add new rule file to recommended location
npx rulesync add typescript-rules

# Add rule file to legacy location (for existing projects)
npx rulesync add typescript-rules --legacy

# Import existing configurations (to .rulesync/rules/ by default)
npx rulesync import --cursor
npx rulesync import --amazonqcli

# Import to legacy location (for existing projects)
npx rulesync import --cursor --legacy
npx rulesync import --amazonqcli --legacy

# Validate rules
npx rulesync validate

# Generate configurations
npx rulesync generate

# Watch for changes
npx rulesync watch

# Show project status
npx rulesync status

# Add generated files to .gitignore
npx rulesync gitignore

Documentation

📖 Core Documentation

🛠️ Tool Integrations

⚡ Features

📚 Guides

License

MIT License

Contributing

Issues and Pull Requests are welcome!

For development setup and contribution guidelines, see CONTRIBUTING.md.