LogicStamp Context Overview
LogicStamp Context is a lightweight CLI that scans your 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 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.7.1
- Style mode default changed – Default output mode for
stamp context styleis now--style-mode leaninstead offullfor smaller, faster bundles by default - Watch mode improvements – Incremental watch mode reuses cached style metadata, reducing redundant extraction. Style extraction failures now log errors when
LOGICSTAMP_DEBUG=1 - Security awareness –
stamp contextwarns when no security report is found - File lock consistency – Added delay after stale lock removal for improved filesystem consistency on Windows
v0.3.7
- Emit detection accuracy – Fixed issue where internal event handlers were incorrectly listed as component emits. Now only includes handlers that are part of the component's public API (props)
v0.3.5
- Inline styles extraction – Property names and literal values are now extracted from
style={ ... }objects, providing detailed style metadata - Styled JSX support – CSS content, selectors, properties, and global attribute detection from
<style jsx>blocks - Enhanced style metadata – Improved style extraction capabilities for comprehensive visual and layout information
v0.3.4
- Vue.js support – Comprehensive Vue 3 Composition API support:
vue:componentandvue:composabledetection, reactive state extraction (ref, reactive, computed), props/emits from defineProps/defineEmits, lifecycle hooks, and composables - 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.3
- TOON output format support – Added new
--format toonoption to generate context bundles in TOON format, expanding output options beyond JSON, pretty, and NDJSON - Compact AI-optimized format – TOON format provides a more compact binary-like encoding optimized for AI consumption and efficient storage
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.