Passive Capture

Import Sources

Seed your context store from files that already contain structured knowledge about your project.

Overview

Most projects already contain structured knowledge scattered across READMEs, configuration files, and git history. contxt capture reads these sources and extracts what it can, saving entries as drafts for your review.

This is a one-time import, not an ongoing sync. Run it when initializing Contxt on an existing project to bootstrap your context store without starting from scratch.

$ contxt capture --source all     # Import from all sources
$ contxt capture --source readme   # README only
$ contxt capture --source commits  # Recent git commits
$ contxt capture --dry-run         # Preview without saving

Import Sources

readme

Parses README.md (or README.txt) for technology mentions, architecture descriptions, and setup instructions. Extracts as document entries and infers stack technologies from dependency language.

cursor

Reads .cursorrules or .cursor/rules. These files often contain explicit coding conventions and patterns that map directly to Contxt pattern entries.

claude

Reads CLAUDE.md files in the project root. These often contain architectural decisions and project-specific instructions intended for Claude Code sessions.

adr

Scans for Architecture Decision Record directories (docs/decisions/, adr/, docs/adr/). Each ADR markdown file becomes a decision entry with the ADR title and status preserved.

commits

Parses the last 50 git commits (configurable with --limit) for conventional commit messages with decision-indicating prefixes: feat, refactor, arch, and commits containing keywords like "decided", "switched to", or "migrated".

package

Reads package.json, pyproject.toml, Cargo.toml, and similar manifest files. Extracts the dependency list to populate the project stack automatically.

CLI Flags

FlagDescription
--source <name>Source to import from. One of: readme, cursor, claude, adr, commits, package, all. Default: all.
--dry-runPreview what would be imported without writing any drafts.
--auto-confirmSkip the review queue and confirm all imported entries immediately.
--limit <n>For commit imports, limit to the last N commits. Default: 50.