MIT open source · Zero npm install

# Grounded context AI can trust.
Deterministic. Verifiable.

SigMap builds a deterministic, auditable signature-and-evidence map of your codebase — so agents, CI, and reviewers can trust and verify which files and symbols are real before acting. No embeddings, no vector DB, fully offline. 97% fewer tokens comes free.

Get started in 60 seconds View on GitHub →
terminal
$ node gen-context.js --report
SigMap token report
──────────────────────────────
Raw source files ~80,000 tokens
Repomix compressed ~8,000 tokens
SigMap ~4,000 tokens −97%
──────────────────────────────
$ # Copilot now knows your codebase.
97%Token reduction
29 Languages
0 npm deps
4K Tokens / session
Try in 30 seconds
terminal
$ npx sigmap
→ writes .github/copilot-instructions.md
$ sigmap ask "Where is auth handled?"
→ ranks the right files, writes query-context.md
$ sigmap validate
→ confirms coverage ≥ 80%
$ sigmap judge --answer "loginUser calls validateToken"
→ Groundedness: 87% · Support level: HIGH

See the full end-to-end walkthrough →

How it works

## Three steps. No configuration required.

SigMap scans your source files, strips function bodies and comments, and writes a compact signature index your AI tools read automatically.

Step 01

### Extract signatures

Scans every source file, extracting only the public API surface — function names, class definitions, types, interfaces. No bodies. No imports. No comments.

Step 02

### Write context files

Writes `.github/copilot-instructions.md`, `CLAUDE.md`, `.cursorrules`, and `.windsurfrules` automatically. Copilot reads these on every request.

Step 03

### Stay current automatically

File watcher updates on every save. Post-commit git hook updates on every commit. Context is always current — zero developer action required.

Approach | Tokens / session | Reduction | Cost (Claude Sonnet)
--- | --- | --- | ---
No context (cold session) | ~80,000 | baseline | ~$0.24 / session
Repomix --compress | ~8,000 | −90% | ~$0.024
SigMap | ~4,000 | −97% | ~$0.012
SigMap + MCP (v0.3) | ~200–2K | −99% | ~$0.001

Language support

## 29 languages and formats. Zero Tree-sitter.

Pure regex AST extraction — no compiler required, no binary dependencies, works on any machine with Node.js 18+.

🔷

#### TypeScript

.ts .tsx
🟡

#### JavaScript

.js .jsx .mjs
🐍

#### Python

.py .pyw
☕

#### Java

.java
🎯

#### Kotlin

.kt .kts
🐹

#### Go

.go
🦀

#### Rust

.rs
🔵

#### C#

.cs
⚙️

#### C / C++

.cpp .c .h
💎

#### Ruby

.rb
🐘

#### PHP

.php
🍎

#### Swift

.swift
🎯

#### Dart

.dart
🔴

#### Scala

.scala .sc
💚

#### Vue

.vue
🧡

#### Svelte

.svelte
🌐

#### HTML

.html .htm
🎨

#### CSS / SCSS

.css .scss .sass
📋

#### YAML

.yml .yaml
🐚

#### Shell

.sh .bash .zsh
🐳

#### Dockerfile

Dockerfile.*
Companion tool

## Works perfectly with Repomix

SigMap and Repomix are complementary. Use both — they solve different parts of the context problem.

### ⚡ SigMap

Always-on. Runs automatically on every save and commit. Produces a compact signature index — 4K tokens for daily Copilot use.

- Auto-updates on save + git commit
- Signatures only — no function bodies
- 29 languages and formats, zero npm install
- Writes copilot-instructions.md, CLAUDE.md, .cursorrules

### 📦 Repomix

On-demand. Run before a deep refactor or architecture session. Packs full file content — 8K compressed tokens for detailed analysis.

- Manual run before deep sessions
- Full file content available
- 170+ languages via Tree-sitter
- MCP server for agent use

combined workflow
# Always-on context (SigMap)
$ node gen-context.js --setup
# Before a deep refactor session (Repomix)
$ npx repomix --compress
Quick start

## Working in under 60 seconds

No package manager. No configuration. One file, one command.

1

#### Download gen-context.js

One file, no install required. Drop it in your project root or download globally.

`curl -O https://raw.githubusercontent.com/manojmallick/main/gen-context.js`
2

#### Generate your first context file

Scans your project and writes `.github/copilot-instructions.md` automatically.

`node gen-context.js`
3

#### Set up auto-update

Installs a post-commit git hook and file watcher. Context stays current without thinking about it.

`node gen-context.js --setup`
4

#### Open Copilot and ask about your code

Copilot now knows your class names, function signatures, and patterns — without reading every file on each request.

`node gen-context.js --report # see your token reduction`
strategy quick picks
full best default · complete context
per-module no context loss · lower per-question tokens
hot-cold smallest always-on · MCP recommended
Read full strategy guide →
Open source · MIT

## Built for the community

Free forever. Zero telemetry. Runs locally. Adding a language extractor is 80 lines of code — contributions welcome.

★ Star on GitHub Contribute