CLI Command Reference
CLI Commands
Section titled “CLI Commands”This page summarizes the current public command surface of seamless-cli.
The npm package is named seamless-cli. The executable binary is named seamless.
Command Summary
Section titled “Command Summary”| Command | Purpose |
|---|---|
seamless init [project-name] | Scaffold a new self-hosted local Seamless Auth project |
seamless check | Validate generated project config, Docker, Compose, containers, and local health endpoints |
seamless bootstrap-admin [email] | Create the first admin bootstrap invite |
seamless verify [flags] | Run the cross-package auth conformance harness (api / adapter / react matrix) |
seamless profile <sub> | Manage named pointers to the instances the CLI targets |
seamless login [identifier] | Log in to the active profile’s instance with email OTP |
seamless whoami | Show the identity, profile, and instance URL behind the current session |
seamless logout [--all] | End the session and clear local tokens |
seamless sessions <sub> | List or revoke sessions for the logged-in user |
seamless config <sub> | Read and write instance system configuration (admin) |
seamless users <sub> | Admin user management (admin) |
seamless org <sub> | Admin organization and membership management (admin) |
seamless --help | Print usage |
seamless --version | Print the installed CLI version |
The init, check, bootstrap-admin, and verify commands are for building and testing a
self-hosted stack. The profile, login, whoami, logout, sessions, config, users, and
org commands act as an authenticated client against a running instance (managed or self-hosted).
Use npx seamless-cli ... when you do not have the package installed globally:
npx seamless-cli init my-appnpx seamless-cli checknpx seamless-cli bootstrap-admin admin@example.comseamless init my-appIf you omit the project name:
seamless initThe CLI uses the current directory. If the directory is not empty, the current source prints that an existing project was detected and exits; a full existing-project integration flow is not shipped yet.
What it does
Section titled “What it does”- prompts for frontend and backend choices
- prompts for an optional mobile app (Expo), or takes
--mobile=expoto skip the prompt - prompts for auth mode
- optionally includes the admin dashboard
- generates a working local stack
- writes
seamless.config.json - creates
docker-compose.yml
The mobile app lands in mobile/ next to the web and API projects, wired to the same API with
@seamless-auth/react-native. It is not part of the Docker stack: run it with
cd mobile && npm install && npx expo run:ios (or run:android). See
React Native SDK.
Current generated stack
Section titled “Current generated stack”Today the supported generated path is centered on:
- React for the frontend
- Express for the backend
- Seamless Auth API in Docker or local source mode
- optional admin dashboard in image or source mode
Shortcut behavior
Section titled “Shortcut behavior”This is valid:
seamless my-appIt is treated as:
seamless init my-appManaged init (planned)
Section titled “Managed init (planned)”A managed init flow, where seamless init connects a scaffolded app to your hosted managed
instance instead of hardwiring localhost.
Running seamless init when logged in will default to the managed path, adding --local will force the self-hosted stack.
at localhost.
Running seamless init while not logged in and in an non-empty directory will print ‘log in first’ and exit.
It hardwires the auth URL to
http://localhost:5312 and the API URL to http://localhost:3000 and generates tokens locally. It
does not read your logged-in profile or connect a scaffolded app to a hosted managed instance.
seamless checkUse this when you want to validate a generated project.
It checks:
seamless.config.json- configured web and API paths
- Docker availability
docker-compose.yml- expected running containers
- API health at
http://localhost:3000/ - auth health at
http://localhost:5312/health/status - admin availability at
http://localhost:5174
It does not currently check Terraform, AWS CLI, or deployment state.
bootstrap-admin
Section titled “bootstrap-admin”seamless bootstrap-admin admin@example.comThis creates the first admin bootstrap invite.
How it resolves the secret
Section titled “How it resolves the secret”The CLI attempts to resolve the bootstrap secret automatically from:
.envauth/.envdocker-compose.yml
If it cannot find the secret automatically, it prompts you for it.
API target
Section titled “API target”The CLI sends the invite request to:
{SEAMLESS_API_URL or http://localhost:3000}/auth/internal/bootstrap/admin-inviteSet SEAMLESS_API_URL when your generated API is not reachable at http://localhost:3000.
What happens next
Section titled “What happens next”After the invite is created:
- a registration URL may be printed
- the invited user completes registration with the invited email
- the resulting account receives admin access
This is for the initial admin bootstrap flow, not general role management.
verify
Section titled “verify”seamless verifyRuns a cross-package auth conformance harness. It stands up the ecosystem with Docker Compose
(Postgres, the auth API, the @seamless-auth/express adapter, and the React starter), then runs a
Playwright matrix across three layers and prints a flow x layer pass/fail grid alongside JUnit and
HTML reports.
- api verifies the auth API directly (Bearer / JSON).
- adapter verifies the
@seamless-auth/expresscookie path. - react drives the React starter in a real browser (Chromium), including passkeys via a virtual authenticator and OAuth via an in-process mock OIDC provider.
Covered flows include register, email and phone OTP, magic-link, passkey register and login, OAuth, TOTP, step-up, refresh, sessions, logout, organizations, admin bootstrap, and JWKS.
Modes and flags
Section titled “Modes and flags”seamless verify # test the published @seamless-auth/* packagesseamless verify --local # build the SDKs from local source (pre-publish contract test)| Flag | Effect |
|---|---|
--local | Build @seamless-auth/* from local source instead of published |
--api-only | Run only the api project (skip adapter and react) |
--no-react | Skip the browser layer |
--filter <grep> | Run only tests matching the grep |
--keep-up | Leave the Docker stack running after the run |
Requires Docker. The sibling repos are resolved relative to the CLI checkout and can be overridden
with SEAMLESS_API_DIR, SEAMLESS_SERVER_DIR, SEAMLESS_REACT_SDK_DIR (the React SDK), and
SEAMLESS_REACT_DIR (the starter app). A reusable GitHub workflow runs seamless verify --local on
ecosystem PRs so a change in one repo is tested against the others.
profile
Section titled “profile”Profiles are named pointers to the Seamless Auth instances the CLI targets. They are stored in
~/.config/seamless/config.json (respects XDG_CONFIG_HOME). The file holds only non-secret instance
and identity metadata, never tokens.
seamless profile listseamless profile add <name> --instance-url <url> [--identifier-type email|phone]seamless profile use <name>seamless profile remove <name>listshows configured profiles; the active one is marked with*.addcreates or updates a profile and prompts interactively if flags are omitted. Non-local URLs must behttps.usesets the active profile for later commands.removedeletes a profile and clears its keychain tokens.
Choose the active profile per command with --profile <name> or the SEAMLESS_PROFILE environment
variable.
seamless login [identifier] [--identifier <email>] [--profile <name>]Logs in to the active profile’s instance using email OTP. Prompts for the identifier (or pass it
positionally or with --identifier) and the emailed code, then stores the session in the OS keychain
(macOS Keychain, Windows Credential Manager, or Linux Secret Service). For headless use,
SEAMLESS_REFRESH_TOKEN is used directly when set.
whoami
Section titled “whoami”seamless whoami [--profile <name>]Shows the identity behind the active session (sub, email, roles), along with the profile name and
instance URL. Fails cleanly if you are not logged in.
logout
Section titled “logout”seamless logout [--all] [--profile <name>]Ends the current session on the instance and clears the local keychain tokens. --all revokes every
session for the user before clearing local tokens.
sessions
Section titled “sessions”seamless sessions listseamless sessions revoke <id>seamless sessions revoke --allLists active sessions for the logged-in user (session id, device or user agent, IP, and last-used
time, with the current session marked) and revokes them. Revoking the current session or --all
prompts for confirmation and then clears local tokens.
config
Section titled “config”Read and write the instance system configuration. Requires an admin role on the target instance.
seamless config get [key] [--json]seamless config set <key> <value>seamless config roles [--json]seamless config diff <file>seamless config apply <file> [--dry-run]set parses the value as JSON, falling back to a string (for example
seamless config set login_methods '["email_otp","passkey"]'). apply writes a local JSON config
file after a confirmation prompt.
Admin user management. Requires an admin role.
seamless users list [--limit <n>] [--offset <n>] [--json]seamless users delete <id>seamless users credentials <id> [--json]seamless users prepare-device-replacement <id> [--keep-sessions] [--keep-passkeys] [--keep-totp]prepare-device-replacement is admin-assisted account recovery and needs an elevated (stepped-up)
session.
Admin organization and membership management. Requires an admin role.
seamless org list [--json]seamless org create <name> [--slug <slug>]seamless org get <id> [--json]seamless org update <id> [--name <name>] [--slug <slug>]seamless org members list <orgId> [--json]seamless org members add <orgId> (--user <id> | --email <email>) [--roles a,b] [--scopes a,b]seamless org members update <orgId> <userId> [--roles a,b] [--scopes a,b]seamless org members remove <orgId> <userId>Removed Or Not Currently Shipped
Section titled “Removed Or Not Currently Shipped”The current ../seamless-cli source does not include these commands:
seamless deployseamless destroyseamless contribute
Help And Version
Section titled “Help And Version”If no command is provided, the CLI prints help.
seamless --helpseamless --version