Your AI. Your rules.
Every tool.

Architecture + directives + behavioral profile → one token-optimized payload → Claude Code, Cursor, Windsurf, Cline, Copilot, Continue. 12 languages built-in: TypeScript, Python, Go, Rust, Java, Kotlin, PHP, C#, Ruby, Swift, Elixir, Dart.

Get Started View on GitHub
$ npm i -g @sigil-engine/cli copy copied!
MIT Licensed TypeScript Plugin Architecture

Get Started

1 npm i -g @sigil-engine/cli or: brew tap riomyers/sigil && brew install sigil-cli
2 sigil directives add "Never hardcode credentials" --priority critical Define your AI rules (global, once)
3 sigil init Extract architecture + load directives + configure all AI tools
4 Every AI tool now has architecture + your directives. Token-optimized.
What Your AI Gets

Architecture + directives. One payload.

Run sigil context --tokens 4000 — your AI receives a unified, token-optimized context with architecture and your directives baked in.

sigil context --tokens 4000
$ sigil context --tokens 4000

  # my-app — Architecture Context

  ## Stack
  framework: next.js@16 · orm: drizzle · database: postgresql

  ## Directives (2)
  - Never hardcode credentials [critical]
  - Always use TypeScript strict mode [high]

  ## Entities (31)
  - Users [src/db/schema.ts]: id, email, name, role
  - Posts [src/db/schema.ts]: id, title, content, authorId
  ...29 more

  ## Routes (20)
  - /api/users GET, POST(auth) [src/app/api/users/route.ts]
  - /api/posts GET, POST(auth), DELETE(auth)
  ...18 more

  ## Directives (1)
  - Use server components by default

  ~574 tokens.
Visualization

Explore the dependency graph.

Run sigil graph to launch an interactive force-directed graph of your entire codebase.

Sigil Graph — Cal.com architecture visualization

Open live demo →  ·  Cal.com: 1,072 components · 67 routes · 1,676 exports · parsed in 5.8s

AI Integration

MCP Server — zero-friction context.

Add one line to your AI tool config. Sigil provides architecture + directives for all 12 languages on every session — no manual steps, always fresh, sub-100ms cached.

// Claude Code: ~/.claude/settings.json
"mcpServers": {
  "sigil": { "command": "npx", "args": ["@sigil-engine/mcp-server"] }
}
sigil://context resource

Instant Context

AI reads architecture + directives on session start in <100ms. Entities, routes, patterns, and your rules — everything, instantly.

watch mode

Always Fresh

File watcher auto-updates context when you save. Your AI never works with stale architecture.

sigil_query tool

Rich Queries

AI can query dependency trees, import chains, dead functions, reverse deps — "what depends on User", "show import graph", "find dead code."

The Difference

Before & After

What coding with AI looks like — without Sigil, and with it.

Without Sigil: The Fragmentation Tax

  1. Copy & paste files into the AI, hoping you picked the right ones
  2. Manually write "use TypeScript strict mode" and "run tests first" every session
  3. Switch to Cursor — none of your Claude rules carry over
  4. AI hallucinates function names, ignores your coding standards
  5. Different AI tools, different context, inconsistent output
Result: 6 config files. Zero consistency. Constant repetition.

With Sigil: One Pipe, Every Tool

  1. sigil init — one command extracts architecture, loads directives, configures every AI tool
  2. Your directives follow you everywhere — Claude, Cursor, Windsurf, Cline, Copilot, Continue
  3. AI understands every entity, route, pattern, AND your rules
  4. Token-optimized: critical rules always included, architecture pruned to fit
  5. One source of truth. Every tool. Every session.
Result: consistent AI behavior across every tool you use.
How It Works

Seven commands. Full cycle.

Define directives, extract architecture, visualize it, query it, track drift, check health, get token-optimized context — all from the terminal.

Directives

Define AI rules with priority, category, and conditions. Global directives cascade into every project. Project directives override globals.

$ sigil directives add "Never use any" --priority high
$ sigil directives add "Use pytest" --when-language python
$ sigil directives

1. [G] [critical] (security) Never hardcode credentials
2. [G] [high] (code) Never use any

Init

Extracts architecture, loads directives, detects installed AI tools, and configures all of them in one command.

$ sigil init

✓ Extracted: 31 entities, 28 components, 20 routes
✓ Loaded 4 directives (3 global, 1 project)
✓ Created CLAUDE.md, .cursorrules
✓ Injected 4 directives

