CLI ReferenceInit

contextd init

Initialize contextd in the current project by scaffolding the .context/ directory.

Usage

contextd init [options]

Options

FlagDescriptionDefault
--minimalCreate only project.md (minimal setup)false

Full initialization

contextd init

Creates the complete directory structure with template files:

.context/
  project.md       ← Project overview with tech stack, goals, what to avoid
  architecture.md  ← System structure, directory layout, data flow
  conventions.md   ← Coding standards, naming, patterns
  decisions/
    001-example.md ← Example ADR template
  modules/
    .gitkeep       ← Placeholder for module contexts

All template files include the current date in their updated frontmatter field. The example decision file (001-example.md) includes the current date in its date field.

Also adds generated export files to .gitignore:

  • CLAUDE.md.generated
  • .cursorrules.generated

Minimal initialization

contextd init --minimal

Creates only .context/project.md — useful for quick setups or when you want to build out the structure manually.

Already initialized

If .context/ already exists in the current or any parent directory, init will display a warning with the existing path and exit without making changes. This means running init from a subdirectory of an existing contextd project will detect the parent’s .context/ and skip re-initialization.