Making agents behave. 🤖
English | 简体中文
Calvin is a PromptOps compiler and synchronization tool that lets you maintain AI rules, commands, and workflows in a single source format, then compile and distribute them to multiple AI coding assistant platforms.
Named after Dr. Susan Calvin — the legendary robot psychologist from Asimov's I, Robot series — Calvin ensures your AI agents follow the rules, stay safe, and behave predictably across all platforms.
Your team uses multiple AI coding assistants: Claude Code, Cursor, GitHub Copilot, Antigravity, Codex. Each has its own format for rules and commands:
- Claude:
.claude/commands/,CLAUDE.md - Cursor:
.cursor/rules/,.cursor/commands/ - VS Code/Copilot:
.github/copilot-instructions.md,AGENTS.md - Antigravity:
.agent/rules/,.agent/workflows/ - Codex:
~/.codex/prompts/
Maintaining the same intent across all these platforms is tedious and error-prone.
Write once, compile everywhere.
.promptpack/ # Your source of truth
├── policies/
│ ├── code-style.md # → Compiles to rules for all platforms
│ └── security.md
├── actions/
│ ├── generate-tests.md # → Compiles to slash commands
│ └── pr-review.md
├── agents/
│ └── reviewer.md # → Compiles to sub-agent definitions
├── skills/
│ └── draft-commit/
│ ├── SKILL.md # → Compiles to SKILL.md folders (Claude/Codex/Cursor)
│ └── scripts/validate.py
└── mcp/
└── github.toml # → MCP configs (planned; currently validated, not generated)
Then run:
calvin deployAnd Calvin generates platform-specific outputs:
.claude/commands/generate-tests.md
.claude/settings.json # With security deny-lists!
.claude/skills/draft-commit/SKILL.md
.cursor/rules/code-style/RULE.md
.cursor/commands/generate-tests.md
.github/copilot-instructions.md
.agent/rules/code-style.md
.agent/workflows/generate-tests.md
.codex/skills/draft-commit/SKILL.md
- 📝 Single Source of Truth: Maintain prompts in one place
- 🔄 Multi-Platform Compilation: Claude Code, Cursor, VS Code, Antigravity, Codex
- 🧠 Skills Support: Directory-based skills for Claude Code, Codex, Cursor
- 🔒 Security by Default: Auto-generates deny lists, blocks risky MCP servers
- 👀 Watch Mode: Auto-recompile on file changes
- 🔍 Check Command: Validate your configuration health
- 🌐 Remote Sync: Push to SSH servers for remote development
- 📦 Zero Dependencies: Single static binary
Windows (PowerShell):
irm https://raw.githubusercontent.com/64andrewwalker/calvin/main/scripts/install-windows.ps1 | iexmacOS / Linux:
curl -fsSL https://github.com/64andrewwalker/calvin/releases/download/nightly/calvin-$(uname -m)-$(uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/apple-darwin/;s/linux/unknown-linux-gnu/').tar.gz | tar xz
sudo mv calvin /usr/local/bin/# macOS (Homebrew) - coming soon
brew install calvin
# Windows (Scoop) - coming soon
scoop install calvin
# Via Cargo
cargo install calvin
# Via cargo-binstall (pre-built binaries)
cargo binstall calvinDownload pre-built binaries from Releases:
| Platform | Download |
|---|---|
| Windows x64 | calvin-x86_64-pc-windows-msvc.zip |
| macOS Apple Silicon | calvin-aarch64-apple-darwin.tar.gz |
| macOS Intel | calvin-x86_64-apple-darwin.tar.gz |
| Linux x64 | calvin-x86_64-unknown-linux-gnu.tar.gz |
| Linux ARM64 | calvin-aarch64-unknown-linux-gnu.tar.gz |
Calvin is written in Rust. To build from source:
# Prerequisites: Rust 1.70+ (https://rustup.rs)
# Clone the repository
git clone https://github.com/your-org/calvin.git
cd calvin
# Build debug version
cargo build
# Build release version (optimized, ~1.1MB binary)
cargo build --release
# Run tests
cargo test
# Install locally
cargo install --path .The compiled binary will be at target/release/calvin.
# Create a .promptpack directory with your policies and actions
mkdir -p .promptpack/policies .promptpack/actions
# Compile to all platforms
calvin deploy
# Preview what would change
calvin diff
# Preview what would change in home directory (~/...)
calvin diff --home
# Watch for changes and auto-recompile
calvin watch
# Validate configuration and security
calvin check
# Deploy everything to home directory targets (~/.claude/, ~/.codex/, ...)
calvin deploy --home
# Sync to remote server
calvin deploy --remote user@host:/path/to/project- Command Reference: CLI commands and options
- Configuration: Config file, environment variables
- Target Platforms: Supported IDEs and output formats
- API Overview: API documentation index
- Library API: Rust library reference
- Frontmatter Spec: Source file format specification
- API Changelog: Format version history
- API Versioning: Versioning policy
- Scope Guide: Understanding project vs user scope
- Pitfall Mitigations: Known issues and solutions
- Architecture Overview: System design and goals
- Layered Architecture: Four-layer clean architecture
- Directory Structure: Codebase organization
- Tech Decisions: Technology choices and rationale
- Security Audit: Security analysis and findings
- API Review: CLI and library API review
Version: v0.6.0
Stage: Feature complete, architecture v2 deployed
Recent additions:
- ✅ Clean Architecture refactoring (domain/application/infrastructure layers)
- ✅ 1000+ tests passing with 75%+ coverage (see CI badge)
- ✅ Cross-platform CI (Ubuntu, Windows, macOS)
- ✅ SSH remote sync with rsync acceleration
- ✅ User-scope installations (
--homeflag) - ✅ Security health checks (
checkcommand) - ✅ Skills support (
.promptpack/skills/<id>/SKILL.md)
See the Architecture documentation for system design details.
Calvin doesn't try to be clever:
- Explicit over implicit: Every rule has clear frontmatter metadata
- Security is mandatory: Deny lists are auto-generated, not optional
- Platform-native: We generate what each platform expects, not hacks
- Deterministic: Same input always produces same output
- Non-destructive: Never overwrites files you created manually
MIT
"A robot must obey orders given it by human beings except where such orders would conflict with the First Law." — Isaac Asimov