CLI
stx login
Authenticate with Syntext. Credentials are stored locally and used by commands that talk to the Syntext API (stx deploy, stx build, stx projects, stx connect).
Usage
stx login [options]
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--token <token> |
string | API token (skips interactive login) | |
--api-url <url> |
string | https://api.syntext.dev |
Custom API URL (self-hosted) |
Interactive Login (Recommended)
stx login
Starts a device flow: your browser opens to a verification page, you approve the request, and the CLI picks up the session automatically.
Syntext CLI Login
Opening browser to complete login...
If the browser doesn't open, visit:
https://syntext.dev/device?code=XXXX-XXXX
✔ Authenticated as Jane Doe (jane@example.com)
Token-Based Login (CI / Headless)
For CI pipelines or machines without a browser:
- Go to syntext.dev/settings/tokens
- Create a new CLI token
- Authenticate non-interactively:
stx login --token stx_xxxxxxxxxxxx
The token is validated against the API before it's saved.
In CI you can also skip stx login entirely and set the SYNTEXT_API_KEY environment variable — see CI/CD guide.
Logging Out
Remove stored credentials at any time:
stx logout
Related
- stx connect — link local docs to a project
- stx projects — manage projects from the CLI
- CI/CD — deploying from pipelines
Was this page helpful?