📚 For complete CLI documentation:
- Primary: logicstamp.dev/docs/logicstamp-context/context (landing page)
- Fallback: GitHub CLI docs (always available)
See also: Tool Description for LogicStamp Context capabilities | MCP Integration Guide for MCP server usage | Quick Start for setup
Quick Reference: This is a thin summary for MCP users. LogicStamp Context ships a single CLI entry point, stamp, with context subcommands and initialization utilities.
| Command | Summary | When to use | Key options |
|---|---|---|---|
stamp --version |
Show version number and exit. | Check installed version. | -v (alias) |
stamp init [path] |
Initialize LogicStamp in a project by setting up .gitignore patterns, LLM_CONTEXT.md, and running a security scan by default. |
First-time project setup or explicit .gitignore configuration. |
--skip-gitignore, --yes / -y, --no-secure |
stamp security scan |
Scan project for security issues. | Security auditing, CI/CD security checks. | |
stamp ignore <file> |
Add files or patterns to ignore list. | Exclude files from context generation. | |
stamp context [path] [options] |
Generates AI-ready context files organized by folder (one context.json per folder plus context_main.json index). Includes smart detection to auto-add .gitignore patterns. |
Produce fresh context for AI workflows, documentation, or review. | --depth, --include-code, --format, --profile, --max-nodes, --dry-run, --stats, --predict-behavior, --compare-modes, --strict-missing, --skip-gitignore, --out, --quiet |
stamp context validate [file] |
Validates context files. With no arguments, auto-detects and validates all context files using context_main.json (multi-file mode). With a file argument, validates that specific file (single-file mode). Falls back to context.json if context_main.json doesn't exist. |
Gate CI pipelines, pre-commit checks, or manual QA before sharing context files. Ensures all folder context files are valid. | [file] (positional), --quiet |
stamp context compare [options] |
Compares all context files (multi-file mode) or two specific files to detect drift, ADDED/ORPHANED folders, and token cost changes. Auto-detects context_main.json for comprehensive project-wide comparison. |
CI drift detection, Jest-style approval workflows, manual inspections, or detecting folder reorganizations. | --approve, --clean-orphaned, --stats, --quiet |
stamp context clean [path] [options] |
Removes all generated context artifacts (context_main.json, all folder context.json files, and .logicstamp/ directory if present). Safe by default (dry run), requires --all --yes to actually delete. |
Reset context files, clean before switching branches, or remove context artifacts from a project. | --all, --yes, --quiet |
- Run
stamp init(optional) to set up.gitignorepatterns,LLM_CONTEXT.md, and run a security scan before generating context files. Security scanning runs by default (use--no-secureto skip). Alternatively,stamp contextwill auto-add patterns on first run. - Run
stamp security scanto audit your project for security issues independently of initialization. - Use
stamp ignore <file>to exclude specific files or patterns from context generation. - Run
stamp contextto generate multiplecontext.jsonfiles (one per folder) pluscontext_main.jsonindex, or use--outfor a custom output directory. - Use
stamp context validateto validate all context files (multi-file mode usingcontext_main.json) or a specific file. With no arguments, automatically validates all folder context files. The exit code is CI-friendly. - Use
stamp context compareto detect drift across all context files (multi-file mode usingcontext_main.json) or between two specific files. Automatically detects ADDED folders, ORPHANED folders, per-folder DRIFT, and unchanged files (PASS). Use--clean-orphanedto automatically remove stale context files. - Use
stamp context cleanto remove all context artifacts. Safe by default (shows what would be removed), requires--all --yesto actually delete files. Useful for resetting context files or cleaning before switching branches.
# Show version number
stamp --version
# Initialize LogicStamp in your project (optional - context command does this automatically)
stamp init # Runs security scan by default
stamp init --no-secure # Skip security scan during init
stamp init --yes # Non-interactive mode
# Security scanning
stamp security scan # Run security scan independently
# Ignore files
stamp ignore node_modules/ # Exclude node_modules from context
stamp ignore *.test.ts # Exclude test files
# Generate context for your repository
stamp context
# Scan a subdirectory and use the llm-safe profile
stamp context ./src --profile llm-safe
# Validate all context files (multi-file mode)
stamp context validate # uses context_main.json to validate all folders
# Or validate a specific file
stamp context validate src/context.json
# Compare all context files for drift (multi-file mode)
stamp context compare # uses context_main.json as index
# Auto-approve and update all drifted files (like jest -u)
stamp context compare --approve
# Compare with stats and clean up orphaned files
stamp context compare --approve --clean-orphaned --stats
# Compare two specific context files
stamp context compare old.json new.json
# Clean all context artifacts (dry run - shows what would be removed)
stamp context clean
# Actually delete all context files
stamp context clean --all --yes