Getting Started

Install ContextDigger and start governing AI context in less than 5 minutes

Install ContextDigger and start governing shared context with your team in less than 5 minutes

Install ContextDigger and understand your product's governed architecture in less than 5 minutes

Install ContextDigger and start documenting governed areas more efficiently in less than 5 minutes

Install ContextDigger and start learning your codebase through governed bundles in less than 5 minutes

Install ContextDigger and get team visibility into governed context in less than 5 minutes

Your first five minutes

These commands give you a complete first pass: initialize ContextDigger, discover focus areas, and build your first governed bundle.

$ cd your-project
$ cdg init
$ cdg dig backend-api
$ cat .cdg/context/backend-api.txt

Slash commands like /init-dig and /dig are thin wrappers around the same CLI behavior and are completely optional.

Installation

How ContextDigger Runs

The primary interface is the ContextDigger CLI. It runs locally in your terminal, discovers focus areas, and writes governed context bundles (like .cdg/context/backend-api.txt) that any AI tool can use.

You can optionally install editor or chat integrations that wrap the same CLI in slash commands such as /init-dig, /dig, and /mark-spot.

Think of it as: CLI first, AI tools as clients that read governed context.

Requirements

  • Any AI coding assistant (optional) - Reads governed context bundles (Claude, ChatGPT, Cursor, Copilot, etc.)
  • 🦀
    Native Rust Binary - Runs locally with zero external dependencies
  • 📦
    Git - Optional, but recommended

How to Think About ContextDigger

The mental model is simple: ContextDigger is a compiler for context that runs before your AI tools.

It discovers focus areas in your repo, enforces Context Aperture and Attention Budgets, and builds governed context bundles (like .cdg/context/backend-api.txt) that are safe and meaningful for AI assistants to consume. Instead of throwing your whole codebase at a model and hoping for the best, you let ContextDigger decide what the AI is allowed to see for each task.

This reflects our philosophy of Autistic Intelligence: minds (human and model) perform brilliantly when we respect their limits and become fragile when we overload them. ContextDigger exists to protect that intelligence from bad inputs.

If you prefer to understand the concepts before you install, start with AI School Track 1 and the Core Concepts page.

⚡ Quick Install (Recommended)

Install or update the ContextDigger CLI with a single command:

$ curl -sSL https://contextdigger.com/install.sh | bash

This installs the native ContextDigger binary to your system. Works for both fresh installs and upgrades.

To add Claude Code skills on top of the CLI, run contextdigger install-skills and follow the prompts in Claude.

📋 Manual Installation (Alternative)

Step 1: Install Python Package

$ pip3 install --user contextdigger

Step 2: Initialize & Skill Setup

$ contextdigger install-skills

Step 3: Verify Installation

$ contextdigger --version
ContextDigger v1.3.0
$ ls ~/.claude/commands/*dig*.md | wc -l
43

🔄 Updating

Already have ContextDigger? Update to the latest version:

$ curl install.sh | bash

The installer automatically detects existing installations and upgrades them.

Your First Session

💬 Open Claude Code in your project directory and type these commands in the chat:

💬 Open Claude Code in your project directory and type these commands in the chat. Your team can share discoveries via git workflow:

💬 Open Claude Code in your product's codebase and type these commands to understand the architecture:

💬 Open Claude Code in the codebase you're documenting and type these commands to discover what needs documentation:

✅ Seamless Experience

Commands run instantly without interruption! ContextDigger uses a CLI-based architecture that eliminates approval prompts.

Just type the command and get results immediately. No clicking "Yes", no waiting - pure productivity.

1

Initialize Your Project

$ /init-dig

Scans your project, detects languages, and discovers logical code areas automatically.

2

Dig Into an Area

$ /dig backend-api

Navigate to a specific code area and see files, history, and suggestions.

3

Mark Important Locations

$ /mark-spot auth-handler

Bookmark critical code locations for instant access later.

4

Navigate Back

$ /goto-spot auth-handler

Jump to any bookmarked location instantly, from anywhere.

🆕 What's New in v1.3.0: Multi-Strategy Sub-Area Creation

Transform attention budget constraints from hard stops into guided workflows. Create focused sub-areas in 30 seconds with 4 parallel strategies.

💡

The Problem This Solves

You run /dig salesforce-apex-tests and get:

❌ ERROR: Area too large
176 files > 15 files budget

v1.3.0 turns this into a 30-second focused workflow!

🚀 Quick Start: Sub-Area Creation

1

Auto-Suggest on Attention Budget Constraint (Recommended)

When: Context aperture exceeded → Instant guided workflow

$ /dig salesforce-apex-tests
❌ ERROR: Area too large (176 files > 15 files budget)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Sub-Area Analysis: 4 suggestions found
┌─ apex-account-tests (23 files) ✓
│ Strategy: naming | Confidence: 95%
│ Pattern: **/*Account*Test.cls
├─ apex-opportunity-tests (34 files) ⚠️
├─ apex-lead-tests (19 files) ✓
└─ apex-contact-tests (15 files) ✓
Options:
1. Select sub-area to create and dig
2. Show more details (horizontal view)
3. Show tree view (hierarchical)
4. Override budget (dangerous)
5. Exit
Your choice: 1
→ Selected: apex-account-tests
✓ Created sub-area: apex-account-tests
✓ Now digging: apex-account-tests (23 files, 487 lines)

