Skip to main content

VARCHY 🏛️

Your idea. Fully architected.

Varchy Hero Banner

PyPI version PyPI Downloads License: MIT Python 3.12+ MCP Ready Tests Readiness Engine Zero Telemetry

Varchy is the open-source software architect and planning orchestrator for the AI coding era.
It transforms a one-sentence idea into a complete, structured, mathematically validated, and implementation-ready engineering blueprint before a single line of application code is written.


⚡ The Problem: The "Vibe Coding" Hangover

AI coding assistants (Cursor, Claude Code, GitHub Copilot, Gemini CLI) write code in seconds. But without upfront architecture, developers inevitably face the same disaster:

❌ Vibe Coding Without Architecture:
   Prompt: "Build me an Uber for dog walkers"
     ↳ Agent hallucinates database models on the fly
     ↳ Screen routes conflict with backend API contracts
     ↳ Edge cases, state machines, and auth are forgotten
     ↳ Context window fills up -> Agent forgets earlier decisions
     ↳ Hours wasted debugging spaghetti code and broken dependencies
✅ Vibe Coding With Varchy:
   Command: varchy generate --idea "Uber for dog walkers" --template saas
     ↳ Structured PRD with stable requirement IDs (REQ-001)
     ↳ Screen specs & interaction states (SCREEN-001)
     ↳ Relational schemas & API contracts (ENT-001, API-001)
     ↳ Phased task DAG with zero circular dependencies (TASK-001)
     ↳ 100-Point Deterministic Readiness Gate verification
     ↳ Exported AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules, & Copilot rules
     ↳ Your coding agent implements tasks in perfect sequence!

❓ Frequently Asked Before Getting Started

1. Do I need to clone the Varchy repository to use it?

No! You do not need to clone the repository or touch Python code. Varchy is a command-line tool distributed via PyPI. You install it once via pip3 / pip, and you can run the varchy command inside any folder on your computer (an empty folder where you want to start a new project, or an existing project).

2. Which AI does Varchy use? Why did it work without an API key?

Varchy features a dual-engine architecture:

  1. Built-in Offline Engine (Default): If you don't provide an API key, Varchy doesn't fail or crash. Instead, it activates its built-in deterministic engine that generates complete, fully valid architectural blueprints offline with zero network requests and zero cost.
  2. Live Cloud & Local AI Models (BYOK): When you want production-grade, nuanced AI thinking for novel ideas, Varchy connects directly to OpenAI (gpt-4o, o3-mini), Google Gemini (gemini-2.5-pro, gemini-2.5-flash), xAI Grok (grok-2), or Ollama (free local models like llama3 or deepseek-r1). See AI Provider Configuration below.

🚀 Installation & Troubleshooting

Standard Installation

Open your terminal and run:

# macOS / Linux (Recommended)
pip3 install varchy

# Windows
pip install varchy

💡 Troubleshooting Common Installation Errors

Error: zsh: command not found: pip

If you run pip install varchy on macOS and see:

devfiend@Matthews-MacBook-Air ~ % pip install varchy
zsh: command not found: pip

Why this happens: Modern macOS and Linux distributions do not alias the plain pip command to avoid conflicting with system Python. Instead, Python installs pip3.

Solutions (in order of recommendation):

  1. Use pip3 directly:

    pip3 install varchy
    
  2. Use the Python module launcher (always works):

    python3 -m pip install varchy
    
  3. If you see No module named pip:

    python3 -m ensurepip --upgrade
    python3 -m pip install --upgrade pip
    python3 -m pip install varchy
    
  4. Verify your Python and pip installation:

    python3 --version
    python3 -m pip --version
    
  5. (Optional) Alias pip to pip3 permanently in your shell:

    echo 'alias pip="pip3"' >> ~/.zshrc && source ~/.zshrc
    

Error on Windows: 'varchy' is not recognized as the name of a cmdlet or Script ... is not on PATH

If you run pip install varchy on Windows PowerShell and see:

