RiskWrenv0.10.1
GitHub

Command reference

Every riskwren command. This page is written from the program itself, so it always matches the version it ships with. Run commands with uv run riskwren … from the project directory.

Options that come before the command apply to all of them:

riskwren [-h] [--version] [-c FILE] [-v | -q] COMMAND ...

Commands#

CommandWhat it does
riskwren initSet up a new installation
riskwren serveRun the web server
riskwren demoBuild a fictional organization to explore
riskwren dbLook after the database schema
riskwren usersManage accounts from the command line
riskwren verifyCheck that the history has not been altered
riskwren check-dossierCheck that a dossier is whole and unchanged
riskwren frameworksSee and load what the organization is held to
riskwren programMove the program between installations
riskwren backupBack the whole installation up to one file
riskwren restoreRestore a backup into an empty database
riskwren toolsServe tools to an assistant, over standard input and output
riskwren doctorCheck that this installation is healthy
riskwren jobsSee scheduled work, or run it now
riskwren mailSend waiting email, or test the mail settings

riskwren init#

Write a configuration file if there is none, create the data home, create or upgrade the database, and create the first administrator if there is none. Safe to run again.

OptionMeaning
--forceoverwrite an existing configuration file
--admin-email EMAILcreate the first administrator with this address
--admin-name NAMEthe first administrator's name
--password-stdinread the password from standard input instead of asking
--program KINDthe program to start from: research-institute (the default), academic-medical-center, university, or nonprofit

riskwren serve#

Run RiskWren's web server. It refuses to start on a database whose schema is behind; run riskwren db upgrade first.

OptionMeaning
--hostaddress to listen on (default: from the configuration)
--port PORTport to listen on (default: from the configuration)
--workers WORKERSserver processes (default: from the configuration)
--reloadrestart when the code changes (development)
--demo-on-networklet a demo organization listen beyond this machine (anyone who reaches it can sign in as its sample people)

riskwren demo#

Build the Northmere Institute for Health Research, a fictional organization with two years of history, in its own directory. Everything in it is made by the same code the app uses. Start it with the command it prints.

OptionMeaning
PATHwhere to build it (default: ./demo)
--seed SEEDa different number gives a different Northmere
--port PORTthe port its server will use (default: 8020)
--forcerebuild a demo that is already there

riskwren db#

Look after the database schema.

riskwren db upgrade#

Apply any migrations the database has not had, and add what is new in the default program and the starter libraries without changing what is there. Back up first, with riskwren backup: an upgrade cannot be undone except by restoring.

riskwren db current#

Show which migration the database is at, and which this version expects. Exits with 1 when they differ.

riskwren users#

Manage accounts from the command line: for setting up, and for getting back in when nobody can sign in. Everyday account management is in the app, under Admin. Changes made here are recorded in the history as made at the command line.

riskwren users add#

Add an account. It asks for a password unless --password-stdin or --invite is given.

OptionMeaning
EMAILthe email address the person signs in with
--namethe person's name
--titletheir job title
--role ROLEa role: admin, manager, assessor, auditor, steward=unit:CODE, or leader=unit:CODE,limit:RATING; manager and assessor may also take unit:CODE (may be repeated)
--unit CODEa unit they work in, by code (may be repeated)
--password-stdinread the password from standard input instead of asking
--inviteadd them without a password: they can be named on records now, and sign in once they are given a password or use single sign-on

riskwren users list#

List every account with its status and roles.

riskwren users disable#

Stop an account signing in and end its sessions. Its history is kept, and what the person alone answered for passes to the steward of its unit until someone is named for good. The last active administrator cannot be disabled.

OptionMeaning
EMAILthe account's email address

riskwren users enable#

Let a disabled account sign in again.

OptionMeaning
EMAILthe account's email address

riskwren users reset-password#

Give an account a new password and end its sessions.

OptionMeaning
EMAILthe account's email address
--password-stdinread the password from standard input instead of asking

riskwren users roles#

Show an account's roles, or with --set replace the roles granted in RiskWren. Roles mapped from an identity provider are left alone. The last active administrator cannot lose that role.

OptionMeaning
EMAILthe account's email address
--set ROLEa role: admin, manager, assessor, auditor, steward=unit:CODE, or leader=unit:CODE,limit:RATING; manager and assessor may also take unit:CODE (may be repeated); with none, removes every role

riskwren verify#

Recompute the hash chain over every event in the history and report the first one that does not hold, then check every published version of a document, and every leadership report, against the fingerprint the history took when it was published or issued. Exits with 1 if any does not hold.

riskwren check-dossier#

