Skip to main content

LumoAuth CLI

The lumo CLI is the fastest way to drive LumoAuth from the terminal: sign in with your browser, spawn ephemeral sandbox organizations, forward webhooks to localhost, scaffold starter projects, and query audit logs. It also exposes the full administration surface for users, roles, OAuth clients, agents, webhooks, MFA policy and audit logs.

brew install lumoauth/tap/lumo # macOS / Linux; other channels below
lumo login --org acme-corp

That's the canonical first 30 seconds. Everything below is a deeper dive.


Why a CLI​

Three audiences benefit:

  • Developers building local-first apps — lumo init scaffolds a working Next.js / Express / FastAPI / Go project; lumo tunnel forwards live webhook events to localhost; lumo dev start gives you a throwaway organization for branch previews.
  • Org admins — full create, read, update and delete over users, roles, groups, OAuth clients, agents, webhooks, audit logs, settings, MFA policy, sessions, and social providers without leaving the terminal.
  • AI coding agents — auto-JSON output, structured errors, typed exit codes, no interactivity, and a lumo api raw passthrough for endpoints not covered by named commands.

Install​

brew install lumoauth/tap/lumo # macOS / Linux
scoop install lumo # Windows (after: scoop bucket add lumoauth https://github.com/lumoauth/scoop-bucket)
winget install --id LumoAuth.lumo # Windows
curl -fsSL https://raw.githubusercontent.com/LumoAuth/cli/main/install.sh | sh # anywhere else; no sudo, installs to ~/.local/bin

Release archives and go install are also available, and lumo upgrade keeps any install current.

Detailed install guide →


Authenticate​

Two paths — pick whichever fits the context.

PathWhenHow
Device-flow login (sign in on another device: approve in a browser)Humans on a workstationlumo login --org <slug>
API keyCI, scripted use, AI agentsexport LUMO_API_KEY=lmk_... && export LUMO_ORG=<slug>

Stored credentials live at ~/.lumoauth/credentials.yaml (mode 0600). API keys live wherever you store secrets.

Authentication reference →


Command reference​

SectionCommand(s)
Sign-inlogin [--scope …] [--profile …] [--no-browser], logout, whoami
Diagnosedoctor — credentials, scopes, connectivity
Profilesprofile list/use/create/delete/show — named credential sets for several organizations or deployments
Configurationconfig init/show/set <key> <value> — keys org_id, api_key, base_url, format, insecure in ~/.lumoauth/config.yaml
Maintenanceversion, upgrade [--check] [--exec], completion <bash|zsh|fish|powershell>
Sandboxesdev start, dev list, dev stop <slug>
Webhook tunneltunnel --to <url> [--filter <event>]
Project scaffoldinginit --framework next|express|fastapi|go
Import from Auth0migrate auth0 --file <export.json>
Usersusers list/get/create/update/delete/block/unblock/set-password, users roles get/set, users groups get/set
User MFAusers authenticators list/remove, users tap (temporary access code), users mfa-reset (deprecated; fails without calling the server)
Federated identitiesusers identities list/link/unlink, identities legacy-saml [--relink]
Roles & permissionsroles list/get/create/update/delete, permissions list/get/create/update/delete
Groupsgroups list/get/create/update/delete, groups members list/add/remove
OAuth clientsapps list/get/create/update/delete/rotate-secret
Agentsagents list/get/create/update/delete/enable/disable/rotate-credentials/token
MCP serversmcp servers, mcp discovery <server-id>, mcp test <server-id> <agent-id>
Webhookswebhooks list/get/create/update/delete, webhooks deliveries list/get/replay
Audit logslogs list/get/stats/export
Organizationorg get, org update --name … --set key=value
Settingssettings get/update <area> (general, authentication, security, email, branding, scim, organization; settings get all)
MFA policymfa policy get, mfa policy set, mfa coverage
Sessions & tokenssessions list/revoke/revoke-all, tokens list/revoke
Social providerssocial list/get/create/delete
Raw APIapi <METHOD> <path> — paths relative to the Admin API; absolute /orgs/… and /api/… paths work too; --raw for anything else

Run lumo --help or lumo <command> --help for the in-binary reference at any time.

Selecting the organization

Every command takes the global --org <slug> flag (or LUMO_ORG); without it the CLI uses the organization stored by lumo login in the active profile. --org-id and LUMO_ORG_ID still work for existing scripts.

Global flags​

--api-key string Organization API key lmk_… (overrides LUMO_API_KEY)
--org string Organization slug (overrides LUMO_ORG and the active profile)
--base-url string Base URL (overrides LUMO_BASE_URL)
--profile string Named credentials profile (overrides LUMO_PROFILE and current_profile)
-o, --output string Output format: table, json, yaml (default: table; json when piped)
--insecure Skip TLS certificate verification (local dev only)
-q, --quiet Suppress non-essential output
-v, --verbose Enable verbose output

Configuration precedence​

Settings (organization, base URL, output format) resolve flags > environment > config file > active profile:

PriorityMethodExample
1 (highest)CLI flags--org acme-corp --base-url https://eu.app.lumoauth.dev
2Environment variablesLUMO_ORG, LUMO_BASE_URL, LUMO_API_KEY, LUMO_OUTPUT_FORMAT, LUMO_INSECURE, LUMO_PROFILE, LUMO_CONFIG_DIR
3Config file~/.lumoauth/config.yaml (org_id, api_key, base_url, format, insecure)
4 (fallback)Active profile~/.lumoauth/credentials.yaml (written by lumo login)

The profile itself is chosen as --profile flag > LUMO_PROFILE > current_profile in the credentials file. Which credential is sent is decided separately; see Authentication.


A typical session​

# Day 1 — install + sign in
brew install lumoauth/tap/lumo
lumo login --org acme-corp

# Spin up a throwaway sandbox for a feature branch
SLUG=$(lumo dev start --name pr-1234 -o json | jq -r '.data.slug')
# → sandbox-pr-1234-7a3b21

# Scaffold a working Next.js app pre-wired to the sandbox
lumo init --framework next --dir ./web --org "$SLUG"
cd web && npm install && npm run dev &

# In another terminal: forward webhook events to the dev server
lumo tunnel --to http://localhost:3000/api/webhooks --org "$SLUG"

# When the PR ships, tear down the sandbox
lumo dev stop "$SLUG"

Output formats and AI-agent friendliness​

Every command supports -o json and -o yaml. The CLI auto-detects non-TTY environments and switches to JSON automatically — no flag needed when piping to jq, into a script, or into an AI agent's tool call.

lumo users list -o json | jq '.data[].email'

Exit codes: 0 success · 1 general error · 2 authentication or authorization · 3 not found · 4 invalid input (HTTP 400, 409, 422) · 5 rate limited. In JSON mode an error is {"error": true, "message", "hint", "status", "code", "details"}; hint says how to fix it (for example the exact lumo login --scope …).

AI agent integration →