Skip to content
Kapten
Esc
↑↓navigate↵open⌘Jpreview
On this page

kapten auth

Log in, check who commands run as, and switch between saved logins (contexts).

kapten login, kapten whoami and kapten logout are shortcuts for the kapten auth commands of the same name. See Authentication for how logins, contexts and server mode work. Every command takes the global flags.

kapten auth list

List saved contexts.

kapten auth list [flags]
Flag Description
--json Output JSON
-o, --output string Output format: table or json

kapten auth login

Log in with the device authorization grant: open the page shown, on this machine or any other, and approve the code. Works over SSH. Credentials are saved in the OS keychain, or in an owner-only file when no keychain is available.

With KAPTEN_CLIENT_ID and KAPTEN_CLIENT_SECRET set, commands authenticate as that OAuth application instead and no login is needed.

kapten auth login [flags]
Flag Description
--api-url string Engine API URL (default $KAPTEN_API_URL, else https://api.kapten.io)
--issuer-url string Auth service URL (default $KAPTEN_ISSUER_URL, else https://auth.kapten.io)
--name string Name for a new context (default: the organization’s slug)
--no-browser Do not open a browser

Examples:

kapten login
kapten login --no-browser
kapten login --name staging --issuer-url https://auth-staging.kapten.io --api-url https://api-staging.kapten.io

kapten auth logout

Remove saved credentials.

kapten auth logout [context] [flags]
Flag Description
--all Log out of every context

kapten auth use

Select the active context.

kapten auth use <context>

kapten auth whoami

Show who commands run as.

kapten auth whoami [flags]
Flag Description
--json Output JSON

Was this page helpful?