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.

  1. Install the CLI for your platform. See Install.

  2. Authenticate with your API key:

    riskos auth login
  3. Verify the CLI is configured:

    riskos auth status
  4. 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

These steps cover macOS and Linux.

  1. Clone the repository and build the CLI:
   git clone https://github.com/socure-inc/riskos-cli.git
   cd riskos-cli
   make build

The build produces the binary at build/riskos.

  1. Move the binary onto your PATH:
   sudo mv build/riskos /usr/local/bin/riskos
  1. 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/riskos

Authenticate

The CLI uses two separate Bearer tokens. Create both in the RiskOS™ Dashboard under Developer Workbench > API & SDK Keys.

KeyEnvironment variableUsed for
CLI/MCP keyRISKOS_API_KEYAccount, asset, and webhook commands.
Evaluation API keyRISKOS_EVAL_KEYtestcase 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:

  1. Prompt for your CLI/MCP API key. Input is hidden as you type.
  2. Prompt for your Evaluation API key (optional, Enter to skip). Press Enter to skip it if you don't run test cases.
  3. Verify the keys against the RiskOS™ API.
  4. Store the keys in the OS keychain on success — macOS Keychain, GNOME Keyring, or Windows Credential Manager.
riskos auth login

The 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 status

Example output:

✔  Authenticated
   Source            keyring
   Namespace         acc-0pILroyxbW
   Base URL          https://riskos.sandbox.socure.com
   Eval key          ✔ set

Log out

Remove stored credentials from the keychain — for example, on a shared or decommissioned machine:

riskos auth logout

CI 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 list

Environment 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.4

Then 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 list

Example output:

consumer_onboarding
business_onboarding
login_authentication

Seeing 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 list

Browse workflows for a use case

Pass the use-case identifier as an argument:

riskos workflow list consumer_onboarding
📘

Note:

workflow list returns 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.md

Download 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 spec

Download test-case payloads

Export the request payloads for a use case's sandbox test cases:

riskos asset testcases consumer_onboarding ./testcases.json

Run 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 Sandbox
📘

Note:

Test cases run against the Sandbox environment only. Keep the default base URL when running testcase commands. Replace <persona_name> with one of the names returned by testcase list for describe — these are specific to your account. testcase run uses fixed test-case names (see riskos testcase run --help for 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/riskos

To 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.

FlagDescription
--base-url <url>RiskOS™ API base URL. Defaults to https://riskos.sandbox.socure.com. Use https://riskos.socure.com for Production.
--debugPrint HTTP request and response details.
-o, --outputOutput format: plain or json.
-q, --quietSuppress informational output.

Use -o json for machine-readable output in scripts:

riskos usecase list -o json

Environment variables

VariableDescription
RISKOS_API_KEYCLI/MCP Bearer token. Overrides keychain credentials.
RISKOS_EVAL_KEYEvaluation API Bearer token. Overrides keychain credentials.
RISKOS_BASE_URLAPI base URL. Overrides keychain; overridden by the --base-url flag.
RISKOS_QUIETSet to 1 to suppress informational output.
NO_COLORSet 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.

SymptomLikely causeResolution
command not found: riskosThe 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 directoryA 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 unverifiedThe downloaded binary carries the quarantine flag.Run xattr -d com.apple.quarantine /usr/local/bin/riskos.
401 Unauthorized, or the CLI reports an invalid tokenThe 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 errorThe Evaluation key is not set.Set RISKOS_EVAL_KEY, or supply it during riskos auth login.
Commands hit the wrong environmentThe 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 login on 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.
Separate environments
  • Use the default Sandbox base URL for testing and integration.
    • Switch to https://riskos.socure.com only for Production traffic.
    • Use distinct keys for Sandbox and Production, and revoke unused keys in Developer Workbench > API & SDK Keys.
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 logout to 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 riskos CLI installed and on your PATH. See Install.
  • Authenticated via riskos auth login (or environment variables in CI). An Evaluation API key is required if you want the agent to run testcase 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


Did this page help you?