Skip to content

Blankeos/spacetimedb-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

57 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ธ SpacetimeDB Studio

A local web-based database studio for SpacetimeDB โ€” like Drizzle Studio, but for SpacetimeDB.

Run one command and get a full UI to browse your tables, write and execute SQL queries, and inspect your schema.

Requirements

  • SpacetimeDB CLI installed and on your PATH
  • A running SpacetimeDB instance with at least one database

Usage

npx spacetime-studio <database>
bunx spacetime-studio <database> # or w/ bun (faster)

This opens the studio at http://localhost:5555 pointed at your database.

Options

spacetime-studio [options] [database]

Arguments:
  database              Database name to connect to

Options:
  --db <database>       Database name (alternative to positional argument)
  --port <port>         Port to run the studio on (default: 5555)
  --host <host>         SpacetimeDB host (default: localhost)
  --debug               Show debug path information
  -h, --help            Show help
  -V, --version         Show version

Examples

# Connect to a database
spacetime-studio my-database

# Custom port
spacetime-studio my-database --port 3000 # WIP

# Custom host
spacetime-studio my-database --host 127.0.0.1 # WIP

# Using the --db flag
spacetime-studio --db my-database

โœจ Features

  • ๐Ÿ“ SQL Editor โ€” Write and run SQL queries with syntax highlighting and autocompletion
  • โŒจ๏ธ Vim mode โ€” Full Vim keybindings in the editor (toggle in settings)
  • ๐Ÿ“Š Results table โ€” View query results in a sortable, interactive table
  • โœ๏ธ Inline editing โ€” Click a cell to edit it; generates and runs the UPDATE statement automatically
  • ๐Ÿ” Schema inspector โ€” Browse your tables, columns, and reducers
  • โšก Keyboard shortcut โ€” Cmd+Enter / Ctrl+Enter to run a query (or just the selection)

๐Ÿ› ๏ธ Development

This is a Bun monorepo. To get started:

bun install

# Run the studio app (hot reload)
bun run dev:studio

# Run the CLI in dev mode
bun run dev:cli

# Build everything
bun run build

Project Structure

spacetimedb-studio/
โ”œโ”€โ”€ apps/
โ”‚   โ””โ”€โ”€ studio/          # SolidJS + Vike web app (the UI)
โ””โ”€โ”€ packages/
    โ””โ”€โ”€ cli/             # CLI binary published to npm as spacetime-studio

๐Ÿ“ฆ Publishing

This project uses Changesets for versioning.

# Create a changeset
bun run changeset

# Bump versions
bun run changeset version

# Publish (done automatically via GitHub Actions on merge to main)
bun run publish-ci

License

MIT

About

๐Ÿ›ธ SpacetimeDB Studio like Prisma Studio / Drizzle-Kit Studio.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors