CLI Reference

@spiral/cli Overview

The Spiral CLI is a Git-like interface for managing your project's knowledge. It allows any developer to synchronize their local environment with the central knowledge graph, regardless of which IDE they use.

Git-like mental model

If you know Git, you already know how to use Spiral. While Git synchronizes lines of code, Spiral synchronizes decisions, facts, and constraints.

GitSpiralWhat it does
git initspiral initScan codebase, extract context, create project
git clonespiral cloneDownload knowledge base + IDE config files
git statusspiral statusHealth score, drift, proposals, locks
git pullspiral pullFetch the latest knowledge from the server
git pushspiral pushUpload local context changes
git diffspiral diffUnified diff of local vs. server
git logspiral logTimeline of fact mutations
git log --followspiral history <key>Full version history of a specific fact
—spiral graph showKnowledge graph summary
—spiral edges listTyped relationships between facts
—spiral snapshot --atPoint-in-time view at a specific date
—spiral extract --deepComprehensive 8-phase codebase analysis
—spiral exploreBrowse public knowledge bases

Global flags

  • --jsonOutput responses in JSON format for CI/CD integration.
  • --quietSuppress non-essential logging output.