betterspec
CLI Reference

CLI Reference

Complete reference for all betterspec CLI commands.

CLI Reference

The betterspec CLI is a pure data tool. It reads and writes specs, manages knowledge, and runs drift analysis — no AI required. Your AI coding platform (OpenCode, Claude Code, Gemini CLI, Codex, Cursor) calls betterspec and acts on the results.

Installation

bun i -g @betterspec/cli

All commands support -C, --cwd <path> to set the working directory.

Commands

Spec Lifecycle

CommandDescription
initInitialize betterspec in a project
proposeCreate a new change proposal
showView all spec files for a change
verifyCheck spec completeness (structural)
archiveArchive a completed change and capture knowledge

Visibility & Navigation

CommandDescription
statusShow project status dashboard
listList all changes with filters
capabilitiesList registered capabilities
diffShow drift score and spec gaps
impactShow what references a file or path

Configuration & Maintenance

CommandDescription
configGet or set configuration values
doctorHealth check and diagnostics
syncSync with global spec repository
serveStart the betterspec MCP server

Global Options

-C, --cwd <path>    Set working directory
-V, --version       Output version number
-h, --help          Display help

betterspec is not an AI tool

betterspec does not call AI. There are no AI-powered commands in the CLI. Instead, your AI coding platform reads specs from the filesystem or via the MCP server, reasons about them, and calls betterspec CLI commands to act on the results.

This keeps betterspec fast, deterministic, and provider-agnostic. The intelligence lives in your AI tool — betterspec manages the data layer.

AI platform (OpenCode / Claude Code / Gemini / Codex)

      ├─ reads   betterspec/changes/*/specs/
      ├─ reads   betterspec/knowledge/
      ├─ calls   betterspec propose / verify / archive / diff
      └─ calls   @betterspec/mcp tools

On this page