A Go CLI for integrating with the RiskOS platform. It covers authentication, use-case discovery, integration guide generation, webhook management, and sandbox test execution.
make build # produces build/riskos
make cross # builds for darwin/linux/windowsRequires Go 1.22+.
Two separate Bearer tokens are needed:
| Key | Env var | Used for |
|---|---|---|
| CLI/MCP key | RISKOS_API_KEY |
All /api/mcp/* endpoints |
| Evaluation key | RISKOS_EVAL_KEY |
/api/evaluation (test-case runs) |
Credentials are stored securely in the OS keychain (macOS Keychain, GNOME Keyring, Windows Credential Manager) via go-keyring.
On systems without keychain support (CI, containers, headless servers), use environment variables directly — no login needed.
riskos auth login # interactive — prompts for CLI/MCP key and optional Eval key
riskos auth status # show current auth status and credential source
riskos auth logout # remove credentials from keychainLogin flow:
- Prompts for CLI/MCP API key (echo suppressed)
- Optionally prompts for Evaluation API key
- Verifies against the RiskOS API
- Stores in OS keychain on success
riskos usecase list # list configured use casesriskos workflow list consumer_onboarding # list workflows for a use caseriskos asset guide consumer_onboarding ./guide.md # integration guide (Markdown)
riskos asset openapi ./openapi.json # RiskOS API OpenAPI spec
riskos asset webhook-spec ./webhooks.json # Webhooks OpenAPI spec
riskos asset testcases consumer_onboarding ./testcases.json # test case JSONriskos webhook events # list event names
riskos webhook list # list configured webhooks
riskos webhook create --name my-hook --url https://... \
--use-case consumer_onboarding \
--workflow-events evaluation_completed \
--auth-scheme BEARER_TOKEN --bearer-token-file ./token.txt
riskos webhook update --name my-hook --url https://... --use-case consumer_onboarding
riskos webhook simulate --target http://localhost:3000/webhooks/riskosriskos testcase list consumer_onboarding # list test cases for a use case
riskos testcase describe consumer_onboarding Watchlist_Hit_Reject # show request payload
riskos testcase run Valid_Consumer_Accept # post to sandbox evaluation API| Variable | Description |
|---|---|
RISKOS_API_KEY |
CLI/MCP Bearer token (overrides keychain credentials) |
RISKOS_EVAL_KEY |
Evaluation API Bearer token (overrides keychain credentials) |
RISKOS_BASE_URL |
API base URL (overrides keychain; overridden by --base-url flag) |
RISKOS_QUIET |
Set to 1 to suppress informational output |
NO_COLOR |
Disable colour output |
CI / headless usage: Skip auth login entirely and set RISKOS_API_KEY (and optionally RISKOS_EVAL_KEY) as environment variables. All commands work without the keychain.
| Flag | Description |
|---|---|
--base-url <url> |
RiskOS API base URL (default: https://riskos.sandbox.socure.com). Use https://riskos.socure.com for production. |
--debug |
Print HTTP request/response details |
-o, --output |
Output format: plain or json |
-q, --quiet |
Suppress informational output |