@kingrtckit/cli is for you, the developer, working in a terminal or in
CI. It's not part of your app, and your users never run it.
Use it to:
- Set up: create projects and API keys without opening the dashboard.
- Debug: see who's in a room right now, why a user's connection failed, or whether chat is healthy.
- Automate: script the same things in CI, with
--jsonoutput and stable exit codes.
Think of it as the dashboard, in your terminal. It can do what you can do in the dashboard, and nothing more.
Install
npm install -g @kingrtckit/cliOr run it without installing. This is best for CI:
npx @kingrtckit/cli projects listPoint it at KingRTCKit
Do this once, before anything else. Out of the box the CLI talks to
http://localhost:4100, a local development API. Point it at the hosted
API:
kingrtckit config set apiUrl https://api.livqeno.comKINGRTCKIT_API_URL does the same for one command or one CI job, without writing
the config file. It wins over the saved value.
Authenticate
The CLI needs to know who you are. There are two ways, depending on where it runs.
On your own computer
kingrtckit loginThis opens your browser and uses your dashboard login. Nothing to paste.
The login page is on the dashboard. The CLI works out its address from the
API URL: https://api.livqeno.com opens https://app.livqeno.com, and a
local http://localhost:4100 opens http://localhost:3001. For any other
setup, set KINGRTCKIT_DASHBOARD_URL to the dashboard's address.
In CI, a container, or over SSH
There's no browser there, so set an environment variable instead. Nothing is saved to disk.
export KINGRTCKIT_TOKEN="$YOUR_SESSION_TOKEN"
export KINGRTCKIT_API_URL="https://api.livqeno.com" # required: the default is localhost
kingrtckit projects list --jsonHow to get a token: it's the session token from your dashboard login.
- Run
kingrtckit loginonce on a computer with a browser. - Open
~/.swalvo/credentials.jsonand copy thetokenfield. - Save it as a secret in your CI provider.
Session tokens expire. If a job starts failing with exit code 3, get a
new token.
A full GitHub Actions step:
- name: List Livqeno projects
env:
KINGRTCKIT_TOKEN: ${{ secrets.KINGRTCKIT_TOKEN }}
run: npx @kingrtckit/cli projects list --jsonGood to know
-
KINGRTCKIT_TOKENtakes priority over a saved login. You can use a different identity for one command:Terminal KINGRTCKIT_TOKEN="$DEPLOY_TOKEN" kingrtckit keys list --project 16281d1e-5b0c-4f3e-9a51-7d2c8e4b9a10 -
No browser, but you can write to the home folder? Run
kingrtckit login --token "$KINGRTCKIT_TOKEN". It checks the token and saves it, so later commands don't need the variable. -
kingrtckit login --no-openprints the login link instead of opening a browser for you. Copy and paste it into a browser yourself — handy if you're logging in from one device but want to approve it on another. -
kingrtckit whoamishows who you're logged in as, and where the login came from:$ kingrtckit whoami Logged in as: dev@example.com Credentials: $KINGRTCKIT_TOKEN API: https://api.livqeno.com Projects: 3 Environment: development
Projects
A project holds one app's rooms, chats, and keys. See Create a project.
kingrtckit projects create my-video-app # prints the new project's ID
kingrtckit projects list # every project, with its ID
kingrtckit projects inspect <project-id>
kingrtckit projects use <project-id> # sets the current project for other commands
kingrtckit projects delete <project-id> --yes # --yes required outside a TTYProject IDs are plain UUIDs, like 16281d1e-5b0c-4f3e-9a51-7d2c8e4b9a10.
Copy one from kingrtckit projects list or from the output of projects create.
Commands that work on a project (keys, rooms, streams, …) need one
selected. Without one they fail with "No KingRTCKit project selected". Select it
with kingrtckit projects use <project-id>, link the folder with kingrtckit init, or
pass --project <project-id> to a single command.
kingrtckit init
Links the current folder to a project. Then you don't need --project on
every command:
kingrtckit initAPI keys
This is how you create the API key your backend will use. The key is printed once: copy it straight into your backend's secrets. See API credentials.
kingrtckit keys create --name backend --environment production
kingrtckit keys list
kingrtckit keys revoke <keyId>--environment accepts dev / development, stg / staging,
prod / production. A typo is rejected. Leave it out to get a development
key. See Environments.
Rooms
Useful when a user says "I can't see Bob in the call": check who is actually in the room, and what they're publishing.
kingrtckit rooms list # live SFU participant counts, honest about unknowns
kingrtckit rooms inspect <roomId> # participants + published tracks
kingrtckit rooms create <name>Chat
Useful for checking chat health (how busy it is, how fast messages are delivered) and who's connected.
kingrtckit chat overview # activity, throughput, latency
kingrtckit chat overview --range 24h # 15m | 1h | 24h | 7d
kingrtckit chat conversations # or: kingrtckit chat list
kingrtckit chat connections # WebSocket sessions
kingrtckit chat connections --state CONNECTED --limit 100
kingrtckit chat presence <conversationId>Chat commands are read-only. The CLI can't create conversations or send messages, because it doesn't hold an API key.
Live streams
kingrtckit streams list
kingrtckit streams list --status LIVE
kingrtckit streams inspect <streamId> # details + live viewer count + hosts
kingrtckit streams create "Friday Q&A" --host user-123
kingrtckit streams update <streamId> --title "New title"
kingrtckit streams end <streamId> # LIVE → ENDED, terminalThere are no commands to add/remove hosts or make host/viewer tokens.
Those create real credentials, which need an API key. Do them from your
backend with @kingrtckit/server or livqeno.
RTC: live media state
See live rooms, participants, and server capacity:
livqeno rtc rooms list
livqeno rtc rooms get <roomId>
livqeno rtc rooms close <roomId>
livqeno rtc participants list <roomId>
livqeno rtc diagnostics <roomId>
# Livqeno operators only — a customer account gets 403:
livqeno rtc servers list
livqeno rtc servers list --region us-east # just the servers in that region
livqeno rtc servers get <server>
livqeno rtc servers drain <server> # stop new rooms; live ones keep running
livqeno rtc servers drain <server> --undo # undo that: let it take new rooms againlivqeno rtc diagnosticsworks for everyone. It tells you if there's capacity, without naming servers.livqeno rtc servers ...is for KingRTCKit's own team. You'll get 403.
kingrtckit rooms vs livqeno rtc rooms:
| Command | Shows |
|---|---|
kingrtckit rooms | The room records saved in your project |
livqeno rtc rooms | What's live on the media servers right now |
Project setup
kingrtckit init # link this directory to a project
kingrtckit dev # check this directory is ready for Livqeno development
kingrtckit sdk install # add and configure a Livqeno SDK in this project
kingrtckit sdk install --dry-run # just show what it would run, don't install anything
livqeno logs # developer log streaming (coming soon — currently returns a status message)
livqeno version # the CLI's own version
kingrtckit logout # discard the stored sessionConnections, errors, diagnostics
This is where you go when a call failed and you want to know why. A connection is one user's session in a call; an error is a problem a client SDK reported. Both are sent by your users' apps automatically (see Telemetry).
A typical debugging session:
livqeno errors listto find recent failures.livqeno errors inspect <errorId>to see the likely cause and a suggested fix.livqeno connections inspect <connectionId>to check that user's network quality (packet loss, jitter, round-trip time).
livqeno connections list
livqeno connections inspect <connectionId> # includes the Quality section — see below
livqeno errors list
livqeno errors list --category TOKEN_ERROR # only this kind of error (or ICE_ERROR, TURN_ERROR, ...)
livqeno errors list --connection <connectionId> # only errors from that one connection
livqeno errors inspect <errorId> # category, likely cause, suggested action
livqeno diagnosticsconnections inspect shows RTT, jitter, packet loss, bitrate, and codec once
the client's SDK has reported them. A brand-new connection may show nothing
yet. See Diagnostics.
Status and config
kingrtckit status # is everything up
kingrtckit config list
kingrtckit config get apiUrl
kingrtckit config set apiUrl https://api.livqeno.comEnvironment variables the CLI reads:
| Variable | What it does |
|---|---|
KINGRTCKIT_API_URL | The API to talk to. Overrides apiUrl from kingrtckit config. Default http://localhost:4100. |
KINGRTCKIT_TOKEN | A dashboard session token. Overrides a saved kingrtckit login. |
KINGRTCKIT_DASHBOARD_URL | Where kingrtckit login opens the login page. Only needed when it can't be worked out from the API URL. |
KINGRTCKIT_API_URL, KINGRTCKIT_TOKEN, KINGRTCKIT_CONFIG_DIR | Accepted in place of the LIVQENO_* names. Not deprecated: existing CI jobs need no change. |
KINGRTCKIT_API_URL, KINGRTCKIT_TOKEN, KINGRTCKIT_CONFIG_DIR | Accepted for compatibility. Deprecated — setting one prints a warning. Rename to LIVQENO_*. |
JSON output for scripts
Every read command accepts --json:
kingrtckit status --json | jq -r '.dependencies.database'
kingrtckit projects list --json | jq -r '.[0].id'Debug mode
kingrtckit --debug statusShows the full requests and responses (never secrets). Use it when a command doesn't do what you expect.
Exit codes
These stay the same across releases, so scripts can rely on them:
| Code | Meaning |
|---|---|
0 | Success |
1 | General failure |
2 | Invalid usage — bad flags or arguments |
3 | Authentication failure |
4 | Authorization failure |
5 | Not found |
6 | Network failure |
Security
- The CLI never has your project API key or a chat token's secret.
- It only sees what you can already see in the dashboard.
- A saved login is stored in
~/.swalvo/credentials.jsonwith mode600(folder700). - A token from
KINGRTCKIT_TOKENis never saved to disk. - No command ever prints a token, including
--jsonand--debugoutput.
Next steps
- SDKs: the packages your backend and app use. The CLI doesn't replace them.
- Diagnostics: what the connection quality numbers mean.
- Errors: what each error code means.