WARNING: The script varchy.exe is installed in 'C:\Users\<User>\AppData\Roaming\Python\PythonXX\Scripts' which is not on PATH.

Followed by:

PS C:\> varchy --version
varchy : The term 'varchy' is not recognized as the name of a cmdlet, function, script file, or operable program.

Why this happens: When pip installs packages in user mode on Windows, it puts executable scripts into your user Python Scripts directory (e.g. %APPDATA%\Python\Python314\Scripts). Windows does not add this directory to your user PATH environment variable by default.

Solutions (choose one):

  1. Run directly with Python module runner (Works immediately without modifying PATH):

    python -m varchy --version
    python -m varchy doctor
    python -m varchy generate --idea "My project idea"
    
  2. Add Python Scripts to PATH permanently (Recommended): Run the following command in PowerShell:

    $userScripts = python -c "import site, os; print(os.path.join(site.USER_BASE, 'Scripts'))"
    [Environment]::SetEnvironmentVariable(
        "Path",
        [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User) + ";$userScripts",
        [EnvironmentVariableTarget]::User
    )
    

    Then restart PowerShell, and varchy will be recognized globally!

  3. Quick fix for the current PowerShell window:

    $env:Path += ";$env:APPDATA\Python\Python314\Scripts"
    varchy --version
    

Upgrading Varchy to the Latest Version

pip3 install --upgrade varchy

Verifying Installation

Run:

varchy --version
varchy doctor

🧠 How AI Providers Work in Varchy

Varchy supports a Bring-Your-Own-Key (BYOK) model. Your API keys are stored securely in your operating system's hardware-backed Keychain (keyring) or read from environment variables. Keys never touch git, files on disk, logs, or external servers.

Provider Model Family Key Required? Cost Best For
Built-in Offline Engine Internal Blueprint Engine None Free Instant blueprints, offline work, CI/CD, testing
Groq (LPU Ultra-Fast) openai/gpt-oss-120b, openai/gpt-oss-20b, llama-3.3-70b-versatile Yes (Free Key at console.groq.com) Free Tier Available Sub-second architectural generation & LPU speed
OpenAI gpt-4o, gpt-4o-mini, o3-mini Yes (API Key) Pay per token Enterprise systems, strict schema logic
Google Gemini gemini-2.5-pro, gemini-2.5-flash Yes (API Key) Pay per token Deep architectural reasoning & long context
xAI Grok grok-2 Yes (API Key) Pay per token Rapid ideation & modern system design
Ollama llama3, deepseek-r1, qwen2.5 None Free 100% private local LLM running on your GPU/CPU

Option A: Using the Free Built-in Offline Engine (Zero Setup)

No configuration is needed! Just run:

varchy generate --idea "A realtime task tracker" --template saas

(Uses the deterministic blueprint generator with zero network calls and zero cost).


Option B: Connecting Cloud AI (Groq, OpenAI, Gemini, Grok)

You can save your API keys securely into your OS Keychain:

# Save Groq key (Ultra-fast LPUs, free key at console.groq.com)
varchy config set-key groq gsk_...

# Save OpenAI key (securely stored in OS Keychain)
varchy config set-key openai sk-proj-...

# Save Google Gemini key
varchy config set-key gemini AIzaSy...

# Save xAI Grok key
varchy config set-key grok xai-...

Alternatively, you can set standard environment variables:

export GROQ_API_KEY="gsk_..."
export OPENAI_API_KEY="sk-proj-..."
export GEMINI_API_KEY="AIzaSy..."
export XAI_API_KEY="xai-..."

Then generate using your preferred provider and model:

# Using Groq (Blazing fast LPU inference)
varchy generate --idea "A realtime collaborative kanban board" --provider groq

# Using OpenAI GPT-4o
varchy generate --idea "A peer-to-peer equipment rental marketplace" --provider openai --model gpt-4o

# Using Google Gemini 2.5 Pro
varchy generate --idea "A multi-tenant billing & metering platform" --provider gemini --model gemini-2.5-pro

