Skip to Content

⚠️ Alpha Status: This project is in active development. Most core features work well, but expect API changes before 1.0. Use for development/internal projects first. If you find issues create an issue  or PR.

Introduction

Instantly sync rules across agents, people, projects and teams. Start in 60 seconds.

Write rules once in markdown. Sync everywhere. Stay aligned.

  • Solo developers: Keep your personal AI rules consistent across projects and machines.
  • Teams: Shared rule sets with version control, CI validation, and drift detection.

CI npm version Node 20+ License: MIT

Solo developer? Start here

Get started in 60 seconds:

npm install -g aligntrue aligntrue init

Auto-detects agents, imports existing rules, or creates AGENTS.md. Generates and updates each agent’s native files (Cursor, AGENTS.md, VS Code, etc.).

Edit rules in .aligntrue/rules/. AlignTrue works seamlessly with Cursor, GitHub Copilot, Claude Code, and other popular agents, exporting to each in its native format.

Start with existing rules? Import from any git source:

aligntrue init --source https://github.com/org/rules

Supports GitHub, GitLab, SSH URLs, version tags, and local paths. See all source options →

Verify it works | Solo guide

Common workflows

Solo developer (default):

aligntrue init # One-time setup aligntrue sync # Update agents when rules change

Solo developer (external source):

aligntrue init --source https://github.com/your/rules aligntrue sync

Import rules from GitHub, GitLab, or any git repository. Use aligntrue add source <url> to keep a connected source for ongoing updates; use aligntrue add <url> for a one-time import. More examples →

Team mode (opt-in):

aligntrue team enable # Enable team mode (creates lockfile) aligntrue check # Validate in CI

Centralized editing:

  • Edit rules in .aligntrue/rules/ → sync to all agents
  • All agent files are read-only exports

See guides for details.

Optional verification:

aligntrue sync --dry-run # Preview changes aligntrue check # Validate rules (great for CI)

Migrating from Ruler:

aligntrue migrate ruler # Convert Ruler config to AlignTrue aligntrue sync # Sync to all agents

See migrate command for details.

Why AlignTrue

  • Auto-detects and imports - Finds common agents automatically and imports existing rules from Cursor, AGENTS.md, Claude, and more
  • 60-second setup with zero config - Run aligntrue init and AlignTrue handles agent detection and rule import
  • Single source of truth - Edit rules in .aligntrue/rules/; changes sync to all agents automatically
  • Preview + safety - --dry-run previews changes; backups, validation, and deterministic exports keep outputs consistent (see Features for details)

Features

Complete feature matrix

FeatureDescriptionLearn more
Core Sync
Centralized editingEdit your configured edit source file; AlignTrue keeps everything alignedSync Behavior
Dry-run modePreview changes before applying with --dry-runBasic Commands
Multi-layer safetyMandatory workspace backups, individual file backup, and section-level preservationBackup & Restore
Atomic operationsSafe file writes prevent corruption during syncsFeatures
Agent Support
Auto-detectionFinds Cursor, Copilot, Claude, VS Code, and other popular agents automaticallyHow it works
Broad coverageNative exporters for many AI coding agentsAgent Support
Unidirectional syncEdit in .aligntrue/rules/, sync to all agents automaticallyGetting Started
Multi-format supportAgent-optimized formats (.mdc, AGENTS.md, MCP configs, multi-file exports)Agent Support
Per-exporter configControl ignore file generation and format options per agentExport Formats
.alignignore protectionProtect files from modifications using gitignore-style patternsFeatures
Team Collaboration
LockfilesPin rule versions with .aligntrue/lock.json for reproducible buildsTeam Mode
Drift detectionCompare lockfile vs allowed sources with multiple output formatsDrift Detection
CI validationBuilt-in commands for CI/CD pipelines with aligntrue check and aligntrue driftCI/CD Integration
Customization
PlugsDynamic value slots with validation for flexible rulesCustomization
OverlaysSurgical modifications to aligns for safe fork-resistant customizationCustomization
ScopesHierarchical rules for monorepos and complex projectsScopes
Export format optionsChoose native multi-file or AGENTS.md format per agentExport Formats
Per-rule targetingControl which agents receive specific rules via frontmatterPer-Rule Targeting
Developer Experience
.gitignore automationSmart management of generated filesGit Workflows
Verbose outputDetailed execution logs with --verbose flagCLI Reference
Ruler migrationAuto-detect and convert from RulerFeatures
Backup & restoreSelective file restoration with diff preview via aligntrue revertBackup & Restore
Structure Preservation
Import structureRecursive scanning preserves filenames and directory organization during importWorking with external sources
Export structureMulti-file exporters mirror .aligntrue/rules/ subdirectory structureSolo guide or Team guide
Safety & Reliability
Built-in safetyMandatory backups with quick rollback via aligntrue revertBackup & Restore
Deterministic exportsSchema validation and reproducible hashing keep outputs stableFeatures

Broad agent support

AlignTrue supports a wide range of AI coding agents with native exporters.

Popular agents:

  • Cursor (.mdc files)
  • GitHub Copilot (AGENTS.md)
  • Claude (AGENTS.md + CLAUDE.md)
  • Aider (AGENTS.md + .aider.conf.yml)
  • Windsurf (AGENTS.md + MCP config)
  • VS Code MCP agents
  • Amazon Q, Firebase Studio, OpenHands, Zed, and more

View the full compatibility matrix →

How it works

  1. AlignTrue detects your agents - Finds Cursor, Copilot, Claude Code, and 30+ others automatically
  2. Edit in .aligntrue/rules/ - Create and edit markdown files with your rules
  3. Run sync - AlignTrue exports to all agents in their native formats
  4. Stay aligned - All agents receive identical rules automatically

Add to your workflow

Integrate AlignTrue into your development and CI/CD pipelines in seconds. Use validation gates, precommit hooks, and automated checks.

NPM scripts (precommit hooks):

{ "scripts": { "aligntrue:check": "aligntrue check --ci", "aligntrue:drift": "aligntrue drift --gates", "aligntrue:sync": "aligntrue sync", "precommit": "aligntrue check --ci" } }

GitHub Actions:

# .github/workflows/aligntrue-check.yml name: AlignTrue Validation on: [pull_request] jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - run: npm install -g aligntrue - run: aligntrue check --ci - run: aligntrue drift --gates

View solo developer guide →

Key concepts

Reference

Contributing

Want to contribute? Check out the guides:

Development

Setting up AlignTrue for local development:

  • Setup - Prerequisites and installation
  • Workspace - Monorepo structure and packages
  • Commands - Development commands and scripts
  • Architecture - Key architectural concepts

Learn more

Support

License

MIT (see LICENSE )

Last updated on