devbox auth to manage the local user credentials used by the Devbox CLI. Log in through a browser, inspect the stored credential, check it from automation, or remove it when you no longer need access.
Usage
devbox auth login
Authenticate with Namespace through a browser. The command prints a login URL, waits for you to authorize the request, and stores the resulting user credential in your operating system’s user configuration directory.
Use the
devbox login alias for a shorter command.Usage
Log in through the browser
Output
Options
boolean
default:"true"
Open the login URL in the default browser.Pass
--browser=false to prevent the CLI from opening a browser automatically. The command still prints the URL so you can open it manually.devbox auth logout
Remove the locally stored user credential and its cached token. This affects subsequent local CLI and SDK authentication that relies on that credential.
Use the
devbox logout alias for a shorter command.Usage
Log out
Output
devbox auth check
Print information about the locally stored user credential. The command displays the workspace identifier and, when present in the credential, its expiration time.
Use this command for interactive inspection. It exits successfully even when no valid local credential is found and prints Not logged in. instead. Use devbox auth check-login when a script needs the exit status to represent the result.
Usage
Check the current login
Output
Output
devbox auth check-login
Check the locally stored user credential and return a successful exit status when it is usable. The command produces no output on success, making it suitable for scripts and other automation.
It returns a non-zero exit status when the local credential is missing or invalid. For bearer credentials with an expiration time, it also fails when the credential is expired or expires within the requested duration.
Usage
Require 30 minutes of remaining validity
Options
duration
default:"5m"
Fail when a bearer credential expires within this duration.
Related topics
Authenticate with Namespace
Configure authentication for the TypeScript Devbox SDK.
Devboxes
Create your first Devbox.