# Using xAI Grok
varchy generate --idea "A real-time crypto telemetry dashboard" --provider grok --model grok-2

Option C: Using Ollama for 100% Free, Private Local AI

If you want live LLM generation without paying for API keys or sending code to the cloud:

  1. Install and start Ollama:
    ollama run llama3
    
  2. Run Varchy pointing to Ollama:
    varchy generate --idea "A local-first encrypted notes app" --provider ollama --model llama3
    

Inspecting Configured Providers & Models

Check what providers and keys are currently recognized on your machine:

# List all providers and their authentication status
varchy providers

# List all available models across providers
varchy models

# Diagnose system health, Python environment, and OS Keychain
varchy doctor

📖 The Complete Step-by-Step User Journey

Here is how a developer goes from an idea to a fully functioning application built by an AI coding agent:

┌────────────────────────────────────────────────────────────────────────┐
│                          THE VARCHY WORKFLOW                           │
├─────────────┬──────────────────────────────────────────────────────────┤
│ 1. Scaffolding│ mkdir my-app && cd my-app                              │
│ 2. Archetype │ varchy templates                                         │
│ 3. Blueprint │ varchy generate --idea "..." --template saas            │
│ 4. Validation│ varchy validate                                         │
│ 5. Agent Run │ Cursor / Claude Code reads .cursorrules or AGENTS.md    │
│ 6. Handoff   │ varchy task next                                        │
│ 7. Iteration │ varchy update --requirement REQ-001 ...                 │
└─────────────┴──────────────────────────────────────────────────────────┘

Step 1: Create a Project Directory

Open your terminal and navigate to where you want your new project to live:

mkdir my-saas-app
cd my-saas-app

Step 2: Browse Architectural Templates

Explore pre-tuned architectural archetypes:

varchy templates

Available archetypes include:

  • saas: Multi-tenant web platform with RBAC, PostgreSQL schema, Stripe billing, and auth.
  • local_first: Encrypted zero-knowledge offline-first client application with CRDT sync.
  • api_backend: High-throughput microservice / headless REST & RPC backend.
  • dev_tool: Ergonomic CLI developer utility with local configuration & state.
  • mobile_app: Offline-ready cross-platform mobile application.

Inspect any template:

varchy templates inspect saas

Step 3: Generate the Architectural Blueprint

Run varchy generate with your idea:

varchy generate --idea "A collaborative bug tracking platform for remote hardware teams" --template saas

Want an interactive discovery session?

varchy generate --idea "A telemedicine booking platform" --mode interactive

Varchy will ask clarifying questions to nail down edge cases, authentication preferences, and non-functional requirements before generating.

Step 4: Run the 100-Point Deterministic Readiness Gate

Ensure your architecture has zero missing contracts, orphan entities, or circular task dependencies:

varchy validate
       🏛️ Blueprint Readiness Assessment (100-Point Deterministic Score)
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━┳━━━━━━━┳━━━━━━━━┓
┃ Category                    ┃ Max ┃ Score ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━╇━━━━━━━╇━━━━━━━━┩
│ Product Requirements        │  20 │  20.0 │  PASS  │
│ Technical Architecture      │  20 │  20.0 │  PASS  │
│ UI/UX Specifications        │  15 │  15.0 │  PASS  │
│ Development Planning        │  15 │  15.0 │  PASS  │
│ Database & API Contracts    │  10 │  10.0 │  PASS  │
│ Testing Strategy            │  10 │  10.0 │  PASS  │
│ Security & Deployment       │  10 │  10.0 │  PASS  │
└─────────────────────────────┴─────┴───────┴────────┘
Total Readiness Score: 100.0 / 100 — READY FOR IMPLEMENTATION
Critical Blockers: 0 | Warnings: 0 | Recommendations: 0

Step 5: Feed Tasks to Your Coding Agent

Open your project in Cursor, VS Code, or launch Claude Code:

cursor .

