Skip to main content
All commands run as studiograph <command> from a workspace directory unless noted.

Getting started

init

Create a new workspace: a single Git repository at the root, a .studiograph/ config directory, and a baseline commit.
The optional directory controls where the workspace is created; by default it’s a new directory named after the team.

clone

Clone a hosted workspace into a full local copy. Owner-oriented: it signs in with your email and password (the STUDIOGRAPH_EMAIL and STUDIOGRAPH_PASSWORD environment variables) and stores an sg_ token in ~/.studiograph/user.json for later pull/push.

Daily workflow

pull

Fetch content and configuration from the server into the local checkout. If the local and remote copies have diverged, pull exits non-zero with a clear error — resolve manually. After pulling into a workspace that’s being served, restart serve.
  • --remote (alias --server) — server URL to pull from
  • --token — auth token; falls back to STUDIOGRAPH_TOKEN, then the stored token

push

Send local content and configuration to the server. Same flags and divergence behavior as pull.

commit

Commit local workspace changes to Git.
  • --message — commit message
  • --config — also commit changes in the .studiograph/ config directory

about

Display or edit the workspace’s ABOUT.md — the team profile the agent uses for context.
  • -e, --edit — open ABOUT.md in $EDITOR
  • -i, --interactive — step through each section interactively
  • -s, --set <file> — replace ABOUT.md with the contents of a file

Server

serve

Start the server from the workspace directory. Defaults to port 8000 on host 0.0.0.0; if the port is busy, it auto-increments. Opens the web UI in a browser unless STUDIOGRAPH_NO_OPEN=1 is set.

deploy railway

Deploy the workspace to Railway. Auto-provisions STUDIOGRAPH_JWT_SECRET and STUDIOGRAPH_MASTER_KEY.
  • -n, --name — Railway project name (ignored when --project is given)
  • -p, --project — existing Railway project ID or dashboard URL; adds the service to it instead of creating a new project
  • -s, --service-name — Railway service name (defaults to the workspace name slug)
  • --provider, --model, --api-key — AI provider configuration; skips the interactive prompts (STUDIOGRAPH_DEPLOY_API_KEY also works for the key)

redeploy

Redeploy an existing Railway deployment, pinning the exact npm version currently installed.

Admin

Administrative commands live under admin. The old top-level user, folder, secrets, settings, and audit forms print a deprecation warning and will be dropped in a future release.

admin token issue

Mint an sg_ API token against a running server and store it for CLI use.
Reads STUDIOGRAPH_EMAIL / STUDIOGRAPH_PASSWORD when the flags are omitted.

admin user

Add or remove user accounts.
  • --roleowner or member
  • --if-empty — only create the user when no users exist yet (used for first-boot provisioning)

admin folder

Manage folders.
  • remove --delete-files — also delete the folder’s files on disk

admin secrets

Manage stored credentials in the encrypted secrets store.

admin settings

Read and write workspace settings.

admin audit

List audit records.

admin migrate

Bulk regex find-and-replace across the workspace’s content files, producing one commit per folder. Refuses to run if anything targeted has uncommitted changes.
  • --dry-run — report matches without writing
  • --also-rename-files — also rename files whose names match the regex
  • --repos — limit to specific folders

admin backup

Create a passphrase-wrapped .sgbackup bundle of the workspace.

admin restore

Restore a workspace from a .sgbackup bundle.

admin transfer-ownership

Transfer workspace ownership to another user.

admin audit-workspace

Audit the workspace for integrity problems.

admin audit-orphan-attachments

Find attachments no entry references; --apply acts on the findings.

Integrations

mcp

Run a stdio MCP server for AI clients that spawn subprocesses. Requires STUDIOGRAPH_MCP_TOKEN; proxies to the local server’s /mcp endpoint and fails loudly on auth errors. See Connect AI tools.

connector

List or remove external connectors.

r2

Configure Cloudflare R2 asset storage and move assets to it.

Maintenance

index

Rebuild the workspace index.

lint

Check workspace content for problems.

orphans

List orphaned entries; optionally delete them.

repair-folders

Detect and repair inconsistencies in folder records.

reset

Reset workspace state — entities, sessions, or memory.
reset and admin folder remove --delete-files are destructive. Take a backup with admin backup first.

config

Manage the CLI’s stored tokens: list them and drop the ones you no longer need.