Authentication
Log in to the urun CLI with an org-scoped deploy API key
Every CLI command is scoped to one org. The CLI authenticates with an org-scoped deploy
API key — a string of the form urun_sk_ followed by 43 base64url characters
(for example urun_sk_0a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0uV).
urun login saves a key you create in the console. There is no OAuth-style browser
login: run urun login with no --api-key and it opens the console's API Keys page
for you (pass --no-browser to just print the URL), where you create a key and paste it
at the prompt.
Before you log in: get access and a key
You authenticate the CLI with a deploy API key, which lives in the console:
- Get into an org. Sign in to the uRun console. If you don't have access yet, request access and an operator provisions your org.
- Create a key. In the console, go to Settings → API Keys and create a deploy key
(
urun_sk_+ 43 base64url chars). Copy it once — it's shown in full only at creation. See API Keys. - Note your org id. It's on the same Settings area, and
urun orgprints it after login (you'll need it for the browser client'sorgId).
Then log in with the key below.
Interactive login
Run urun login with the key. The CLI verifies it against the control plane's
org/config endpoint, then stores the key, your org_id, and the key_id locally so
later commands pick them up automatically.
urun login --api-key urun_sk_0a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0uVAuthenticated successfully. Credentials saved.
Login currently uses a manually vended deploy API key.
Org: org_01J...
Key ID: key_01J...
Credentials: ~/.config/urun/credentials.jsonIf you omit --api-key in an interactive terminal, the CLI opens the console's API Keys
page in your browser (--no-browser prints the URL instead) and prompts for the key
without echoing the input. You can also set it in the environment before logging in:
export URUN_API_KEY=urun_sk_0a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0uV
urun loginCI and automation
For non-interactive environments, skip login entirely and provide credentials per
invocation through environment variables. Every command reads them:
export URUN_API_KEY=urun_sk_0a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0uV
urun deploy app.py| Variable | Purpose | Default |
|---|---|---|
URUN_API_KEY | Org-scoped deploy API key | (required) |
URUN_API_URL | Control-plane API base URL | https://api.urun.sh/v1 |
Per-command --api-key and --api-url flags override the environment.
Credential resolution order
For any command, credentials are resolved in this order:
- The explicit
--api-key/--api-urlflags on the command. - The
URUN_API_KEY/URUN_API_URLenvironment variables. - The credentials saved by
urun login. - For the URL only: the built-in default
https://api.urun.sh/v1.
Confirm who you are
urun orgPrints just your org_id on stdout (machine-readable, nothing else) — useful for scripts
and for the orgId your browser client needs:
org_01J6X9Y2ABCDEF...The deploy API key is a long-lived org secret. Keep it in a secret store / CI secret, never commit it, and never ship it to browser clients. Browser sessions authenticate with short-lived user JWTs instead — see Trusted JWKS and the TypeScript SDK auth modes.