Ask your coding agent:

"Read .cursorrules and docs/04-development/ and implement the next uncompleted task."

Or run Varchy's task router directly from the command line:

varchy task next
╭─ 🏛️ Varchy Task Handoff ────────────────────────────────────────────────────────╮
│ Next Actionable Implementation Task: [TASK-001]                                 │
│ Title: Repository Scaffolding & Configuration                                   │
│ Phase: PHASE-1 | Priority: critical                                             │
│ Description: Initialize project directory structure, config, and core deps...  │
│                                                                                 │
│ Associated Requirements:                                                        │
│   • [REQ-001] Core Multi-Tenant Engine                                          │
│                                                                                 │
│ Completion Criteria:                                                            │
│   • Project installs cleanly in fresh virtual environment                       │
│   • Core linting, typing, and test suites pass                                  │
╰─────────────────────────────────────────────────────────────────────────────────╯

List all tasks organized by phase:

varchy task list

Step 6: Incrementally Update Requirements Without Breaking History

When project requirements change mid-development, update only what changed without blowing away your previous work:

varchy update --requirement REQ-001 --title "Enhanced RBAC with SSO" --acceptance-criteria "['Support SAML 2.0', 'Support Okta OIDC']"

Re-export and re-validate automatically:

varchy export
varchy validate

🤖 Coding Agent Integration

Varchy automatically generates tailored configuration files for every major AI coding assistant:

Tool Generated Configuration File How It Works
Cursor .cursorrules Cursor Composer automatically respects your database schemas, API contracts, and task ordering.
Claude Code CLAUDE.md Claude loads project architecture rules into memory at start.
Gemini CLI GEMINI.md Gemini Agent CLI adopts architectural constraints and requirement traceability.
GitHub Copilot .github/copilot-instructions.md Copilot Chat abides by architectural contracts and guidelines.
Universal Agents AGENTS.md Standard markdown specification for any autonomous coding agent.

🔌 Model Context Protocol (MCP) Integration

Connect Varchy directly to Cursor, Claude Desktop, or any MCP-compatible environment as a live intelligence server:

Cursor Setup (~/.cursor/mcp.json or .cursor/mcp.json)

{
  "mcpServers": {
    "varchy": {
      "command": "varchy",
      "args": ["mcp", "run"]
    }
  }
}

Claude Desktop Setup (claude_desktop_config.json)

{
  "mcpServers": {
    "varchy": {
      "command": "varchy",
      "args": ["mcp", "run"]
    }
  }
}

