CLI Reference

Init & Clone

Every Spiral workspace begins by initializing a new project or cloning an existing one — just like Git.

spiral init

Run this inside any directory to give it a Spiral knowledge layer. The CLI scans your codebase, creates a project on the server, extracts context into structured facts, and writes IDE configuration files.

$ cd your-project
$ spiral init
Scanning repository...
Found Next.js, Tailwind, Prisma
Project created: your-project
Extracted 23 facts

Files written to your project:

  • .spiral/config.json — Project identity anchor
  • .cursor/mcp.json — Cursor MCP configuration
  • .vscode/mcp.json — VS Code MCP configuration
  • CONTEXT.md — Project knowledge summary
  • .cursor/rules — Stack-specific AI rules
  • CLAUDE.md — Claude agent context
  • .github/copilot-instructions.md — Copilot context
  • .windsurfrules — Windsurf context

Use --manual to paste your own context instead of auto-scanning.

spiral clone

Download an existing knowledge base — either your own project from another machine, or a public knowledge base from the community.

$ spiral clone username/my-project
Fetching knowledge base...
Cloned into ./my-project (47 facts, 12 relationships)

You can also clone by project ID: spiral clone <project-id>. The same IDE configuration files are generated automatically.