Initialization Command

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

OptionDescription
--skip-gitignoreSkip .gitignore setup
-h, --helpShow help

What It Does

The stamp init command sets up LogicStamp in your project by:

1

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
2

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)

3

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

Smart 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:

  1. .gitignore setup: Add recommended patterns to .gitignore? [Y/n]
  2. LLM_CONTEXT.md generation: Generate LLM_CONTEXT.md in 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 context respects your preference forever

Non-Interactive Mode (CI)

In CI or non-TTY environments:

  • Never prompts
  • Never auto-adds patterns
  • Use stamp init or --skip-gitignore flag 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 .gitignore before generating context files

You don't need stamp init if:

  • You're fine with automatic .gitignore setup when running stamp context
  • Your .gitignore already 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