Commands
LogicStamp Context ships as a single CLI entry point, stamp, with context subcommands.
Global Options
These options are available at the top level (before any subcommand):
| Option | Alias | Description |
|---|---|---|
--version | -v | Show version number and exit |
--quiet | -q | Suppress non-error output |
--help | -h | Show help message and exit |
Examples:
stamp --version# Shows: fox mascot + "Version: 0.3.4"stamp -v# Same as --versionstamp context --quiet# Suppress non-error outputstamp context -q# Same as --quietstamp --help# Shows main helpstamp -h# Same as --helpAvailable Commands
| Command | Summary | When to use |
|---|---|---|
stamp --version | Show version number and exit. | Check installed version. |
stamp init [path] | Initialize LogicStamp in a project by setting up .gitignore patterns. Security scan runs by default. | First-time project setup or explicit .gitignore configuration. |
stamp ignore <path> [path2] ... | Add files or folders to .stampignore to exclude them from context generation. | Exclude files with secrets, large generated files, or other files that shouldn't be in context bundles. |
stamp security scan [path] [options] | 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. |
stamp security --hard-reset | Delete security report file. | Reset security configuration, start fresh after remediation. |
stamp context [path] [options] | Generates AI-ready context files organized by folder (one context.json per folder plus context_main.json index). CI-friendly: never prompts, respects preferences from stamp init. Automatically excludes files listed in .stampignore. | Produce fresh context for AI workflows, documentation, or review. |
stamp context style [path] [options] | Generates context with style metadata included. Extracts visual and layout information (Tailwind, SCSS, animations, layout patterns). Equivalent to stamp context --include-style. Automatically excludes files listed in .stampignore. | Design system analysis, AI-assisted design suggestions, layout understanding, animation detection. |
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. | CI drift detection, Jest-style approval workflows, manual inspections, or detecting folder reorganizations. |
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. |
stamp context clean [path] [options] | Removes all generated context artifacts (context_main.json, all folder context.json files, and .logicstamp/ directory). | Reset context files, clean before switching branches, or remove context artifacts from a project. |
Command Interactions
Run stamp init to set up .gitignore patterns and LLM_CONTEXT.md non-interactively (by default) before generating context files. stamp context respects these preferences and never prompts (CI-friendly). By default, stamp init automatically runs a security scan, which makes it non-interactive. Use --no-secure to skip the security scan and enable interactive prompts (in TTY mode).
Run stamp ignore <file> to add files or folders to .stampignore to exclude them from context generation. Useful for excluding files with secrets or other sensitive information. After running stamp security scan, review the report and use stamp ignore <file> to exclude files with detected secrets.
Run stamp security scan to find secrets (API keys, passwords, tokens) in your project. Runs 100% locally—nothing is uploaded or sent anywhere. The scan runs automatically during stamp init by default. Review the security report and use stamp ignore <file> to exclude files with secrets from context generation.
Run stamp context to generate multiple context.json files (one per folder) plus context_main.json index, or use --out for a custom output directory.
Run stamp context style or use stamp context --include-style to generate context with style metadata (Tailwind, SCSS, animations, layout patterns). This makes context bundles design-aware, enabling AI assistants to understand both the logic and visual presentation of your components.
Use stamp context validate to validate all context files (multi-file mode using context_main.json) or a specific file. With no arguments, automatically validates all folder context files. The exit code is CI-friendly.
Use stamp context compare to detect drift across all context files (multi-file mode using context_main.json) or between two specific files. Automatically detects ADDED folders, ORPHANED folders, per-folder DRIFT, and unchanged files (PASS). Use --clean-orphaned to automatically remove stale context files.
Use stamp context clean to remove all context artifacts. Safe by default (shows what would be removed), requires --all --yes to actually 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 generation
stamp ignore src/secrets.ts
# Add multiple files or use glob patterns
stamp ignore src/config/credentials.ts "**/*.key"
# Scan for secrets and sensitive data
stamp security scan
# 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
# Compare token costs across all modes
stamp context --compare-modes
# 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 --yesSee Also
For detailed documentation on specific features and commands:
`context` command
Complete stamp context command reference
`style` command
Style metadata extraction guide
`init` command
Project initialization guide
`validate` command
Schema validation reference
`compare` command
Context drift detection and comparison
`clean` command
Remove context artifacts
`security scan` command
Find secrets and sensitive data before committing