Skip to content

CLI

Every dashboard action as a command. Output is readable by default and JSON with --json, and the exit codes mean something, so the CLI works the same in your terminal, in CI and for an agent.

In preview. The commands below are the planned interface. Names and flags may change before general availability.

Install

Terminal
npx dianthan --help        # no install needed
npm i -g dianthan          # or install it globally

Start a project

Terminal
npx dianthan init

Run it in a project directory. It signs you in, creates an app (or links an existing one), asks which systems you want, and writes the app's environment to .env.local. Every step below can also be run on its own.

Sign in

Terminal
dianthan login             # opens a browser; no password
dianthan whoami

In CI, set DIANTHAN_TOKEN to a personal key instead of running login.

Apps

Terminal
dianthan apps create "Field Notes" --domain fieldnotes.app --signup open
dianthan apps list
dianthan apps domains add fieldnotes www.fieldnotes.app
dianthan link fieldnotes   # remembers the app for this directory

Systems

Terminal
dianthan add identity billing metering
dianthan systems list
dianthan remove flags

Removing a system stops new requests to it. Its data is kept for 30 days in case you turn it back on.

Keys and environment

Terminal
dianthan keys create --name web-server
dianthan keys create --name ci --scopes logs:read,flags:write --expires 30d
dianthan keys rotate key_…
dianthan env pull          # writes DIANTHAN_URL, DIANTHAN_APP_ID and DIANTHAN_KEY to .env.local

Billing

Terminal
dianthan plans create pro --price 12/month --entitle export.pdf --entitle seats=5
dianthan plans list

Flags

Terminal
dianthan flags create editor.v2 --default false
dianthan flags rollout editor.v2 20
dianthan flags off editor.v2

Observing

Terminal
dianthan logs tail --type export.completed
dianthan errors list --since 24h

Exit codes

CodeMeaning
0Success
1The request failed. The message says why.
2Invalid usage, such as a missing argument or an unknown flag
3Not signed in, or the key lacks the scope
4Not found