Skip to content

CLI

The Stackboard CLI turns a repository you have already pushed into an app, and manages its settings afterward. It does not touch git. The repository already exists; what the CLI does is tell Stackboard where it is, how to launch it, what it may call, and who may open it.

Needs Node 20.11 or newer.

Terminal window
npm install -g @stackboard/cli

Or run it without installing. The package ships two command names, so name the one you want:

Terminal window
npx -p @stackboard/cli sbd whoami

The command is sbd. It is also installed as stackboard, so use whichever you prefer.

Terminal window
sbd login

It prints a code and a URL, then waits. Open the URL in a browser you are already signed into, check that the code matches the one in your terminal, and approve. The credential comes back over the CLI’s own connection, so it never passes through the browser and is never printed.

It lasts until you revoke it, either with sbd logout or from Settings → Personal access tokens in Stackboard.

A credential belongs to one organization, chosen when you approve it. Switching organizations in a browser later does not move it. sbd whoami says which one it writes to.

On a server, in a container, or in a pipeline, create a token under Settings → Personal access tokens and hand it over instead:

Terminal window
sbd login --token -

The - reads the token from standard input, which keeps it out of your shell history and out of the process list. See Automation for running without signing in at all.

Check the repository first. validate reads it exactly as Stackboard will, without creating anything:

Terminal window
sbd validate --repo https://github.com/acme/dashboard

Then register it:

Terminal window
sbd register \
--repo https://github.com/acme/dashboard \
--name "Sales dashboard"

The output includes the app’s id and URL. Every other setting has a default you can change later, in the browser or with the CLI.

Checked in this order:

  1. --host
  2. STACKBOARD_HOST
  3. the last instance you signed into
  4. https://app.stackboard.ai

Your credential is stored at $XDG_CONFIG_HOME/stackboard/config.json, or %APPDATA%\stackboard\config.json on Windows, with file permissions that keep it readable only by you.

Stackboard reads a repository as you, through the git provider connection in your user settings. If a command reports that it could not read the repository, connect the matching provider there. No flag replaces that connection.