LogicStamp Context Overview
LogicStamp Context is a lightweight CLI that scans your React/TypeScript codebase and generates AI-ready context bundles optimized for tools like Claude, ChatGPT, and other LLMs.
TypeScript-first: the analyzer currently targets .ts and .tsx files only. JavaScript .js and .jsx files are not analyzed yet, so mixed or JS-only projects will only see TypeScript components in context.json.
Vue 3 support: Works with .ts/.tsx files only, not .vue SFC files.
What does it generate?
The CLI analyzes your components and emits a context.json file containing one or more bundles. Each bundle includes contracts, dependency graphs, and optional code headers so AI tools can understand the structure and behavior of your UI without seeing the entire codebase.
Component structure
Variables, hooks, components, and functions
Logic signatures
Props, events, and state types
Dependency graph
How components depend on each other
Token-aware modes
Control how much code is included per bundle
Installation
npm install -g logicstamp-contextAfter installation, the stamp command is available globally and can be run from any React/TypeScript project.
Note: "Global CLI" means installing globally via npm install -g makes the stamp command available from any directory, not just within a specific project folder.
- Local install:
npm install logicstamp-context→ only available in that project - Global install:
npm install -g logicstamp-context→ available everywhere viastampcommand
Requirements: Node.js >= 18.18.0 (Node 20+ recommended), TypeScript codebase (React, Next.js or Vue)
Core Commands
The CLI exposes several primary commands:
stamp init [path]Initialize LogicStamp in your project by setting up .gitignore patterns and LLM_CONTEXT.md.
stamp context [path]Generate AI-ready context from your project (multi-file mode: one context.json per folder plus context_main.json index).
stamp context compareDetect context drift across all context files (multi-file mode) or between two specific files.
stamp context validateValidate all context files (multi-file mode) or a specific generated context file against the schema.
stamp context cleanRemove all generated context artifacts from your project.
Each of these commands is documented in more detail in the dedicated pages inside the LogicStamp Context CLI docs section.
Recent Updates
v0.3.5
- Inline style extraction fixed – Inline style objects now extract both property names and literal values (strings, numbers, booleans, null, template literals)
- Styled JSX CSS extraction fixed – Full CSS content from
<style jsx>blocks is now extracted, parsed using css-tree AST, with selector and property detection - Beta release note – This is a beta release. We're actively improving the tool based on user feedback. If you encounter any issues or have suggestions, please open an issue on GitHub
v0.3.4
- TOON output format support – Added new
--format toonoption to generate context bundles in TOON format, expanding output options beyond JSON, pretty, and NDJSON - Improved Node.js 18 compatibility – Adjusted
globto a Node 18–compatible version while retaining the latest security fixes - Updated Node.js requirement – Clarified minimum supported Node.js version to >= 18.18.0 (Node 20+ recommended)
- Dev dependency updates – Updated development dependencies to the latest patch versions
- Documentation improvements – Improved README clarity and formatting consistency, and clarified what is detected vs extracted across framework documentation
v0.3.2
- Security update - Updated
globdependency to 11.1.0+ to address CVE-2025-64756 - Improved portability - Context files now use relative paths instead of absolute paths, improving portability across different machines and environments
- CSS/SCSS parsing now uses AST parser - Migrated from regex-based extraction to AST-based parsing using
css-treefor more robust and accurate parsing
v0.3.1
- Hook classification accuracy - Custom React hooks are now correctly classified as
react:hookinstead ofreact:component - Added
react:hookto ContractKind type - TheContractKindtype now includes'react:hook'as a valid kind
v0.3.0 Security Release
- Security scan now runs by default -
stamp initautomatically scans for secrets to protect sensitive data - Automatic secret sanitization - Detected secrets are automatically replaced with
"PRIVATE_DATA"in generated context files - Improved default security posture - Better protection out of the box for new projects
- Removed
--secureflag (security scanning is now default; use--no-secureto skip) - Important: Credentials can only be included in bundles when using
--include-code fullmode. Other modes (none,header,header+style) only include metadata, not implementation code.
Token Optimization
LogicStamp Context helps you understand and control token usage by estimating token counts for different inclusion modes (none, header, full) and providing comparison tables. This makes it easier to choose the right balance between context richness and cost.
Learn More
For full details including schema reference, advanced options, and examples, see the LogicStamp Context GitHub repository.