Installation & Quick Start
Install LogicStamp Context CLI and generate AI-ready context for your React/TypeScript projects in under 2 minutes
Prerequisites
Node.js >= 18.18.0
Latest LTS recommended
React/TypeScript
Your project codebase
Terminal
Basic CLI knowledge
Install LogicStamp Context
Install the CLI globally to use the stamp command from anywhere on your system.
💡 Pro tip: Global installation provides system-wide access to the CLI, perfect for working across multiple projects.
📊 Optional Tokenizers: LogicStamp Context includes @dqbd/tiktoken and @anthropic-ai/tokenizer as optional dependencies. npm automatically attempts to install them when installing logicstamp-context. If installation succeeds, you get model-accurate token counts. If installation fails or is skipped (normal for optional dependencies), LogicStamp Context gracefully falls back to character-based estimation (typically within 10-15% accuracy).
npm install -g logicstamp-contextInitialize Your ProjectOptional
Set up .gitignore patterns and LLM_CONTEXT.md. stamp context is CI-friendly and never prompts—it respects preferences from stamp init. If you skip this step, stamp context defaults to skipping both .gitignore and LLM_CONTEXT.md setup (safe for CI).
🔒 Best Practice: Secure Initialization
By default, stamp init automatically runs a security scan to detect secrets in your JS/TS/JSON files (API keys, passwords, tokens). Review the security report and use stamp ignore <file> to exclude files with detected secrets from context generation.
⚠️ Important: If secrets are detected, they are automatically sanitized in generated context files (replaced with "PRIVATE_DATA"). Your source code files are never modified.
Best practice: Remove secrets from your codebase and use environment variables or a secrets manager instead.
What it does:
- • Adds context files to .gitignore
- • Creates LLM_CONTEXT.md guide
- • Creates .logicstamp/config.json
- • Runs security scan by default (v0.3.0+)
When to skip:
- • Testing the tool first
- • Temporary analysis
- • CI/CD environments
# Initialize LogicStamp in the current directory
# Security scan runs by default
cd your-react-project
stamp initGenerate AI Context
Run the context generator to analyze your codebase and create structured bundles optimized for AI assistants.
🎨 Generate with Style Metadata
Use stamp context style to extract Tailwind CSS classes, SCSS modules, Material UI themes, styled-components, framer-motion animations, and layout patterns. Perfect for design-aware AI assistants that need to understand your visual system.
Output Structure
stamp context styleIntegrate with AI Assistants
Your generated context.json bundles and context_main.json index plug straight into your favorite AI coding tools.
Cursor
Uses context.json bundles automatically when you run AI commands.
- Detects context.json when you trigger AI
- No extra configuration
- Keeps suggestions aligned with your project
Windsurf
Understands your context.json bundles alongside the workspace.
- Picks up context.json in open projects
- Boosts inline completions with component context
- Works seamlessly with existing AI workflows
GitHub Copilot
Guide Copilot by opening or referencing context.json files.
- Chat integration via Copilot Chat
- File reference support (@file context.json)
- More relevant, context-aware suggestions
Claude
Paste or upload context.json bundles for deep analysis.
- Manual file upload or copy-paste
- Detailed reasoning over your contracts
- Stronger understanding of component behavior
ChatGPT
Upload or paste context.json to drive the conversation.
- File upload support (Code / Advanced Data)
- Multi-file context via zipped bundles or multiple uploads
- Conversation history that stays aligned with your code
Other IDEs
Use context.json with any editor that has an AI sidebar or chat.
- Manual integration via file open / copy-paste
- Works with any file system / repo
- Universal, assistant-agnostic format
All product names, framework names, and trademarks are the property of their respective owners. LogicStamp is an independent open-source project and is not affiliated with or endorsed by the listed AI assistants, tools, or frameworks.
💡 Best Practice: When prompting an AI assistant, explicitly tell it to use the per-folder context.json files and the root context_main.json to understand your project structure. This produces the most consistent and grounded results across all assistants.
Using context.json files, explain the authentication flowOptimize Token UsageAdvanced
Compare different code inclusion modes to find the perfect balance between context richness and token efficiency. Style metadata extraction supports Tailwind CSS, SCSS/CSS modules, Material UI, inline styles, styled-components, and framer-motion.
| Mode | Savings | Content | Use Case |
|---|---|---|---|
none | ~79% | Contracts only | API docs |
headerdefault | ~70% | JSDoc + contracts | AI chat |
header+style | ~30% | Headers + contracts + style (Tailwind, SCSS, Material UI, etc.) | Design-aware AI |
full | 0% | Complete source | Deep analysis |
stamp context --compare-modesValidate OutputCI/CD Ready
Ensure your context files are valid and schema-compliant before sharing or committing.
Validation includes:
- • JSON structure integrity
- • Required field verification
- • Schema compliance check
- • Exit code: 0 (success) or 1 (failure)
stamp context validate🎉 Congratulations! You're All Set
You've successfully installed LogicStamp Context and generated AI-ready documentation for your React/TypeScript project. Your context files are now ready to supercharge your AI-assisted development workflow.
70%
Average token reduction
2x
Faster AI comprehension
100%
Zero configuration
Pro Tip: Keep Context Fresh
Regenerate context after major refactors. Use stamp context compare to detect changes since last generation.
Workflow Integration
Add context generation to your build process or git hooks to ensure AI assistants always have the latest project structure.