CLI Reference

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):

OptionAliasDescription
--version-vShow version number and exit
--quiet-qSuppress non-error output
--help-hShow help message and exit

Examples:

stamp --version# Shows: fox mascot + "Version: 0.1.0"
stamp -v# Same as --version
stamp context --quiet# Suppress non-error output
stamp context -q# Same as --quiet
stamp --help# Shows main help
stamp -h# Same as --help

Available Commands

CommandSummaryWhen to use
stamp --versionShow version number and exit.Check installed version.
stamp init [path]Initialize LogicStamp in a project by setting up .gitignore patterns.First-time project setup or explicit .gitignore configuration.
stamp context [path] [options]Generates AI-ready context files organized by folder (one context.json per folder plus context_main.json index).Produce fresh context for AI workflows, documentation, or review.
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 (optional) to set up .gitignore patterns before generating context files. Alternatively, stamp context will auto-add patterns on first run.

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.

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 (optional - context command does this automatically) stamp init # 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