Turn React/TS IntoAI-Ready ContextTurn React/TS Into AI-Ready Context
Generate AI-ready context bundles from your React/TypeScript codebase in seconds. One-time setup, up to 70% token savings.
Fast • Deterministic • Open Source
npm install -g logicstamp-context
LogicStamp CLI - Open Source & Active Development
Run to get context bundles:
stamp contextorstamp context styleor use the MCP: analyze with or without style
Built by Developers, for Developers
LogicStamp is 100% open source and community-driven. Contribute code, report issues, suggest features, or just star the repo to show your support.
Stop Pasting Code.
Start Stamping Context.
One command. Instant AI-ready context bundles. Zero manual work.
The Manual Grind
30+ minutes of copying, pasting, and explaining your codebase
Result: 30+ minutes wasted copying files, searching for dependencies, and manually explaining your codebase. Incomplete context leads to confused AI responses. Pay for 3x more tokens than needed. Frustrated developer.
The LogicStamp Way
One command. 8-10 seconds usually for mid-sized projects. Optimized context every time.
Result: 30 minutes → 8-10 seconds (usually for mid-sized projects). One command ($ stamp context) generates optimized context.json files with complete dependency graphs. Up to 70% cost savings. AI has complete context of your entire codebase. Happy developer.
Why Developers Choose LogicStamp
Professional-grade tooling for modern development workflows
Up to 70% smaller context bundles
Strips out imports, boilerplate, and implementation details. Only contracts and type signatures.
Automatic dependency graphs
AI sees your entire codebase structure, imports, and component relationships instantly.
Always up-to-date
Run stamp context before each AI session. Fresh context in seconds, not stale READMEs.
CI/CD context drift detection
Track architectural changes with stamp context compare in your build pipeline.
LogicStamp is your codebase's stamp of approval. One command generates a verified, AI-optimized snapshot of your entire project structure—like an official document stamped and certified for AI consumption.
How it works
$ npm i -g logicstamp-context changed 1 package, and audited 3 packages in 1s found 0 vulnerabilities $ stamp context 🔍 Scanning /project/src... Found 24 files 🔨 Analyzing components... Analyzed 24 components 📊 Building dependency graph... 📋 Using profile: llm-chat (depth=2, header only, max 100 nodes) 📦 Generating context for 22 root components (depth=2)... 🔍 Validating generated context... ✅ Validation passed 📝 Writing context files for 5 folders... ✓ context.json (2 bundles) ✓ src/context.json (3 bundles) ✓ src/components/context.json (5 bundles) ✓ src/utils/context.json (2 bundles) ✓ app/context.json (3 bundles) 📝 Writing main context index... ✓ context_main.json (index of 5 folders) ✅ 6 context files written successfully 📊 Summary: Total components: 24 Root components: 22 Leaf components: 20 Bundles generated: 22 Total nodes in context: 25 Total edges: 3 Missing dependencies: 0 📏 Token Estimates (header mode): GPT-4o-mini: 14,484 | Full code: ~41,383 (~65% savings) Claude: 12,875 | Full code: ~36,785 (~65% savings) 📊 Mode Comparison: none: ~8,691 tokens header: ~14,484 tokens full: ~41,383 tokens ⏱ Completed in 3225ms▋
Works with your favorite tools
Seamlessly integrate with your existing development workflow and boost productivity
Model Context Protocol
FeaturedUse LogicStamp Context as an MCP server for AI assistants like Claude Desktop. Get real-time codebase analysis, component contracts, and structured context bundles directly in your AI workflow.
- Context bundle access
- Real-time codebase queries
- AI assistant integration
Supported Frameworks
AI-ready context generation for modern frontend frameworks and TypeScript codebases.
TypeScript-first by design
LogicStamp Context currently analyzes .ts and .tsx files only. JavaScript .js and .jsx files are not analyzed yet, so components written in JS won't appear in context bundles.
React
Analyze React components with hooks, props, and JSX structure
- Props signature extraction
- Hook dependency analysis
- Component structure contracts
Next.js
Full support for Next.js with App Router and Server Components
- App Router context bundles
- Server/Client component detection
- Route dependency graphs
TypeScript
Deep TypeScript analysis for types, interfaces, and generics
- Type signature extraction
- Interface documentation
- Generic parameter tracking
JavaScript & JSXFeatured
Support for JavaScript and JSX files in addition to TypeScript
- JavaScript file analysis
- JSX component detection
- JSDoc type inference
Vue Single File Components
Vue 3 Composition API support for TypeScript/TSX files available now. Single File Component (.vue) support coming soon
- Composition API tracking (TS/TSX)
- Props and emits extraction
- .vue SFC support planned
Watch Mode
Automatically regenerate context files when source files change
- Automatic file watching
- Incremental bundle updates
- Debounced regeneration
Development Tools
Works with your existing development tools and CI/CD pipelines
All trademarks and logos are the property of their respective owners. LogicStamp is an independent open-source project and is not affiliated with or endorsed by the listed frameworks.
FAQs
Quick answers to common questions
LogicStamp Context scans your React/TypeScript codebase and generates structured context bundles optimized for AI consumption. It analyzes component structure, extracts logic signatures (props, state, events), builds dependency graphs, and packages everything into machine-readable JSON with built-in token optimization. No configuration needed - just run `stamp context` and get instant AI-ready context bundles.
Pasting raw code wastes tokens on boilerplate, imports, and redundant formatting. LogicStamp Context extracts only what AI needs - component contracts, dependency relationships, and logic signatures - saving up to 65% tokens compared to full source code. Plus, it provides structured context that AI can actually parse and understand, not just raw text.
Yes! LogicStamp Context is completely free and open-source. Install it globally with npm i -g logicstamp-context and use it. The CLI (v0.3.7) is production-ready and includes context generation, drift detection, validation, token optimization, security scanning, and style metadata extraction. MCP (Model Context Protocol) integration is also available for free, providing real-time context analysis in Cursor, Claude Desktop, and Claude CLI. Install with `npm install -g logicstamp-mcp` and configure your MCP client (see "How do I set up MCP integration?" below for details). All features are available at no cost.
Currently supports React and TypeScript projects (including Next.js), plus Vue 3 TypeScript/TSX files. Requires Node.js >= 18.18.0 (Node 20+ recommended). MCP integration is available (v0.1.4) for Cursor, Claude Desktop, and Claude CLI. Works with any React/TypeScript codebase regardless of styling solution (Tailwind, styled-components, CSS modules, Material UI, ShadCN/UI, Radix UI, Framer Motion, etc.). Note: Vue Single File Components (.vue files) support is planned for a future release.
Quick start: Run `npx logicstamp-context context` (no install needed) or install globally with `npm i -g logicstamp-context`. For first-time setup, run `stamp init` in your project directory (sets up .gitignore patterns and scans for secrets). Next, run `stamp context` to generate multiple `context.json` files (one per folder) plus a `context_main.json` index with AI-ready bundles. Share these files with Claude, ChatGPT, or any AI assistant for instant codebase understanding. Use `stamp context validate` to verify the output, or try the MCP integration for real-time analysis in Cursor, Claude Desktop, or Claude CLI.
MCP (Model Context Protocol) provides real-time context analysis directly in Cursor, Claude Desktop, or Claude CLI. Setup (one-time, global): 1. Install LogicStamp CLI: `npm install -g logicstamp-context` 2. Install MCP server: `npm install -g logicstamp-mcp` 3. Configure your MCP client by adding LogicStamp to your config file: - Cursor: `~/.cursor/mcp.json` (macOS/Linux) or `%USERPROFILE%\.cursor\mcp.json` (Windows) - Claude CLI: `~/.claude.json` (macOS/Linux) or `%USERPROFILE%\.claude.json` (Windows) - Claude Desktop: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
Add this configuration:
{ "mcpServers": { "logicstamp": { "command": "npx", "args": ["logicstamp-mcp"] } } }After setup, restart your MCP client. The AI can then use LogicStamp tools to analyze your codebase in real-time. See the MCP documentation at logicstamp.dev/docs/mcp for detailed platform-specific instructions.
LogicStamp Context offers three code inclusion modes: `none` (contracts only, ~79% savings vs full context), `header` (recommended, ~65% savings vs full context, ~70% vs raw source), and `full` (complete source). The header mode includes just enough context for AI to understand component logic without wasting tokens on implementation details. Additionally, you can use `--format toon` for an alternative output format that uses ~40% fewer tokens than JSON while maintaining the same data structure. Use `stamp context --compare-modes` to see exact savings for your codebase. Token counts are automatically calculated using model-accurate tokenizers (GPT-4 and Claude) when available, or character-based estimation as a fallback.
LogicStamp Context generates per-root bundles (one bundle per page/feature component) rather than individual files per component. Each bundle contains the root component plus its complete dependency graph - all related components together. This design matches how developers work: when you need help with a specific page or feature, share that bundle and the AI has complete context in one self-contained unit.
The `stamp context style` command generates context bundles with visual and layout metadata included. It extracts style information from your components including Tailwind CSS classes, SCSS/CSS modules, inline styles, styled-components/Emotion, framer-motion animations, Material UI, ShadCN/UI, Radix UI, and Styled JSX. This enables AI assistants to understand visual design, suggest visually consistent components, analyze layout patterns, track color palettes, and identify animations. Use it when you need AI to understand the visual aspects of your UI, not just the logic. Note: Style metadata adds more tokens (~52-65% of raw source vs ~30% for header mode), so use `--compare-modes` to see the exact cost impact for your codebase.
Watch mode is planned for v0.4.x (not yet implemented). The MCP (Model Context Protocol) integration provides efficient context updates on-demand, which may be preferable to automatic watch mode. For now, regenerate context with `stamp context` when needed, or use MCP tools for real-time analysis. When implemented, watch mode will automatically regenerate context files when source files change, with incremental updates and debouncing.
Need more detailed information?
Explore the LogicStamp docs for setup guides, profiles, token savings examples, CI workflows, and advanced configuration of stamp context.
Ready to supercharge your AI workflow?
Generate AI-ready context from your codebase in seconds. Fast, deterministic, one-time setup.
"Stop pasting code. Start sharing structured context bundles that AI actually understands. LogicStamp Context transforms your codebase into machine-readable documentation with built-in token optimization."— LogicStamp Team