stamp init Command
Initialize LogicStamp in your project by setting up .gitignore patterns and other project configuration.
Syntax
stamp init [path] [options][path] – Target directory to initialize (default: current directory)
Options
| Option | Description |
|---|---|
--skip-gitignore | Skip .gitignore setup |
-h, --help | Show help |
What It Does
The stamp init command sets up LogicStamp in your project by:
Creating or updating .gitignore with LogicStamp-specific patterns:
- •
context.json– Context files generated per folder - •
context_*.json– Main index and other context variants - •
*.uif.json– UIF contract files - •
logicstamp.manifest.json– Dependency manifest files - •
.logicstamp/– Configuration directory
Generating LLM_CONTEXT.md in the project root
A guide that helps AI assistants understand your project structure and how to work with LogicStamp context files (if it doesn't already exist)
Creating .logicstamp/config.json
Saves your preferences so stamp context won't prompt again
Examples
# Initialize LogicStamp in the current directory
stamp init
# Initialize a specific directory
stamp init ./my-project
# Skip .gitignore setup
stamp init --skip-gitignoreSmart Detection in stamp context
The stamp context command includes smart setup management for both .gitignore and LLM_CONTEXT.md with the following behavior:
First Time (No Config)
When you run stamp context for the first time in a project (in interactive mode), you'll be prompted for two things:
.gitignoresetup: Add recommended patterns to.gitignore? [Y/n]LLM_CONTEXT.mdgeneration: GenerateLLM_CONTEXT.mdin project root? [Y/n]
Your choices are saved in .logicstamp/config.json and respected on subsequent runs.
Subsequent Runs
Once you've answered the prompt:
- Your choice is remembered in
.logicstamp/config.json - No more prompts
stamp contextrespects your preference forever
Non-Interactive Mode (CI)
In CI or non-TTY environments:
- Never prompts
- Never auto-adds patterns
- Use
stamp initor--skip-gitignoreflag to control behavior explicitly
When to Use stamp init
Use stamp init when:
- Setting up LogicStamp in a new project
- You want explicit control over initialization
- You want to set up
.gitignorebefore generating context files
You don't need stamp init if:
- You're fine with automatic
.gitignoresetup when runningstamp context - Your
.gitignorealready has the necessary patterns - You prefer to manually manage
.gitignore
Safety
The stamp init command is:
Idempotent – Safe to run multiple times without duplicating patterns
Non-destructive – Preserves existing .gitignore content
Safe by default – Only adds patterns, never removes anything