Appearance
sp auth
When developers and agents use this: Establish active authentication profiles, inspect current session details, or renew expired authorization tokens.
Synopsis
The sp auth command tree is the gatekeeper for accessing secure endpoints. In Enterprise/Self-Hosted deployments, authentication may be optional or bypassed. In the SaaS Cloud environment (https://api.softprobe.ai), a valid authentication token and target Tenant ID are strictly required.
Credentials are saved in your shared user configuration profile: ${XDG_CONFIG_HOME:-~/.config}/softprobe/config.jsonc
Subcommands
| Subcommand | Flags | Description |
|---|---|---|
login | --email, --code, --guest, --no-save, --tenant-id | Sign in and capture authentication credentials |
whoami | — | Decode and inspect the active session token and tenant settings |
refresh | --user, --no-save | Obtain a fresh JWT using existing session credentials |
Command Details & Flags
sp auth login
Authenticates your CLI client and configures your active profile.
bash
sp auth login [flags]Flags:
--email: Your registered email address.--code: The one-time verification code sent to your email.--tenant-id: Directly specify your target Tenant ID (bypasses the interactive prompt when logging in to the Cloud environment).--guest: Log in with a guest developer session (if permitted by server policy).--no-save: Perform the login exchange and output the credentials to standard output, but do not write them to your local configuration profile.
SaaS Interactive Login Flow:
If your active API endpoint points to https://api.softprobe.ai and you do not pass the --tenant-id flag, the CLI will interactively prompt you to specify your target organization:
text
Enter your Tenant ID: tenant-12345The CLI then writes both the JWT and the specified tenant_id to your active profile in config.jsonc.
Configuration Profile Example
When saved locally, your active profile configuration under ~/.config/softprobe/config.jsonc looks like this:
jsonc
{
"profiles": {
"default": {
"api_url": "https://api.softprobe.ai",
"token": "eyJhbGciOiJIUzI1NiIsIn...",
"tenant_id": "tenant-12345"
}
},
"active_profile": "default"
}Examples
Interactive login to SaaS Cloud:
bash
sp auth login --email developer@example.com --code 738192Scripted/Non-interactive login (CI/CD):
bash
sp auth login --email ci-runner@example.com --code 112233 --tenant-id tenant-12345 --jsonInspect the current session:
bash
sp auth whoami --jsonJSON Output:
json
{
"ok": true,
"command": "auth whoami",
"data": {
"userName": "developer@example.com",
"tenantId": "tenant-12345",
"expiresAt": "2026-05-24T12:00:00Z"
}
}REST API Mappings
The CLI routes these commands to the following backend control-plane endpoints:
| CLI Action | HTTP Method | REST Endpoint |
|---|---|---|
login (email verification) | POST | /api/login/verify |
login (guest access) | POST | /api/login/loginAsGuest |
refresh (token renewal) | GET | /api/login/refresh/{userName} |