CLI

CLI

The Konet CLI is a single Go binary that manages the lifecycle of the Konet Server container.

Installation

brew install raucheacho/tap/konet

Or build from source:

cd konet-cli
go build -o konet .

Commands

konet init

Creates konet.config.toml in the current directory with a default config and a generated secret_key_base. Edit it to set a strong jwt_secret, then run konet keys generate.

konet init

konet start

Pulls the server image (if missing) and starts the container.

konet start

konet stop

Stops and removes the running container.

konet stop

konet status

Shows container state, port mapping, and uptime.

konet status

konet logs

Streams server logs. Prints the current buffer and exits, or pass -f to follow.

konet logs        # print current logs
konet logs -f     # follow (until Ctrl+C)

konet studio

Opens the Studio dashboard in your default browser.

konet studio

konet channels list

Lists active channel topics and subscriber counts.

konet channels list

konet publish <channel> <payload>

Broadcasts a JSON message to a channel from the CLI. <payload> must be valid JSON; the event name defaults to message and can be set with -e/--event.

konet publish lobby '{"text":"Server rebooted"}'
konet publish lobby '{"text":"hi"}' --event notification

konet keys generate

Generates anon_key and service_key from your jwt_secret and writes them back to konet.config.toml.

konet keys generate

konet upgrade

Upgrades the CLI binary itself: it checks the latest GitHub release and, if you are behind, re-runs the install script. On Windows it prints the release URL instead of self-updating.

konet upgrade

It does not touch the server image. konet start only pulls ghcr.io/raucheacho/konet:latest when no copy is cached locally, so moving the server to a newer build is an explicit step:

konet stop
docker pull ghcr.io/raucheacho/konet:latest
konet start

Commands that talk to a running server (init, keys, channels, publish, logs, status, studio) read konet.config.toml from the current directory.

Global Flags

FlagDescription
--versionPrint the CLI version
-h, --helpShow help for any command