Skip to main content

SOAT CLI

The @soat/cli package is a command-line interface for the SOAT REST API. Every API operation is available as a sub-command, auto-generated from the same OpenAPI specs.

Installation

npm install -g @soat/cli
# or
pnpm add -g @soat/cli

Authentication

Before making API calls you must configure a profile with your server URL and token:

soat configure

You will be prompted for:

PromptDescription
Profile nameName for this profile (default if left blank)
Base URLURL of your SOAT server (e.g. http://localhost:5047)
TokenJWT session token or sk_-prefixed project key

Profiles are stored in ~/.soat/config.json.

Global Options

OptionDescription
-p, --profile <name>Use a named profile from ~/.soat/config.json
-V, --versionPrint the CLI version
-h, --helpDisplay help for any command

Environment Variables

Environment variables take precedence over stored profiles:

VariableDescription
SOAT_BASE_URLServer base URL — skips profile lookup entirely
SOAT_TOKENBearer token — skips profile lookup entirely
SOAT_PROFILEName of the profile to use when no --profile flag is passed

Available Commands

CommandDescription
configureAdd or update a profile in ~/.soat/config.json
list-commandsPrint all available API commands
any operationCall the corresponding REST API operation

See the Commands Reference for the complete list of API operations.