mcpField
S
spacetimedb-cli

spacetimedb-cli

github.com/danmossaDevelopment2166 installsUpdated 19w ago
Repository

About spacetimedb-cli

spacetimedb-cli is a skill for workflows using the `spacetime` command-line tool. It covers module setup, builds, publishing, code generation, runtime inspection, and debugging commands.

Key features

  1. 01Module initialization and builds
  2. 02Publish and migration guidance
  3. 03Client binding generation
  4. 04Database calls and SQL queries
  5. 05Logs and module inspection

Use cases

  1. 01Starting local development with `spacetime dev`
  2. 02Building and publishing a module
  3. 03Generating client language bindings
  4. 04Inspecting database state and runtime logs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/danmossa/spacetimedb-skills --skill spacetimedb-cli

After installing, type/spacetimedb-cliin Claude Code to confirm it loaded.

Bundled filesreferences/cli-reference-standalone-config.mdreferences/cli-reference.md

Details

From the project README

Use this skill for spacetime command-line workflows.

Core patterns

  • Local iteration usually starts with spacetime dev; use --template, --client-lang, --module-path, and --module-bindings-path when the project layout is not the default.
  • Module lifecycle commands are spacetime init, spacetime build, spacetime publish, and spacetime generate.
  • Runtime/debug commands are spacetime call [DATABASE] <FUNCTION> [ARGS...], spacetime sql [DATABASE] "<QUERY>", spacetime logs [DATABASE], and spacetime describe --json [DATABASE].
  • spacetime generate supports --lang csharp|typescript|rust|unrealcpp, --out-dir, --module-path, and --include-private.
  • spacetime publish [name|identity] builds by default. Use --server for non-default hosts and read migration guidance before --break-clients or --delete-data.
  • Database names are lowercase ASCII words separated by hyphens.

Common command shapes

spacetime dev --template basic-ts
spacetime build --module-path spacetimedb
spacetime publish my-database
spacetime generate --lang typescript --out-dir client/src/module_bindings --module-path spacetimedb
spacetime call my-database add Alice
spacetime sql my-database "SELECT * FROM person"
spacetime logs my-database --follow --level info

Reference map

NeedOpen
Command syntax and flagsreferences/cli-reference.md
Standalone server configreferences/cli-reference-standalone-config.md

Guidance

  • Prefer exact CLI flags from the reference when writing final commands for uncommon options.
  • Keep spacetime generate language, output directory, and module/database name aligned with the client SDK being used.
  • Route publishing and migration behavior to spacetimedb-databases when schema changes matter.

Comments

Markdown supported