@nublestation/cli provides the nuble command — the developer’s tool for connecting
to a NubleStation org, pushing database schemas, and deploying frontends. It also wraps
the host’s Docker stack (nuble server …) when run on the machine itself.
Installation
npm install -g @nublestation/cli
# or
pnpm add -g @nublestation/cli
Requires Node 22+ (the CLI loads your TypeScript schema.ts with
--experimental-strip-types).
Configuration
nuble init writes a TOML config to ~/.nuble/config, organized into profiles so
one machine can target several orgs:
[default]
org_url = "http://api.clinic.local"
api_key = "nbl_<key_id>.<secret>"
app_slug = "tasks"
Every command accepts --profile <name> to select a profile (defaults to default).
nuble init
Connect to a NubleStation org and write a profile. Prompts interactively for anything not passed as a flag, then verifies the gateway is reachable before saving.
nuble init
nuble init --url http://api.clinic.local --key nbl_abc.secret --slug tasks
| Flag | Description |
|---|---|
--url <url> | Gateway URL (e.g. http://api.clinic.local) |
--key <key> | API key (nbl_…) |
--slug <slug> | App slug |
--profile <name> | Profile name to write (default: default) |
--url also falls back to the NUBLE_GATEWAY_URL environment variable.
nuble db push
Compile your schema.ts and apply it to Blaze.
nuble db push
nuble db push --schema src/schema.ts
What it does:
- Loads your
schema.tsand serializes it (serializeSchema). POSTs the schema JSON to/v1/blaze/admin/migrationson the gateway.- Blaze takes a per-app advisory lock, diffs against the previous schema, generates and validates the migration SQL, applies the DDL, and enables Row-Level Security on any new table — all in one transaction.
- Prints how many statements were applied (or
Schema unchangedon a no-op).
Options:
| Flag | Description |
|---|---|
--schema <path> | Path to your schema file (default: schema.ts) |
--profile <name> | Config profile to use (default: default) |
Your schema module must export schema (or a default export). See
@nublestation/blaze for the DSL.
nuble deploy
Zip a built frontend directory and deploy it to Orbit via the gateway.
nuble deploy
nuble deploy --dist build
nuble deploy --build # run the project build first
What it does:
- Optionally runs your project’s build script (
--build), loading.envautomatically so build-time vars (likeVITE_…) are baked in. - Zips the
dist/directory (or--dist). - Uploads it to Orbit; Caddy serves the new files immediately.
Options:
| Flag | Description |
|---|---|
--dist <path> | Built frontend directory (default: dist) |
--build | Run the project build script before deploying |
--profile <name> | Config profile to use (default: default) |
nuble status
Check gateway health for every configured profile.
nuble status
[default] http://api.clinic.local — checking… ✓ online
nuble server …
Manage the NubleStation Docker stack on the host machine. These wrap Docker Compose and are meant to run where NubleStation is installed.
| Command | Description |
|---|---|
nuble server start | Start all services |
nuble server stop | Stop all services (data is preserved) |
nuble server restart | Restart all services |
nuble server status | Show container health |
nuble server logs [service] | Tail logs (omit service for all; -f to follow) |
nuble server status
nuble server logs blaze -f
Environment variables
| Variable | Description |
|---|---|
NUBLE_GATEWAY_URL | Fallback gateway URL for nuble init --url |