⚡ Result: From error to focused area in 30 seconds!

2

Manual Split Command

When: Proactively split large areas before digging

$ /dig-split apex-tests
📊 Analyzing 176 files with 4 strategies...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Found 7 potential sub-areas:
[x] apex-account-tests (23 files) ✓
[ ] apex-opportunity-tests (34 files) ⚠️
[x] apex-lead-tests (19 files) ✓
[x] apex-contact-tests (15 files) ✓
[ ] apex-case-tests (12 files) ✓
(Space to select, Enter to confirm)
✓ Created 3 sub-areas
Use '/dig <area>' to explore them

💡 Tip: Use -vv flag to see hierarchical tree view!

3

Quick Create with Exact Pattern

When: You know exactly what you want

$ /create-subarea apex-tests account "**/*Account*Test.cls"
🔍 Matching pattern against 176 parent files...
✓ Found 23 matching files
✓ Created sub-area: apex-tests-account
Files: 23
Lines: 487
Use '/dig apex-tests-account' to explore

⚡ Fast: Perfect when you know the exact glob pattern!

🎛️ Verbosity Levels: Control Detail

Compact (default)
/dig-split area

Shows top 4 suggestions with basic info

Horizontal -v
/dig-split area -v

Shows file previews, patterns, metadata, file intelligence

Vertical Tree -vv
/dig-split area -vv

Shows hierarchical tree with recursive splits (max depth 2)

Example: Hierarchical tree view with -vv
apex-tests (176 files - TOO LARGE)
├─ apex-account-tests (23 files) ✓
│ ├─ apex-account-unit-tests (12 files) ✓
│ └─ apex-account-integration-tests (11 files) ✓
├─ apex-opportunity-tests (34 files) ⚠️
│ ├─ apex-opp-unit-tests (18 files) ✓
│ └─ apex-opp-integration-tests (16 files) ⚠️
└─ apex-lead-tests (19 files) ✓

🧠 The 4 Intelligent Strategies (NO AI)

ContextDigger analyzes your files with 4 parallel strategies using regex and pattern matching - no LLM calls required!

1. Directory Strategy

Groups files by parent directory at depths 1-3

src/models/*, src/controllers/*, src/views/*
2. Naming Pattern Strategy

Finds common CamelCase/snake_case components

AccountTest*, OpportunityTest*, LeadTest*
3. Role-Based Strategy

Groups by file role: test, model, controller, view, util, config

All test files, All models, All controllers
4. Import Relationship Strategy

Clusters files by import patterns and dependencies

Files importing 'auth', Files importing 'db'

💡 Pro Tip: All strategies run in parallel and results are deduplicated and scored by confidence (0-100%).

⚡ Quick Reference: v1.3.0 Commands

/dig <area>

Auto-suggest on refusal

/dig-split <area>

Manual split with selection

/create-subarea

Quick pattern-based creation

Essential Commands

/init-dig

Initialize in your project

/dig <area>

Navigate to code area

/mark-spot <name>

Bookmark location

/goto-spot <name>

Jump to bookmark

/dig-dashboard

View overview

/dig-search <query>

Search everything

👥 Team Collaboration

Your team shares discoveries, bookmarks, and activity through git workflow. No server setup required!

View Team Setup Guide →

👥 Working with a Team?

ContextDigger supports git-based team collaboration. See what your teammates are working on, share bookmarks, and coordinate effort.

View Team Setup Guide →

📝 Team Documentation

Coordinate documentation efforts with your team. Track which code areas have been documented and share coverage status.

View Team Setup Guide →

Next Steps