
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rulesync-ts
Advanced tools
Easily sync all of your favorite AI assistant instruction files - TypeScript version
🚀 Sync AI assistant rules across Claude, Cursor, Windsurf, GitHub Copilot, and more!
Rulesync is a powerful CLI tool that helps you maintain consistent AI assistant instructions across all your favorite tools. Compose rules from templates or create custom ones, then generate agent-specific files automatically.
npm install -g rulesync-ts
# 1. See available templates
rulesync templates
# 2. Compose rules from templates
rulesync compose base/clean-code language/typescript framework/react
# 3. Generate AI assistant files
rulesync generate
# 4. Add to gitignore
rulesync gitignore
That's it! You now have consistent rules across all your AI assistants.
Use the compose command to build your rulesync.md from pre-built templates:
# Compose from templates - creates rulesync.md automatically
rulesync compose base/clean-code language/typescript framework/react
rulesync generate
Create a rulesync.md file manually with your custom rules:
# My AI Assistant Rules
You are a helpful AI assistant. Please follow these guidelines:
1. Always be concise and clear in your responses
2. If you're unsure about something, say so
## Code Guidelines
- Follow clean code principles
- Add comments for complex logic
Then generate AI assistant files from your custom rules:
rulesync generate
Both approaches create the same result - AI assistant files generated from your rulesync.md source file!
Rulesync generates configuration files for these AI assistants. You can enable/disable specific assistants as needed.
| Assistant | File Location |
|---|---|
| Claude | CLAUDE.md |
| Cursor | .cursorrules |
| Windsurf | .windsurfrules |
| GitHub Copilot | .github/copilot-instructions.md |
| Gemini CLI | GEMINI.md |
| Cline | .clinerules/project.md |
| Junie | .junie/guidelines.md |
| OpenAI Codex | AGENTS.md |
| Aider | .aider.conf.yml |
| Continue.dev | .continue/config.json |
| Amazon Q Developer | .amazonq/rules/coding-guidelines.md |
| Sourcegraph Cody | .vscode/cody.json |
# List available templates
rulesync templates
# Compose rules from templates and files
rulesync compose <template1> <template2> [files...]
# Generate AI assistant files
rulesync generate [options]
# Manage AI assistants
rulesync agents [enable|disable] [assistant]
# View configuration
rulesync config
# Add files to .gitignore
rulesync gitignore
# Set base rules
rulesync base [path]
Note: For details on managing AI assistants, see Agent Management
# Single template
rulesync compose base/clean-code
# Multiple templates
rulesync compose base/clean-code language/python framework/django
# Mix templates with custom files
rulesync compose base/security ./company-guidelines.md
# Remote URLs
rulesync compose base/clean-code https://example.com/team-rules.md
# Generate with options
rulesync generate --force
rulesync generate --from ./custom-rules.md
Set persistent base rules that are included in all generations. These work alongside templates and custom files:
# From a URL
rulesync base https://company.com/coding-standards.md
# From a local file
rulesync base ./team-guidelines.md
# View current base rules
rulesync base
Control which AI assistants are active:
# List all agents
rulesync agents
# Disable specific agent
rulesync agents disable cursor
# Enable specific agent
rulesync agents enable cursor
./.rulesync/rulesync.json (project-specific)~/.config/rulesync/rulesync.json (user-wide)Rulesync automatically detects if you're in a project directory (has package.json or composer.json) and uses local configuration accordingly.
These examples demonstrate different ways to use rulesync. For a complete command reference, see Commands.
rulesync compose base/clean-code base/testing language/typescript framework/react
rulesync generate --force
rulesync gitignore
rulesync compose base/clean-code base/security language/python framework/django
rulesync generate --force
rulesync gitignore
rulesync base https://company.com/coding-standards.md
rulesync compose base/clean-code language/typescript ./project-specific.md
rulesync generate --force
After running rulesync generate, your project will have files for all supported AI assistants:
project/
├── rulesync.md # Composed source rules
├── CLAUDE.md # Claude AI rules
├── .cursorrules # Cursor IDE rules
├── .windsurfrules # Windsurf IDE rules
├── GEMINI.md # Gemini CLI rules
├── AGENTS.md # OpenAI Codex rules
├── .github/
│ └── copilot-instructions.md # GitHub Copilot rules
├── .clinerules/
│ └── project.md # Cline rules
├── .junie/
│ └── guidelines.md # Junie rules
├── .aider.conf.yml # Aider rules
├── .continue/
│ └── config.json # Continue.dev rules
├── .amazonq/
│ └── rules/
│ └── coding-guidelines.md # Amazon Q Developer rules
├── .vscode/
│ └── cody.json # Sourcegraph Cody rules
├── .gitignore # Updated with AI assistant files
└── .rulesync/
└── rulesync.json # Local configuration
By default, rulesync uses rulesync.md (created via templates or manually). You can also specify custom source files:
# Generate from custom file instead of rulesync.md
rulesync generate --from ./api-guidelines.md
# Force overwrite without prompts
rulesync generate --force
# Overwrite existing files (with prompts)
rulesync generate --overwrite
# Force composition without prompts
rulesync compose --force base/clean-code language/go
# Interactive composition (shows available templates)
rulesync compose
# View detailed configuration
rulesync config
# Reset to defaults (disables no agents)
rm .rulesync/rulesync.json
# Clone and setup
git clone https://github.com/dmccown1500/rulesync-ts.git
cd rulesync-ts
npm install
# Development
npm run dev # Run in development mode
npm run build # Build the project
npm test # Run tests
npm run lint # Lint code
npm run format # Format code
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This is a TypeScript rewrite of the original rulesync project by JP Caparas, enhanced with modern template-based composition and expanded AI assistant support.
⭐ Like this project? Give it a star on GitHub!
FAQs
Easily sync all of your favorite AI assistant instruction files - TypeScript version
The npm package rulesync-ts receives a total of 3 weekly downloads. As such, rulesync-ts popularity was classified as not popular.
We found that rulesync-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.