Skip to main content

Prerequisites

Installation

1

Install the package

2

Initialize your project

Run the init command from your repo root:
This creates two files:
  • dittospec.config.json — project configuration
  • workspace.ditto.md — workspace-level Ditto spec file for universal style guide rules
3

Set your API key

Set the DITTO_API_KEY environment variable:
You can also add DITTO_API_KEY=your-api-key to a .env file at the repo root. The CLI loads it automatically.
4

Verify the connection

Run a dry-run pull to confirm everything is wired up:
You should see a list of discovered Ditto spec files and what style guide rules would be written.

Configuration

The dittospec.config.json file controls how the CLI discovers Ditto spec files and syncs style guide rules. A minimal config:
A full config with all options:

Properties

Agent setup

Running init with the --agent flag writes configuration for your AI development tool:
Appends a Ditto Specs section to CLAUDE.md (creates the file if absent) and writes three skill files to .claude/commands/:See Agent Skills for detailed documentation of each skill.
Appends a Ditto Specs section to .cursorrules with instructions for reading and creating Ditto specs.
Re-running init --agent is safe — it updates skill files to the current CLI version and skips CLAUDE.md sections that already exist. Use --force to overwrite skill files you’ve customized.