Install and Sign In
Install the Smoketest CLI and authenticate with browser login, email code, or an API key.
Run the guided onboarding test without installing globally:
npx @smoketest.sh/cli initThis signs you in, stores your local Smoketest profile, and then asks whether to install the CLI globally for bare smoketest and st commands.
If you skip the global install, verify the same npx-only setup with:
npx @smoketest.sh/cli auth whoamiIf you want to install globally up front instead:
npm install --global @smoketest.sh/cli
smoketest --help
st --helpThe examples below use smoketest for readability. If you did not install globally, replace smoketest with npx @smoketest.sh/cli.
For non-interactive setup with an existing API key, opt into the same global install step explicitly:
npx @smoketest.sh/cli init --api-key smkt_... --installSign in interactively
With a global install:
smoketest auth loginWithout a global install:
npx @smoketest.sh/cli auth loginThe CLI asks how you want to authenticate:
| Method | Best for | What happens |
|---|---|---|
| Browser device code | Local development when you already use the web dashboard | The CLI gives you a link and code. You approve the login in the browser, then the CLI stores a scoped API key locally. |
| Email one-time code | Local development without an active browser session | The CLI sends a code to your email address. Enter the code in the terminal. |
| Paste API key | CI, servers, and advanced local setup | Paste an existing smkt_ key. |
You can skip the method picker:
smoketest auth login --browser
smoketest auth login --email [email protected]
smoketest auth login --api-key smkt_...For local use, avoid passing secrets in shell history. Run smoketest auth login and paste the key into the masked prompt instead.
Sign up from the CLI
smoketest auth signupSignup uses an email verification code:
smoketest auth signup --email [email protected] --name "Ada Lovelace"Check your inbox for the code, enter it in the CLI, and the CLI stores the resulting credential profile.
Check or clear your session
With a global install:
smoketest auth whoami
smoketest auth logoutWithout a global install:
npx @smoketest.sh/cli auth whoami
npx @smoketest.sh/cli auth logoutwhoami shows the authenticated user and workspace for the active profile.
Where credentials live
Smoketest stores API keys in the operating system keychain. Non-secret profile metadata, such as the active profile name and default project, lives in the local CLI config file.
The CLI also respects an API key from the environment:
SMOKETEST_API_KEY=smkt_... smoketest projects listThis is the preferred mode for CI.
API URL overrides
Production uses:
https://api.smoketest.shFor local development or private deployments:
SMOKETEST_API_URL=http://localhost:3001 smoketest projects list
smoketest projects list --api-url http://localhost:3001Non-HTTPS API URLs are allowed for localhost. For other trusted non-production URLs, pass --allow-insecure-api-url or set SMOKETEST_ALLOW_INSECURE_API_URL=1.