RiskOS™ CLI
Install and use the RiskOS™ CLI to authenticate, discover use cases, generate integration guides, manage webhooks, and run sandbox test cases from your terminal.
Overview
The RiskOS™ CLI is a command-line tool for working with your RiskOS™ account from the terminal. Use it to:
- Authenticate once and store credentials securely.
- Discover the use cases and workflows configured for your account.
- Download integration guides, OpenAPI specifications, and test-case payloads.
- List and simulate webhooks.
- Run sandbox test cases against the Evaluation API.
The CLI works both interactively on your workstation and non-interactively in CI pipelines and containers.
Quick start
Get from zero to your first command in under five minutes.
-
Install the CLI for your platform. See Install.
-
Authenticate with your API key:
riskos auth login -
Verify the CLI is configured:
riskos auth status -
List your use cases to confirm everything works end to end:
riskos usecase list
A list of use cases confirms that the CLI is installed, authenticated, and connected to your account. Each step appears in detail in the following sections.
Install
The RiskOS™ CLI is currently installed by building it from source. Pre-built release binaries are coming soon.
Prerequisites
- Go 1.22 or later
- Git
- Access to the socure-inc/riskos-cli repository
These steps cover macOS and Linux.
- Clone the repository and build the CLI:
git clone https://github.com/socure-inc/riskos-cli.git
cd riskos-cli
make buildThe build produces the binary at build/riskos.
- Move the binary onto your
PATH:
sudo mv build/riskos /usr/local/bin/riskos- Verify the installation:
riskos --version- To upgrade, pull the latest changes and repeat the build and move steps:
cd riskos-cli
git pull
make build
sudo mv build/riskos /usr/local/bin/riskos- To remove the CLI, run:
sudo rm /usr/local/bin/riskosAuthenticate
The CLI uses two separate Bearer tokens. Create both in the RiskOS™ Dashboard under Developer Workbench > API & SDK Keys.
| Key | Environment variable | Used for |
|---|---|---|
| CLI/MCP key | RISKOS_API_KEY | Account, asset, and webhook commands. |
| Evaluation API key | RISKOS_EVAL_KEY | testcase run (posts to the Evaluation API). |
You only need the Evaluation API key to run test cases. All other commands work with the CLI/MCP key alone.
Interactive login (recommended)
On a workstation with keychain support, run riskos auth login to authenticate. The CLI will:
- Prompt for your
CLI/MCP API key. Input is hidden as you type. - Prompt for your
Evaluation API key (optional, Enter to skip). Press Enter to skip it if you don't run test cases. - Verify the keys against the RiskOS™ API.
- Store the keys in the OS keychain on success — macOS Keychain, GNOME Keyring, or Windows Credential Manager.
riskos auth loginThe interactive prompts look like this:
$ riskos auth login
CLI/MCP API key:
Evaluation API key (optional, Enter to skip):Check your status
Confirm which credentials are active and where they come from:
riskos auth statusExample output:
✔ Authenticated
Source keyring
Namespace acc-0pILroyxbW
Base URL https://riskos.sandbox.socure.com
Eval key ✔ setLog out
Remove stored credentials from the keychain — for example, on a shared or decommissioned machine:
riskos auth logoutCI and headless environments
For CI runners, automation, Docker, and headless servers where no keychain is available, skip auth login and provide your keys as environment variables instead:
export RISKOS_API_KEY="YOUR_CLI_MCP_KEY"
export RISKOS_EVAL_KEY="YOUR_EVAL_KEY" # only needed for testcase run
riskos usecase listEnvironment variables take precedence over keychain credentials, so all commands work without the keychain.
Verify the installation
Confirm the binary is installed and on your PATH:
riskos --version
# → riskos version v1.0.4Then confirm you are authenticated with riskos auth status. If the version prints and the status shows Authenticated, you are ready to run commands.
Run your first command
List the use cases configured for your account:
riskos usecase listExample output:
consumer_onboarding
business_onboarding
login_authenticationSeeing your use cases confirms that the CLI is installed, authenticated, and connected to the correct account. If the command returns nothing or an error, see Troubleshooting.
Common tasks
Each task introduces the command you need. All commands run against the base URL described in Configuration, defaulting to Sandbox.
List your use cases
riskos usecase listBrowse workflows for a use case
Pass the use-case identifier as an argument:
riskos workflow list consumer_onboardingNote:
workflow listreturns every workflow version configured for the use case — draft and published alike. To confirm which workflow is live, check the RiskOS™ Dashboard.
Download an integration guide
Export a use-case integration guide as Markdown:
riskos asset guide consumer_onboarding ./guide.mdDownload API specifications
Export the RiskOS™ API and Webhooks OpenAPI specifications for client generation or validation:
riskos asset openapi ./openapi.json # RiskOS API OpenAPI spec
riskos asset webhook-spec ./webhooks.json # Webhooks OpenAPI specDownload test-case payloads
Export the request payloads for a use case's sandbox test cases:
riskos asset testcases consumer_onboarding ./testcases.jsonRun a sandbox test case
List the available sandbox personas for a use case, inspect a payload, then post a fixed test case to the Sandbox Evaluation API. testcase run requires the Evaluation key (RISKOS_EVAL_KEY).
list and describe are scoped to a use case and return persona names specific to your account. run posts one of a fixed set of global sandbox test cases and does not take a use-case argument.
riskos testcase list consumer_onboarding # list personas
riskos testcase describe consumer_onboarding <persona_name> # show payload
riskos testcase run Valid_Consumer_Accept # post to SandboxNote:
Test cases run against the Sandbox environment only. Keep the default base URL when running
testcasecommands. Replace<persona_name>with one of the names returned bytestcase listfordescribe— these are specific to your account.testcase runuses fixed test-case names (seeriskos testcase run --helpfor examples) and is not scoped to a use case.
Manage webhooks
List configured webhooks, view available event names, and simulate delivery to a local endpoint:
riskos webhook list # list configured webhooks
riskos webhook events # list available event names
riskos webhook simulate --target http://localhost:3000/webhooks/riskosTo create or update webhook endpoints from the CLI, see Set up webhooks.
Configuration
By default, the CLI targets the Sandbox environment (https://riskos.sandbox.socure.com). Point it at Production (https://riskos.socure.com) with the --base-url flag or the RISKOS_BASE_URL environment variable.
Global flags
These flags apply to every command.
| Flag | Description |
|---|---|
--base-url <url> | RiskOS™ API base URL. Defaults to https://riskos.sandbox.socure.com. Use https://riskos.socure.com for Production. |
--debug | Print HTTP request and response details. |
-o, --output | Output format: plain or json. |
-q, --quiet | Suppress informational output. |
Use -o json for machine-readable output in scripts:
riskos usecase list -o jsonEnvironment variables
| 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 the --base-url flag. |
RISKOS_QUIET | Set to 1 to suppress informational output. |
NO_COLOR | Set to any value to disable colored output. |
Troubleshooting
Use the following table to resolve common issues. To see the full HTTP exchange for any failing command, add the --debug flag.
| Symptom | Likely cause | Resolution |
|---|---|---|
command not found: riskos | The binary is not on your PATH. | Move the binary to a directory on your PATH, such as /usr/local/bin. |
riskos runs an unexpected program or changes directory | A shell alias is shadowing the installed binary. | Run type riskos and alias riskos to inspect it. Remove the conflicting alias so the installed executable runs. |
| macOS blocks the binary as unverified | The downloaded binary carries the quarantine flag. | Run xattr -d com.apple.quarantine /usr/local/bin/riskos. |
401 Unauthorized, or the CLI reports an invalid token | The API key is mistyped, inactive, or revoked. | Run riskos auth status to confirm the credential source, then re-run riskos auth login or reset the environment variables. |
testcase run fails with an authentication error | The Evaluation key is not set. | Set RISKOS_EVAL_KEY, or supply it during riskos auth login. |
| Commands hit the wrong environment | The base URL points to the wrong environment. | Set --base-url https://riskos.sandbox.socure.com for Sandbox or https://riskos.socure.com for Production. |
Security
Protect your API keys
- Never hard-code your API keys in source code, scripts, or documentation.
- Prefer
riskos auth loginon workstations so keys stay in the OS keychain rather than in shell history. - In CI, store keys as masked secrets and inject them as environment variables at runtime.
- Prefer
Separate environments
- Use the default Sandbox base URL for testing and integration.
- Switch to
https://riskos.socure.comonly for Production traffic. - Use distinct keys for Sandbox and Production, and revoke unused keys in Developer Workbench > API & SDK Keys.
- Switch to
Rotate and revoke keys
- Rotate keys on a regular schedule and whenever a workstation or CI environment changes hands.
- If a key is exposed, deactivate it immediately in the RiskOS™ Dashboard and generate a new one.
- Run
riskos auth logoutto clear credentials from a shared or decommissioned machine.
Use with an AI coding agent
The socure-inc/riskos-cli repository also includes an agent skill at skill/SKILL.md that guides a coding agent (such as Claude Code) through a complete RiskOS™ integration using the CLI — authenticating, discovering a live workflow, downloading the integration guide and OpenAPI spec, and validating the integration with sandbox test cases and simulated webhooks.
Prerequisites
- The
riskosCLI installed and on yourPATH. See Install. - Authenticated via
riskos auth login(or environment variables in CI). An Evaluation API key is required if you want the agent to runtestcase run.
Enable the skill
Download skill/SKILL.md from the repository and place it where your agent tooling discovers skills. Consult your agent tooling's own documentation for the equivalent location .
Next steps
- Set up your account and send your first request in Integrating with RiskOS™.
- Configure real-time notifications in Webhooks.
- Explore the RiskOS™ API Reference for endpoint details.
- Give AI development tools live access to the same account data with the RiskOS™ MCP Server — an optional companion to the CLI.
- Automate a full integration walkthrough with an AI coding agent — see Use with an AI coding agent.
Updated about 1 hour ago