Check a dossier taken from RiskWren: every file its manifest lists is there with the size and SHA-256 it lists, nothing else is, and the manifest's fingerprint is its own. Needs no database. Exits with 1 if it does not hold.

OptionMeaning
FILEthe dossier's ZIP file

riskwren frameworks#

A framework is a source of requirements: a public standard, a regulation, an agreement's terms. Four public ones ship with RiskWren and are loaded at installation. Others are loaded from a pack file, or entered in the app.

riskwren frameworks list#

List every framework.

riskwren frameworks load#

Load a framework from a pack file, or the built-in ones that are missing. A pack is checked whole first and refused whole if anything is wrong.

OptionMeaning
FILEthe pack to load, or the key of one that ships to be loaded on request, such as hipaa-breach, nist-privacy, nist-800-53-r4, or iso-27001
--builtinload the built-in frameworks not yet here, and the publishers' mappings for those that are
--dry-runcheck the pack, and load nothing

riskwren frameworks show#

Show a framework's publisher, version, license, and source.

OptionMeaning
KEYthe framework's key, such as nist-csf

riskwren frameworks text#

For a framework that ships as its codes alone, such as iso-27001, load the titles and text from a copy your organization holds a license to: a CSV file with the columns code, title, and text. The words stay in this installation and in its backups; no pack or export carries them. A row with an empty title and text takes that requirement's words away.

OptionMeaning
KEYthe framework's key, such as iso-27001
FILEthe CSV file of code, title, and text

riskwren program#

The program is everything a risk and compliance team configures: vocabularies, the risk categories and their appetite, the scoring method, cadences, and who may accept what. It lives in the database and moves as one file.

riskwren program export#

Write the whole program as one JSON document, to a file or to standard output.

OptionMeaning
--output, -o FILEwrite to this file

riskwren program import#

Load a program pack. The whole pack is checked first, and nothing is loaded unless all of it can be. A new scoring method is published as a new version; assessments already made keep the version they were made under, and every open risk is read again from what was loaded: its ratings, its standing, and its next review.

OptionMeaning
FILEthe pack to load, or the name of a starter program: research-institute, academic-medical-center, university, or nonprofit
--dry-runsay what would change, and change nothing

riskwren backup#

Write every table, every stored file, and a manifest of their fingerprints to one file, as of one moment, while the server goes on running. The file restores into SQLite or PostgreSQL. Keep it somewhere safe: it holds everything.

OptionMeaning
FILEthe file to write, which must not exist

riskwren restore#

Load a backup into an empty database and data home, then check every table, every file, and the history against it. To move between SQLite and PostgreSQL, back up from one and restore into the other. Use the same version of RiskWren that took the backup, then upgrade.

OptionMeaning
FILEthe backup to restore
--describeonly say what the backup holds

riskwren tools#

A Model Context Protocol server for an assistant on this computer. Each tool calls a RiskWren server's API with the token in RISKWREN_TOKEN, so the assistant sees only what the token may. The tools read, and draft risks, issues, and controls that a person then opens, changes, and saves in RiskWren.

OptionMeaning
--urlthe RiskWren server's address (or RISKWREN_URL)
--no-draftsoffer only the tools that read

riskwren doctor#

Check the configuration, the data home, the database and its schema, the history, single sign-on and email where they are set up, and scheduled work. Exits with 1 if anything must be fixed.

OptionMeaning
--productionalso check what matters before real people rely on it: the https address, the database, a recent backup, a second administrator, email, and that it is not a demo

riskwren jobs#

Scheduled work brings risks up to date with the calendar, sends reminders, sends email where that is set up, tells webhooks what has happened, takes the daily snapshot of the measures, and tidies RiskWren's own bookkeeping. The server does this by itself while it runs. These commands are for seeing how it is going, and for running it from a scheduled task where the server's own scheduler is turned off.

riskwren jobs run#

Run every job that is due and not paused. With a job's key (calendar, reminders, mail, webhooks, measures, tidy), run that one now whether or not it is due or paused. A job another process is running is left to it.

OptionMeaning
JOBone job to run now: calendar, reminders, mail, webhooks, measures, tidy

riskwren mail#

Email is optional. Where it is set up, the server sends it by itself while it runs. These commands are for testing the settings and for sending by hand.

riskwren mail run#

Queue notices and daily summaries, and send what is waiting. Exits with 1 if a message could not be sent.

riskwren mail test#

Send one message now to the account with this address, and say whether the mail server accepted it.

OptionMeaning
EMAILthe account to send it to
Describes RiskWren 0.10.1. Apache License 2.0. Screenshots show an invented organization; every person and record in them is fictional.