Graph

Launch an interactive dependency graph. Click nodes, search, filter by type. Handles 1000+ node codebases.

$ sigil graph

⚡ Sigil Graph — my-app
🌐 http://localhost:4040

Nodes: 176 | Edges: 89

Diff

Detect architectural drift. See what changed structurally — added entities, modified props, removed routes.

$ sigil diff

+ entity: PaymentMethod (5 fields)
~ component: Dashboard
  + prop: billingEnabled: boolean
- route: /api/legacy-auth

Query

Ask questions about your architecture. Dependency trees, reverse deps, import chains, dead function detection.

$ sigil query "what depends on User"

8 dependent(s) of "User":
[component] UserCard imports User
[import] routes/api → schema {User}
...6 more

Health

10 architectural checks. Circular deps, god components, auth gaps, dead functions, config drift. Score 0–100.

$ sigil health

Score: 87/100 (good)
✗ Circular dep: auth → session → auth
⚠ 3 dead functions detected
⚠ 2 env vars missing from .env

Context

Token-optimized output for AI prompts. Critical directives always included, architecture pruned to fit your budget.

$ sigil context --tokens 4000

# my-app — Architecture
Entities (31) · Routes (20) · Directives (4)
~574 tokens.
Use Cases

When to use Sigil

Real scenarios where structured context changes everything.

sigil directives

Rules That Follow You

Define "never hardcode secrets" once. It applies everywhere — Claude Code, Cursor, Windsurf, Cline, Copilot, Continue. Global directives cascade into every project. Project directives override when needed.

sigil context --tokens 4000

Token-Aware Context

Large codebase? Sigil prunes intelligently. Critical directives always included. Architecture fills the remaining budget. Your AI gets the maximum context that fits — not a raw dump that overflows.

sigil health + sigil query

Find Dead Code & Config Drift

Sigil detects unreferenced functions, imported-but-never-called symbols, and env vars that are defined but unused (or used but undefined). Deep static analysis, no runtime needed.

sigil graph

Onboard in 15 Minutes

New to a project with hundreds of files? Launch the interactive graph. Click through components, trace dependencies, understand the architecture visually — without reading a single line of code.

Comparison

Why Sigil?

Existing tools solve pieces of the puzzle. Sigil is the complete picture.

Feature Sigil repomix aider repo-map Cursor Indexing
Structured output YAML/JSON flat text ~ tree-sitter map proprietary
Architecture-aware entities, routes, patterns, call graphs file dump ~ symbols only ~ basic
AI Directives priority, conditional, inherited ~ .cursorrules only
Token-optimized budget-aware pruning
Interactive graph force-directed
Drift detection structural diff
Auto-configures AI tools 6 tools self only
Behavioral profiles global + local
MCP server (auto-context) resource + tools
Global + project rules directives with inheritance
Plugin system any language
Open source MIT MIT Apache 2.0 proprietary

AI Directives with Inheritance

Define rules globally, override per-project. Priority-based pruning under token pressure. Conditional by language/framework.

No other tool offers structured, portable AI directives.

Token-Optimized Unified Context

Architecture + directives in one budget-aware payload. Critical rules never pruned.

Structured YAML/JSON Output

Not a flat text dump — structured architecture with entities, components, routes, and relationships.

repomix: flat text · aider: tree-sitter map · Cursor: proprietary

Interactive Dependency Graph

Force-directed visualization of your entire codebase. Click, search, filter by type.

No other tool offers this.

Architectural Drift Detection

Compare snapshots to see what changed structurally — added entities, modified props, removed routes.

Auto-Configures 6 AI Tools

Claude Code, Cursor, Windsurf, Cline, Copilot, Continue — one command configures all.

MCP Server — Zero-Friction AI Context

One config line. AI gets full architecture on every session. Auto-updates on file changes.

Behavioral Profiles

Define your identity, style, and workflow rules globally. Every project, every AI tool.

12 Languages Built-In

TypeScript, Python, Go, Rust, Java, Kotlin, PHP, C#, Ruby, Swift, Elixir, Dart — all with lazy loading. Extend via plugins.

MIT Licensed & Open Source

Use it everywhere. Embed it in anything. No vendor lock-in.

Development

Recent Activity

Live from the GitHub repository.

Loading commits...