CLI Overview
The raisindb CLI installs and runs the server, scaffolds projects, builds and
deploys packages, and administers repositories, users, secrets and AI providers
over the HTTP API.
Installation
npm install -g @raisindb/cli
raisindb --version
Quick start
raisindb server start # download the server binary and start it
raisindb login # authenticate (browser flow)
raisindb package init my-app # scaffold a project with a package/ folder
raisindb repo create my-app --exists-ok
raisindb deploy my-app/package --repo my-app --install
raisindb sync my-app/package --repo my-app --watch --push
Command groups
| Group | Description |
|---|---|
login, logout | Authenticate with a server: browser flow, or --username/--password or --token for scripts |
server | Install, start, stop, update and inspect the server binary |
package | Init, validate, create, upload, install, list, sync, clone |
deploy, sync | Top-level aliases for package deploy and package sync |
create | Scaffold a function or a connector adapter |
function | Build, check, run and test WebAssembly functions |
flow | Offline static analysis of flow definitions |
repo | Create, list, delete repositories |
ai provider | Configure tenant AI providers; keys are write-only |
secret | Write, list, rotate and delete encrypted secrets |
user | Register identity users |
cors | Manage CORS allowed origins |
shell | Interactive SQL shell |
Every command prints its options with --help, for example
raisindb package sync --help.
Configuration
The CLI stores the server URL, token and default repository in a .raisinrc
file (YAML):
server: http://localhost:8080
token: <jwt>
default_repo: myapp
The file is looked up by walking up from the current directory; if none is
found, ~/.raisinrc is used. raisindb login writes it, and raisindb logout
clears the token.
Environment variables
Environment variables take precedence over .raisinrc, which is what makes CI
work without a config file or an interactive login:
| Variable | Overrides | Description |
|---|---|---|
RAISINDB_SERVER | server | Server URL |
RAISINDB_TOKEN | token | Auth token; skips raisindb login |
RAISINDB_REPO | default_repo | Repository used when --repo is omitted |
export RAISINDB_SERVER=https://db.example.com
export RAISINDB_TOKEN=$CI_RAISINDB_TOKEN
raisindb repo create myapp --exists-ok
raisindb deploy ./package --repo myapp --install
raisindb server install also honours RAISINDB_VERSION to pin a release tag,
RAISINDB_GH_TOKEN or GITHUB_TOKEN for authenticated GitHub downloads, and
RAISINDB_SERVER_GITHUB_REPO to download from a fork.