sume login opens the wrong host: SUME_APP_BASE_URL and its defaults
sume login picks its approval host from SUME_APP_BASE_URL, else from the API base URL. The defaults, and how to fix a wrong host.

sume login finds its approval page from SUME_APP_BASE_URL. If you leave that variable unset, the CLI chooses a default from the API base URL: https://app.sume.com for the production API, and the origin of SUME_API_BASE_URL for any other API. So when sume login opens a host you did not expect, check these two variables first.
This matters for anyone with a second environment. A shell that exports a development SUME_API_BASE_URL and then runs sume login will not be sent to the production app, and the key it stores will belong to whichever host approved it.
The rule, from the configuration docs
The CLI configuration page lists five environment variables. Only one of them decides where login happens, and it has two defaults, depending on the API. The table restates that page as it read on 2026-10-10.
The point of the split is that a production user needs no setting at all, while a user of another API gets a default that follows the API they configured.
| Variable | What it sets | Default |
|---|---|---|
| SUME_API_KEY | Developer API key | none |
| SUME_API_BASE_URL | API base URL | https://api.sume.com/v1 |
| SUME_API_AUTH_MODE | x-api-key or bearer | x-api-key |
| SUME_APP_BASE_URL | App base URL that sume login uses | https://app.sume.com for the production API, else the origin of SUME_API_BASE_URL |
| SUME_CONFIG_DIR | Local config directory | ~/.sume-com |
What to do when login lands on the wrong host
Work from the cause. Print the variables that the CLI will see, then decide which one is wrong. A leftover export from an old session is the usual culprit, and it is invisible until you list the environment. Shell profiles, direnv files and CI templates are the common places such a value hides, so check those after the live environment.
Once the variables are right, run the login again. The CLI waits for approval and then stores a CLI-scoped API key in the local config.
- Run
env | grep SUME_and read every value. - If
SUME_API_BASE_URLpoints at a non-production API, login will follow that origin unlessSUME_APP_BASE_URLis set. - If you want production, unset
SUME_API_BASE_URLandSUME_APP_BASE_URL, then runsume login. - If you want another app host with the production API, set
SUME_APP_BASE_URLto that origin explicitly.
A worked example
The commands below point the CLI at the development API and let the app host follow it. They use --no-browser, which the authentication page describes as printing the approval URL without opening a browser, so the sample also suits a remote terminal.
Read the printed URL before you approve it. It should be on the host you meant. If it is not, stop, fix the variables, and run the command again. Then run sume auth status once the approval is done, to confirm the CLI now holds a key. Nothing in this flow needs a browser on the machine that runs the CLI, so it works over SSH.
# Point the CLI at a non-production API and say where login approves
export SUME_API_BASE_URL="https://api.dev.sume.com/v1"
unset SUME_APP_BASE_URL # default: origin of SUME_API_BASE_URL
sume login --no-browser # prints the approval URL
sume auth statusKeep environments apart
The key from a login lives in ~/.sume-com/config.json, so two environments on one machine share one file unless you separate them. SUME_CONFIG_DIR overrides the directory, and the configuration docs mention it for tests and isolated environments. Give each environment its own directory and the keys stop overwriting each other. A small shell function per environment that exports the base URLs and the config directory together keeps the three variables from drifting apart, and it makes the active environment obvious when you read your own history.
For automation, skip login. A CI job should use SUME_API_KEY from a secret store, as the CLI authentication docs describe, and never an approval flow. For a readiness check that makes no API call, sume doctor --agent --json examines the local state, and the related post on doctor as a CI preflight covers it.
Sources
Related posts
More in Developers
- The agent field in Sume MCP results: next_step and poll_after
Sume's hosted MCP adds an agent object to tool results with next_step, poll_after_seconds, adjustments and recovery. What each field means and when it is null.
- Sume SDK function name for an endpoint: the camelCase operationId
GET /v1/catalog is listPublicApiCapabilities in @sume-com/sdk. Map any Sume route to its generated function from the OpenAPI operationId, with a table.
- Sume STT words[] cap: what words_truncated and words_total mean
Sume STT returns word timings capped at 20,000 entries and sets words_truncated and words_total when it hits the cap. A 600-second job stays far below it.
- POST /v1/trending-research: Reels and TikTok niche search over REST
One call returns up to 24 ranked public short videos for a niche from Instagram and TikTok at $0.10 per accepted search. Fields, limits and a Python example.
Written by Sume