Skip to content

Repository files navigation

Calvin

Making agents behave. 🤖

English | 简体中文

License: MIT CI Nightly Coverage

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.

The Problem

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.

The Solution

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 deploy

And 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

Features

  • 📝 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

Installation

Quick Install (Recommended)

Windows (PowerShell):

irm https://raw.githubusercontent.com/64andrewwalker/calvin/main/scripts/install-windows.ps1 | iex

macOS / 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/

Package Managers

# 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 calvin

Manual Download

Download 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

Building from Source

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.

Quick Start

# 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

Documentation

User Documentation

API Reference

Guides

Architecture (for Contributors)

Reports

Project Status

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 (--home flag)
  • ✅ Security health checks (check command)
  • ✅ Skills support (.promptpack/skills/<id>/SKILL.md)

See the Architecture documentation for system design details.

Philosophy

Calvin doesn't try to be clever:

  1. Explicit over implicit: Every rule has clear frontmatter metadata
  2. Security is mandatory: Deny lists are auto-generated, not optional
  3. Platform-native: We generate what each platform expects, not hacks
  4. Deterministic: Same input always produces same output
  5. Non-destructive: Never overwrites files you created manually

License

MIT


"A robot must obey orders given it by human beings except where such orders would conflict with the First Law." — Isaac Asimov

About

Calvin lets you maintain AI rules, commands, and workflows in one place, for cursor, antigravity, codex, claude code, opencode etc.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages