Overview

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.

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-context

After 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.

Core Commands

The CLI exposes several primary commands:

1
stamp init [path]

Initialize LogicStamp in your project by setting up .gitignore patterns and LLM_CONTEXT.md.

2
stamp context [path]

Generate AI-ready context from your project (multi-file mode: one context.json per folder plus context_main.json index).

3
stamp context compare

Detect context drift across all context files (multi-file mode) or between two specific files.

4
stamp context validate

Validate all context files (multi-file mode) or a specific generated context file against the schema.

5
stamp context clean

Remove 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.

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.