Skip to content

CLI reference

The genlabz CLI is the primary interface for interacting with the GenLabZ platform from your terminal. It handles authentication, and will grow to cover project management and event coordination as those services come online.

Installation

The CLI is distributed as a Python package in the monorepo. Install it with uv:

Terminal
cd packages/genlabz-cli
uv sync
source .venv/bin/activate

After activation, genlabz is available on your PATH.

Synopsis

genlabz [--json] [--verbose] <command> [<subcommand>] [options]

Global flags

These flags apply to every command and must be placed before the command name.

FlagShortDescription
--jsonOutput results as machine-readable JSON instead of formatted text
--verbose-vPrint diagnostic information to stderr — resolved config values and full tracebacks on error
--helpShow help for the current command or subcommand and exit

Configuration

The CLI uses baked-in defaults for production endpoints. Override them with environment variables for local development or testing.

VariableConfig keyDefault
GENLABZ_AUTH_URLcognito_domainauth.genlabz.com
GENLABZ_API_URLapi_urlapi.genlabz.com

Run with --verbose to print the resolved config to stderr before any command executes:

Terminal
genlabz --verbose auth status

Commands

auth

Manage platform authentication. See Authentication for a full walkthrough.

Terminal
genlabz auth login # sign in via browser (PKCE flow)
genlabz auth status # show current auth state and token expiry
genlabz auth logout # revoke and clear stored tokens

Running genlabz auth with no subcommand prints the auth help and exits.

Exit codes

CodeMeaning
0Success
1User error — bad arguments, not logged in, validation failure
2Unexpected error — unhandled exception, network failure
130Interrupted — Ctrl+C / SIGINT

Scripts can rely on these codes for conditional logic:

Terminal
genlabz auth status || genlabz auth login

JSON output

Pass --json to get machine-readable output from any command. This suppresses table rendering and colour codes:

Terminal
genlabz --json auth status