CLI Overview
The sf command-line interface is the primary way to interact with Stoneforge. While agents use the CLI internally, human operators typically use the web dashboard — but the CLI is essential for setup, debugging, and scripting.
Installation
npm install -g @stoneforge/quarrypnpm add -g @stoneforge/quarrygit clone https://github.com/stoneforge-ai/stoneforge.gitcd stoneforgepnpm install && pnpm buildpnpm link --global --filter @stoneforge/quarryVerify it works:
sf --versionInitializing a workspace
Run sf init in your project root to create a .stoneforge/ directory:
sf init --name my-projectThis creates:
.stoneforge/config.yaml— project configuration.stoneforge/stoneforge.db— local SQLite database.stoneforge/playbooks/— playbook definitions.stoneforge/.gitignore— excludes the database from version control
If .stoneforge/ already exists (e.g. after cloning a repo) but no database is present, sf init creates the database and auto-imports from existing JSONL sync files.
Global flags
These flags work with any sf command:
| Flag | Description |
|---|---|
--help, -h | Show help |
--version, -V | Show version |
--json | Output as JSON (machine-readable) |
--quiet, -q | Minimal output (IDs only) |
--verbose, -v | Enable debug output |
--actor <name> | Specify acting entity |
--from <name> | Alias for --actor |
--db <path> | Override database path |
--sign-key <key> | Private key for signing (base64 PKCS8) |
--sign-key-file <path> | Path to file containing private key |
Command aliases
Many commands have shorter aliases for convenience:
| Alias | Maps to |
|---|---|
add, new | create |
rm, remove | delete |
ls | list |
s, get | show |
todo, tasks | ready |
done, complete | close |
st | status |
dep | dependency |
msg | message |
doc | document |
Common workflows
Create and manage tasks
# Create a tasksf create task --title "Implement auth" --priority 1
# List open taskssf task list --status open
# See ready tasks (unblocked)sf task ready
# Close a tasksf task close <id>Work with dependencies
# Block task B on task Asf dep add <taskA> <taskB>
# View the dependency treesf dep tree <id>Sync with collaborators
# Export changes to JSONL sync filessf export
# Check sync statussf status
# Import changes from sync filessf importStart the dashboard
# Start the orchestrator server + dashboardsf serve
# Or start just the data platformsf serve quarry --port 3456Getting help
Every command supports --help:
sf --help # Top-level helpsf task --help # Task subcommand helpsf dep add --help # Specific command helpFor the complete list of every command and flag, see the Command Reference.