Skip to content

Install and Sign In

Install the Smoketest CLI and authenticate with browser login, email code, or an API key.

View as Markdown

Run the guided onboarding test without installing globally:

Shell
npx @smoketest.sh/cli init

This 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:

Shell
npx @smoketest.sh/cli auth whoami

If you want to install globally up front instead:

Shell
npm install --global @smoketest.sh/cli
smoketest --help
st --help

The 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:

Shell
npx @smoketest.sh/cli init --api-key smkt_... --install

Sign in interactively

With a global install:

Shell
smoketest auth login

Without a global install:

Shell
npx @smoketest.sh/cli auth login

The CLI asks how you want to authenticate:

MethodBest forWhat happens
Browser device codeLocal development when you already use the web dashboardThe 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 codeLocal development without an active browser sessionThe CLI sends a code to your email address. Enter the code in the terminal.
Paste API keyCI, servers, and advanced local setupPaste an existing smkt_ key.

You can skip the method picker:

Shell
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

Shell
smoketest auth signup

Signup uses an email verification code:

Shell
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:

Shell
smoketest auth whoami
smoketest auth logout

Without a global install:

Shell
npx @smoketest.sh/cli auth whoami
npx @smoketest.sh/cli auth logout

whoami 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:

Shell
SMOKETEST_API_KEY=smkt_... smoketest projects list

This is the preferred mode for CI.

API URL overrides

Production uses:

Shell
https://api.smoketest.sh

For local development or private deployments:

Shell
SMOKETEST_API_URL=http://localhost:3001 smoketest projects list
smoketest projects list --api-url http://localhost:3001

Non-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.

On this page