Skip to content
Connect an agent

Use the CLI

Environment variables

Every environment variable the command line reads, and the ones it ignores. A flag on the command line always wins over a variable.

TL;DR

QuestionAnswer
Do I need to set anything?No. Every command runs with no variable set.
Which variable do I set most?PLOTWORK_CONFIG, to name a settings file, and PLOTWORK_ORG with PLOTWORK_API_KEY to check against an organisation's saved rules.
Is a key ever printed?No. PLOTWORK_API_KEY is sent only to read the rules and never appears in the output or a report.
Do PLOTWORK_USAGE and DO_NOT_TRACK matter?Not here. The command line counts nothing and sends nothing whatever they say. They control the local MCP server.

The variables it reads

VariableRead byWhat it does
PLOTWORK_CONFIGsync, validate, check, render, outline, generate, publish, embedThe settings file to read when --config is not given, instead of looking for plotwork.config.json or .plotwork/config.json.
PLOTWORK_ORGcheck, sync, validate, render, outline, generateThe organisation whose saved style rules to check against when --org is not given; with a key, sync, validate, render, outline and generate also read its legend choice and diagram style (else those of brand.organization of the settings), and sync, render and generate write them into the settings file's defaults.
PLOTWORK_API_KEYcheck, publish, board, sync, validate, render, outline, generateAn API key: for check, of the organisation whose rules are read; for sync, validate, render, outline and generate, of the organisation whose legend choice and diagram style are read (each part it chose is written over the settings file's, and a required legend is drawn whatever a header says); for publish, the key the diagrams are saved with; for the board commands, an organisation key with the boards scope. Never printed.
PLOTWORK_API_URLcheck, publish, boardThe API the rules are read from, diagrams are published to, and boards are reached through, instead of https://api.plotwork.dev.
ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKENboardRead only to tell a GitHub Actions job with id-token: write and no key why it cannot reach a board: a trusted publisher never does, so the board commands need an organisation key from a secret.
PLOTWORK_VENDOR_ICONSsync, render, export, generateoff draws no vendor artwork in this run: a product icon becomes a plain shape.
GITHUB_REPOSITORY, GITHUB_SHA, GITHUB_REF, GITHUB_RUN_ID, GITHUB_SERVER_URL, GITHUB_EVENT_NAMEgenerateRead only to name the run in a json report, when GitHub Actions sets them.

The variables it ignores

VariableWhy
PLOTWORK_USAGETurns on the local MCP server's opt-in usage counts. The command line keeps no counts, so there is nothing to turn on. See Usage counts and sharing.
DO_NOT_TRACKStops the local MCP server sharing its totals. The command line shares nothing.
PLOTWORK_API_URL outside checkOnly check --org talks to the API. read fetches a hosted link from the address you give it.
NO_COLOR, FORCE_COLORThe output has no colour to turn off.

Set them in CI

Put a key in your CI system's secret store and pass it to the one step that needs it:

yaml
- run: npx -y @buun_group/plotwork@0.10.0 check --org acme --format github "**/*.md"  env:    PLOTWORK_API_KEY: ${{ secrets.PLOTWORK_API_KEY }}

Use an API key of the organisation, created in the organisation's keys in the portal (opens in a new tab), so the check keeps working when the person who set it up leaves. Saving rules in an organisation is part of Pro; see Repository settings.

See also

DocWhy
ConfigurationHow the settings file is found
Repository settingsSharing rules across repositories with an organisation
Privacy policyWhat Plotwork keeps, and what it never receives