Install
compliance is the command-line tool for Compliance. Its commands work with the Compliance REST API. It suits people who script Compliance from a terminal, and Agents that run shell commands.
On Linux and macOS, run:
curl -LsSf https://demo.mvdm.io/compliance/cli/install.sh | sh
On Windows, run this in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://demo.mvdm.io/compliance/cli/install.ps1 | iex"
The CLI never updates itself. To upgrade, run the same install line again. compliance --version shows the build you have.
Sign in on your own computer
compliance login
login opens your browser at Auth, the mvdm.io sign-in service. Sign in, and allow the CLI on the consent page. The consent page warns that the CLI gets all your power and asks which Account it starts in. Then go back to the terminal.
The sign-in works in Compliance only; a Personal token (see below) works in every mvdm.io app that offers API & Agent Access. The CLI renews its sign-in by itself. When the sign-in has ended, commands fail with not-signed-in, and you run compliance login again.
To end the sign-in everywhere and forget it, run:
compliance logout
Sign in on a machine without a browser
On a server over SSH, use a device code:
compliance login --device
The CLI prints a link and a code. Open the link on any device, such as your phone, and sign in there. The CLI waits until you have. compliance login falls back to the device code on its own when it cannot open a browser.
Use a Personal token on a server or in CI
For unattended jobs, create a Personal token at API & Agent Access, and put it in the COMPLIANCE_TOKEN environment variable. The CLI never creates tokens itself.
export COMPLIANCE_TOKEN=<token>
COMPLIANCE_TOKEN always wins over a stored sign-in, and compliance logout leaves it alone. A Personal token works in every mvdm.io app that offers API & Agent Access, so one token also serves scripts that use other apps.
Who you are and where you work
compliance status
status shows who you are, which credential is in use, and the Account your commands land in.
compliance accounts list compliance accounts switch
accounts list shows the Accounts you belong to. accounts switch changes the Account your commands land in.
Commands come from the API
Every REST operation is a command. The CLI builds its commands from the host's OpenAPI document when it runs, so a new operation shows up without a new CLI release. That is why this guide lists no commands. compliance --help is the reference:
compliance --help
It lists every group of Compliance commands. Add --help to a group, or to a command in a group, to see its actions and arguments. A command looks like compliance <register> <action>.
The Course library has commands too. compliance course-library list lists the library courses, compliance course-library get reads one with its Lessons, and compliance training-courses add-from-library adds one to the Account by its slug. The Quiz is taken on the Task page, never through the CLI.
A Training Course covers Requirements like the other registers. compliance training-courses link-requirements replaces the Requirements a course covers, and a Requirement read lists its Training Courses under coverage.trainingCourses.
Output and exit codes
Every command prints JSON on stdout. Errors go to stderr as JSON: the API's error as it came, or a short error of the CLI's own. A script reads stdout, and checks the exit code:
| Exit code | Meaning |
|---|---|
| 0 | Success. |
| 1 | Error. Read stderr. |
| 2 | Usage mistake. Fix the command line. |
| 3 | Browser handoff. A person must finish the act in the browser. |
Exit code 3 means a Browser handoff. Some acts need a person in the browser, such as anything that costs money or accepting the Legal terms. stdout then holds a handoffUrl. Show that link to your person. The CLI never opens a browser for it, and if nobody opens the link, nothing happens.
compliance license get reads the License and the Assistant allowance, for every member. compliance license buy-allowance-pack and compliance license update-auto-topup hand off to the browser when they buy or raise spending; turning Auto-topup off and lowering its pack or limit run directly.
Over the per-User rate limit, the CLI waits the time the API asks and tries again, up to three times.
Another way in
If your Agent speaks MCP, it can connect to Compliance's MCP server at https://demo.mvdm.io/compliance/mcp instead. See the guides for each Agent and Any MCP client.