Commands Reference
Browse all CLI commands, global options, and command interactions in one place.
LogicStamp Context provides 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. | First-time project setup or explicit .gitignore configuration. | --skip-gitignore, --yes, --no-secure |
stamp ignore <path> [path2] ... | Add files or folders to .stampignore to exclude them from context compilation. Creates .stampignore if it doesn't exist. | Exclude files with secrets, large generated files, or other files that shouldn't be in context bundles. | --quiet |
stamp security scan [path] | Scan your project for secrets (API keys, passwords, tokens). Runs 100% locally — nothing is uploaded or sent anywhere. | Prevent accidental exposure of sensitive credentials, CI/CD security checks, project initialization. | --out, --quiet |
stamp security --hard-reset | Delete security report file. | Reset security configuration, start fresh after remediation. | --force, --out, --quiet |
stamp context [path] [options] | Generates context files organized by folder (one context.json per folder plus context_main.json index). CI-friendly: never prompts, respects preferences from stamp init. | Produce fresh context for AI workflows, documentation, or review. | --depth, --include-code, --format, --profile, --max-nodes, --dry-run, --stats, --predict-behavior, --compare-modes, --include-style, --strict-missing, --skip-gitignore, --out, --quiet, --watch, --strict-watch, --debug, --log-file |
stamp context style [path] [options] | Generates context with style metadata included. Extracts visual and layout information (Tailwind, SCSS, Material UI, animations, layout patterns). Equivalent to stamp context --include-style. Uses lean mode by default (counts + flags); use --style-mode full for detailed arrays. | Design system analysis, AI-assisted design suggestions, layout understanding, animation detection. | All stamp context options supported except --compare-modes (use stamp context --compare-modes instead). Includes --style-mode flag (lean |
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, --skip-gitignore, --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 |
Command interactions
stamp initsets up.gitignorepatterns andLLM_context.mdnon-interactively (by default) before generating context files.stamp contextrespects these preferences and never prompts (CI-friendly). By default,stamp initautomatically runs a security scan, which makes it non-interactive. Use--no-secureto skip the security scan and enable interactive prompts (in TTY mode).stamp ignoreadds files or folders to.stampignoreto exclude them from context compilation. Useful for excluding files with secrets or other sensitive information. After runningstamp security scan, review the report and usestamp ignore <file>to exclude files with detected secrets.stamp security scanfinds secrets (API keys, passwords, tokens) in your project. Runs 100% locally—nothing is uploaded or sent anywhere. The scan runs automatically duringstamp initby default. Review the security report and usestamp ignore <file>to exclude files with secrets from context compilation.stamp contextgenerates multiplecontext.jsonfiles (one per folder) pluscontext_main.jsonindex, or use--outfor a custom output directory. Automatically excludes files listed in.stampignore.stamp context stylegenerates context with style metadata (Tailwind, SCSS, Material UI, animations, layout patterns). Equivalent tostamp context --include-style. Usesleanmode by default (counts + flags); use--style-mode fullfor detailed arrays.stamp context validatevalidates all context files (multi-file mode usingcontext_main.json) or a specific file. With no arguments, automatically validates all folder context files. Exit code is CI-friendly.stamp context comparedetects 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.stamp context cleanremoves all context artifacts. Safe by default (shows what would be removed), requires--all --yesto delete files. Useful for resetting context files or cleaning before switching branches.
Quick reference
# Show version number
stamp --version
# Initialize LogicStamp in your project (sets up .gitignore and LLM_context.md preferences)
# Non-interactive by default, security scan runs automatically
stamp init
# Explicitly skip prompts (redundant - already non-interactive by default)
stamp init --yes
# Initialize without security scan (enables interactive prompts in TTY mode)
stamp init --no-secure
# Add files to .stampignore to exclude from context compilation
stamp ignore src/secrets.ts
# Add multiple files or use glob patterns
stamp ignore src/config/credentials.ts "**/*.key"
# Generate context for your repository
stamp context
# Generate context with style metadata
stamp context style
# Or use the flag (equivalent)
stamp context --include-style
# 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
# Compare token costs across all modes
stamp context --compare-modes
# Watch mode - auto-regenerate on file changes
stamp context --watch
# Watch with style metadata
stamp context style --watch
# Watch with debug output
stamp context --watch --debug
# Watch with structured change logs (for change notifications)
stamp context --watch --log-file
# Strict watch mode - track breaking changes and violations
# (--strict-watch automatically enables watch mode)
stamp context --strict-watch
# Scan your project for secrets (API keys, passwords, tokens)
# Runs 100% locally — nothing is uploaded or sent anywhere
stamp security scan
# Scan with custom output path
stamp security scan --out ./reports/security.json
# Reset security configuration (delete security report)
stamp security --hard-reset --forceSee also
For detailed documentation on specific features and commands:
- context.md - Complete
stamp contextcommand reference - watch.md - Watch mode for automatic regeneration
- style.md - Style metadata extraction guide
- compare-modes.md - Token cost analysis and mode comparison
- compare.md - Context drift detection and comparison
- init.md - Project initialization guide
- ignore.md - Adding files to
.stampignorefor exclusion - validate.md - Schema validation reference
- security-scan.md - Security scanning and secret detection guide
CLI commands & topics
security scan command →
Local secrets scan for TypeScript, JavaScript, and JSON
init command →
Configure .gitignore, project config, and onboarding files
context command →
Generate AI-ready context bundles
style command →
Compile bundles with Tailwind and style metadata
Watch Mode →
Incremental rebuilds while you work
TOON Format →
Compact TOON output for smaller artifacts
Compare Modes →
Token estimates across compilation modes
Strict Modes →
Strict compare and strict watch for CI and local dev
compare command →
Detect drift between snapshots or git baselines
validate command →
Validate bundles, contracts, and missing dependencies
clean command →
Remove generated context files and caches
Next Steps
Start with core generation, then validate your output before using it with LLMs.