CarolineDocs

Write the rules / The caroline command

The caroline command

Pull an installation's rules into a folder, edit them in your own editor, check them the way the console does, and publish through Caroline's own save path. Read the decision log and verify the ledger from the same command.

Install

One file, Python standard library only. It runs on macOS's own /usr/bin/python3 and on Linux, against Caroline 0.48.17 or later.

install -m 755 caroline ~/.local/bin/caroline

~/.local/bin must be on your PATH. In VS Code, install the Red Hat YAML extension when the folder recommends it.

Sign in

caroline login https://app.example.com

It asks your author name, then your passphrase (never echoed, never stored). A session lasts 8 hours. For a script, --passphrase-stdin reads the passphrase from standard input.

Pull

mkdir rules && cd rules && caroline pull
code .
policies/policy.yaml          the pack and the rules in order
policies/rules/<id>.yaml      one rule per file; a Rego rule also has <id>.rego
.caroline/                    the server, the revision pulled, the schema (git-ignored)
.vscode/                      settings, tasks, the recommended extension

Write a rule

caroline new contractors-read

Makes policies/rules/contractors-read.yaml from a template and lists it in policy.yaml. VS Code completes and checks the fields as you type.

Preview, test, impact

CommandGives
caroline previewCaroline's checks, the changes, and the past decisions that would flip
caroline testthe installation's tests, run on your copy
caroline impactwho gains access and who loses it

In VS Code the same commands are tasks (Terminal › Run Task › Caroline: Preview), and Caroline's problems land in the Problems panel on the rule's file. Nothing changes in Caroline until you publish.

Publish

caroline publish -m "Contractors may read documents"

The same checks as the console, a ledger record under your name, and the push to the engines. When someone published since your pull, the publish is refused as stale and your files are untouched: copy your edits aside, caroline pull --discard, put them back, preview again.

Caroline writes the files back in its own layout

The comment on top of each rule is generated from the rule; comments of your own are not kept. Notes belong in the rule's description.

Read decisions

For policy authors only: the log holds a year of subject and resource ids.

CommandGives
caroline decisionsthe last hour, oldest first
caroline decisions --since 24h --limit 500a duration back, or a time
caroline decisions --followdecisions as they arrive
caroline decisions --id IDone decision, every field

Verify and export the ledger

CommandGives
caroline ledger verifyrecomputes the chain; a break is named by file and line
caroline ledger export 2026-11-18one UTC day as NDJSON, what a SIEM ingests
caroline ledger export --allthe whole ledger as one zip, with its own offline check

Exit codes

CodeMeans
0done
1a check failed or a publish was refused
2Caroline cannot be reached, or sign in
3stale: pull first

--json on preview, test, impact and publish prints Caroline's answer as it came.

Not yet

A key for CI to publish with, a merge when two people changed the same folder, Git as the source of truth, an offline check, a VS Code extension.

Caroline DocsAuthZEN 1.0 · OPA