Quickstart guide
Get AlignTrue running in under 60 seconds with two commands.
Prerequisites
- Node.js 20+ - Download
- An AI coding agent - Cursor, GitHub Copilot, Claude Code, or any of 28+ supported agents
Install AlignTrue
npm install -g aligntruePrefer a different package manager?
yarn
bash yarn global add aligntrue Prefer the short alias? aln works for every command (e.g., aln init).
Alternative: Use npx for one-off commands without installing: npx aligntrue init
Quick start (2 commands)
1. Initialize
cd your-project
aligntrue initThis auto-detects any existing agent files (Cursor .mdc, CLAUDE.md, etc.) and lets you choose which ones to import:
- Single file: Imported automatically without prompts
- Small folder (2-10 files): Shows list with quick confirm
- Large or multiple folders: Shows summary, lets you select folders
If no files are found, you’ll get a fresh AGENTS.md starter. After import, it writes:
.aligntrue/config.yaml- Configuration with detected exporters.aligntrue/rules- Imported rules (your single source of truth)- Agent files - Updated in their native formats on next sync
Tip: By default,
aligntrue initautomatically runsaligntrue syncafter initialization. If you use--no-sync, you can run sync manually later when you’re ready.
Want to start with external rules? Use aligntrue init --source <git-url> to import from GitHub, GitLab, SSH URLs, or local paths. See Working with external sources for all supported source formats.
2. Customize your rules
Edit rules in .aligntrue/rules/. Create .md files for your rule categories:
# Project rules
## Use TypeScript strict mode
Enable strict mode in tsconfig.json for better type safety. This catches more errors at compile time and makes refactoring safer.
Set these in tsconfig.json:
- noImplicitAny: true
- strictNullChecks: true
- strictFunctionTypes: trueThat’s it! Save to .aligntrue/rules/typescript.md, then run aligntrue sync to export to all agents.
Where to edit: Only in .aligntrue/rules/ directory
Edit markdown files in .aligntrue/rules/. All agent files (Cursor .mdc, AGENTS.md, etc.) are read-only exports.
Data flow:
Edit files in .aligntrue/rules/
↓
aligntrue sync (loads rules, validates, exports)
↓
All agent files (read-only, auto-generated)Important: Agent files are under AlignTrue’s control. Edits to agent files will be backed up and overwritten on the next sync. Always edit .aligntrue/rules/ instead.
Want automated sync? Use a pre-commit hook or editor integration. See the CI/CD integration guide.
What you get
After running aligntrue sync, you’ll have agent-specific rule files:
For Cursor:
.cursor/rules/*.mdc- Rules in Cursor’s native format (one file per rule)
For GitHub Copilot, Claude Code, Aider, and others:
AGENTS.md- Universal markdown format
For VS Code with MCP:
.vscode/mcp.json- Model Context Protocol configuration (if enabled)
Verify it works
Let’s confirm your agent is using the rules:
Cursor verification
- Open Cursor Settings (Cmd/Ctrl + ,)
- Navigate to Features > Cursor Rules
- Enable “Rules folder” option (if not already enabled)
- Restart Cursor
- Open a file and start a chat
- Ask: “What are the TypeScript rules for this project?”
- Cursor should reference your rules from
AGENTS.md
Expected: Cursor responds with your project’s rules
Problem? See the troubleshooting guide.
GitHub Copilot / Claude Code verification
These agents automatically read AGENTS.md from your project root - no setup needed!
- Open a file
- Start typing code that might violate a rule
- Watch for suggestions that follow your rules
Problem? Make sure AGENTS.md exists in your project root:
ls -la AGENTS.md # Should show the fileCommon issues
Rules not showing in my agent:
- Verify files were created:
ls .cursor/rules/orls AGENTS.md - Restart your IDE completely
- Check agent settings to ensure rules are enabled
- Run
aligntrue syncagain to regenerate files
Still not working? See the troubleshooting guide.
Need deeper checks (VS Code MCP, Windsurf, Warp, etc.)? See the agent verification guide.
How it works
AlignTrue uses a simple three-step process:
- Write rules - Edit
.aligntrue/rules/*.md(single source of truth) - Generate exports - AlignTrue validates and converts to internal IR
- Sync to agents - Agent files (including
AGENTS.md) are generated in their native formats (.cursor/*.mdc,AGENTS.md, etc.)
Workflow:
.aligntrue/rules (you edit) → AlignTrue IR → Agent exports (read-only, includes AGENTS.md)Key concepts:
- Rules - Guidelines for AI agents (e.g., “use TypeScript strict mode”)
- Sync - Convert rules into each agent’s native format
- Agents - AI coding assistants (Cursor, Copilot, Claude Code, etc.)
See the Glossary for complete terminology.
Next steps
Learn more:
- Next Steps - Auto-sync, team mode, git workflows
- Natural Markdown Sections - Authoring reference and examples
- Solo vs. Team Mode - Choosing your mode
Examples:
- Golden Repository - Complete working demo
- Example Aligns - 11 curated rule aligns
See also
- Understand agent support
- Author rules in natural markdown sections
- Learn about sync behavior and how rules flow from source to exports
- Configure .aligntrue/config.yaml
Enable team mode (optional)
For teams that need governance and approval workflows:
aligntrue team enable
# Enables lockfile + team workflow
# Shows configuration summaryThis enables:
- Lockfile generation (deterministic bundle hash)
- Bundle approval workflow
- Optional team-managed sections
- CI drift detection
See Team mode guide for details.
Need help?
- FAQ - Common questions
- Troubleshooting - Common issues
That’s it! You now have consistent AI rules across all your coding agents.