Use the Requestarium CLI with several accounts and servers

Most people end up with more than one Requestarium login: a work account and a personal one, the company's self-hosted server and Requestarium Cloud, or a local backend while developing. Signing out and in again every time you switch is slow, and easy to get wrong right before you run something against the wrong server. CLI profiles keep each login separate.

Save a second login

Your first login is the default profile. Add more with a name:

Terminal
requestarium login                                   # default: Requestarium Cloud
requestarium login --profile work --api-url https://requestarium.acme.internal/api
requestarium login --profile local --api-url http://127.0.0.1:8080

Each profile keeps its own API URL, token, default workspace and default environment. Tokens belong to one server, so sign in (or create the token) on the server the profile points at.

Switch

Terminal
requestarium profiles                 # * marks the one in use
requestarium profiles use work        # from now on
requestarium run-collection "Users API" --profile default   # just this once

Which profile a command uses, first match wins:

  1. --profile NAME on the command;
  2. REQUESTARIUM_PROFILE in the environment;
  3. the one chosen with profiles use;
  4. default.

Check where you are

Terminal
requestarium status

status shows the CLI version, the API URL, the first characters of the token in use, your workspaces, and the environments in each. Run it whenever you're not sure; it exits with code 1 if the server can't be reached or rejects the token.

Remove one, or all

Terminal
requestarium logout --profile local
requestarium logout --all

logout deletes the saved login from your machine. To also revoke the token, delete it in Settings ▸ API tokens on that server.

In CI, use variables instead

A CI job shouldn't depend on a saved profile. Pass the token and, for a self-hosted server, the URL:

.gitlab-ci.yml
api-tests:
  image: node:22
  variables:
    REQUESTARIUM_API_URL: https://requestarium.acme.internal/api
  script:
    - npx --yes @requestarium/cli run-collection "Users API" --env Staging --junit results.xml

with REQUESTARIUM_TOKEN stored as a masked CI variable. Environment variables override the saved login, so the same machine can serve several jobs for several servers.

The MCP server follows profiles too

requestarium mcp uses the same rules. To give an AI agent a specific account, set the profile in its configuration:

JSON
{
  "mcpServers": {
    "requestarium-work": {
      "command": "requestarium",
      "args": ["mcp"],
      "env": { "REQUESTARIUM_PROFILE": "work" }
    }
  }
}

Where logins are stored

~/.config/requestarium/config.json (%APPDATA%\requestarium\config.json on Windows), readable only by you. REQUESTARIUM_CONFIG points the CLI at another file.