Live MCP Features

  • Tools:
    • varchy_initialize_project: Initialize project workspace from an MCP prompt.
    • varchy_generate_blueprint: Run the 10-stage DAG pipeline.
    • varchy_validate_blueprint: Run deterministic 100-point validation.
    • varchy_get_context: Fetch full context for any requirement (REQ-###) or task (TASK-###).
  • Realtime Resources:
    • varchy://project/overview
    • varchy://project/prd
    • varchy://project/architecture
    • varchy://project/database (includes Mermaid ER diagrams)
    • varchy://project/tasks
    • varchy://project/validation
  • Reusable Prompts:
    • review_architecture: Live readiness check with blocker analysis.
    • prepare_task_implementation: Packages requirements, database models, and acceptance criteria for a given TASK-###.

🛠️ Complete CLI Command Reference

Command Description Example
varchy init Initialize a new project workspace varchy init --name "ShopSync" --template saas
varchy templates List all available architectural archetypes varchy templates
varchy templates inspect Inspect details of an archetype varchy templates inspect saas
varchy analyze Perform pre-generation domain and risk analysis varchy analyze --idea "..."
varchy generate Execute 10-stage architecture DAG pipeline varchy generate --idea "..." --template saas
varchy validate Run 100-point deterministic readiness scoring varchy validate
varchy task next Output the next actionable task in dependency DAG varchy task next
varchy task list Display all development tasks grouped by phase varchy task list
varchy update Update a specific requirement or component varchy update --requirement REQ-001 ...
varchy export Re-compile markdown documentation & agent files varchy export
varchy status Show current blueprint health, stages, and metrics varchy status
varchy providers List supported AI providers & auth status varchy providers
varchy models List recommended models per provider varchy models
varchy doctor Diagnose environment, Keychain, and setup varchy doctor
varchy config set-key Securely store provider key in OS Keychain varchy config set-key openai sk-...
varchy mcp run Launch Model Context Protocol server over stdio varchy mcp run

📁 Generated Project Layout

When Varchy generates an architecture, your project directory looks like this:

my-project/
├── .varchy/                       # Machine System of Record (Git-ignored)
│   ├── project.json               # Metadata & configuration
│   ├── checkpoints/               # Atomic stage transaction snapshots (crash-resilient)
│   └── blueprints/current.json    # Master typed Pydantic domain models
│
├── docs/                          # Compiled Engineering Specifications (Git-ignored)
│   ├── 01-product/                # PRD, requirements, user personas
│   ├── 02-design/                 # Design system, screen specs, UI states
│   ├── 03-engineering/            # Tech stack, DB schema (Mermaid ER), API contracts
│   ├── 04-development/            # Phased task roadmap with dependency DAG
│   └── 05-quality/                # Test strategies, unit/integration test cases
│
├── AGENTS.md                      # Universal Coding Agent Guidelines
├── CLAUDE.md                      # Claude Code instructions
├── GEMINI.md                      # Gemini CLI instructions
├── .cursorrules                   # Cursor IDE Composer / Agent rules
├── .github/copilot-instructions.md # GitHub Copilot guidelines
└── README.md                      # Project architectural summary

🧪 Testing & Verification

Varchy is engineered with a strict 100-level automated test harness covering all CLI commands, validation algorithms, DAG cycle detection, and MCP endpoints:

pytest -v
tests/test_cli.py ...                                                    [ 11%]
tests/test_cli_advanced.py ......                                        [ 34%]
tests/test_cli_tasks_and_ide.py ..                                       [ 42%]
tests/test_engine_unified.py .                                           [ 46%]
tests/test_mcp_extended.py .                                             [ 50%]
tests/test_pipeline_stages.py ..                                         [ 57%]
tests/test_schemas.py ...                                                [ 69%]
tests/test_templates_and_updates.py .....                                [ 88%]
tests/test_validation_engine.py ...                                      [100%]

============================= 26 passed in 18.48s ==============================

🤝 Contributing

Contributions are warmly welcomed! Please read CONTRIBUTING.md to get started.


⚖️ License

Distributed under the MIT License. See LICENSE for more information.

Metadata

Release files for varchy 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for varchy 0.1.3
File Size Uploaded Provenance Actions
varchy-0.1.3.tar.gz 580.1 kB With provenance Details for varchy-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for varchy 0.1.3
File Interpreter ABI Platform Actions
varchy-0.1.3-py3-none-any.whl Python 3 none any Details for varchy-0.1.3-py3-none-any.whl

Total release size: 649.0 kB

Release files / varchy-0.1.3.tar.gz

Download URL varchy-0.1.3.tar.gz
Size 580.1 kB
Tags Source
SHA-256 checksum
How to use checksums
751fa6770ea25a38e2244397fcc3fe9a1ded5afa9e4394c1e557e1e8dc5223f7
BLAKE2b-256 checksum
How to use checksums
f1da1d5b76dec4e364d4e68bd81fea60c801a90fe10aeb1735b669bb58f9158a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / varchy-0.1.3-py3-none-any.whl

Download URL varchy-0.1.3-py3-none-any.whl
Size 68.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
744741e17c63b29b641e2274c55f6a85781b68641ca8063a45c24621226895bd
BLAKE2b-256 checksum
How to use checksums
9d139a4ebab1f4ffe39af6e51d583dcea8d6220d82ca77214acb3efb8cd135bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for varchy 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for varchy-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page