Skip to content

Keys and environment variables

Damdit CLI takes keys and passwords only from environment variables, never from options or files. It never prints, saves or returns their values. The launcher passes every DAMDIT_* variable you set into Docker by name, so the values don’t appear on a command line.

Variables are read when Damdit CLI starts. While damdit-cli serve runs, commands and AI agents go through it and use the variables serve started with; to change one, stop serve and start it again. Without serve, each command reads its own environment.

Variable What it does
DAMDIT_CI_KEY The licence: a CI key from damdit.com/account. Needed for every audit.
DAMDIT_PAGESPEED_KEY PageSpeed Insights. project create turns PageSpeed on while it is set; settings --pagespeed turns it on or off.
DAMDIT_WEBFLOW_TOKEN Webflow, for a project with a Webflow site (settings --webflow-site)
DAMDIT_GSC_CREDENTIALS Search Console: the JSON key of a Google service account that is a user of the property (settings --search-console)

When a key is missing, the audit’s line for that module names the variable to set.

Variable What it opens
DAMDIT_SITE_USERNAME and DAMDIT_SITE_PASSWORD HTTP Basic
DAMDIT_VERCEL_BYPASS Vercel Deployment Protection
DAMDIT_CF_ACCESS_CLIENT_ID and DAMDIT_CF_ACCESS_CLIENT_SECRET Cloudflare Access
DAMDIT_WEBFLOW_PASSWORD A Webflow site password
DAMDIT_SITE_ACCESS_FOR With more than one project: the project (name or host) the access is for

Set one kind at a time. Damdit CLI sends the access only to the host it was first used for. With more than one project and no DAMDIT_SITE_ACCESS_FOR, it withholds the access, and an audit of a locked website says to set it. Naming another host in DAMDIT_SITE_ACCESS_FOR moves the access there.

DAMDIT_CLI_ACCESS decides what commands and AI agents may do:

Level What it allows
read Reads saved audits. Starts no audit and changes nothing.
audit Also runs audits and checks, and cancels them. Changes nothing else.
full Also changes issue statuses, creates reports, exports data, and changes or deletes projects. The default.

The level of serve, or of the command that started Damdit CLI, is the most any command may do through it. A command with a lower level of its own gets the lower one, so DAMDIT_CLI_ACCESS=read damdit-cli mcp stays read-only next to a full serve. damdit-cli status shows the level as access.level.

Damdit CLI refuses a production or staging address that is, or resolves to, an address in a private network, such as 10.x, 192.168.x, 127.x, a link-local or a cloud metadata address. The check covers the audit’s requests, redirects included. The answer is private_address, exit code 6.

To audit a website in your private network, set DAMDIT_ALLOW_PRIVATE_ADDRESSES=1. --local addresses and damdit-cli check stay limited to this computer.

Variable What it does
DAMDIT_LANGUAGE The language pages are asked for, en-US by default
DAMDIT_REPORT_PREPARED_BY Prepared by in reports
DAMDIT_LOG json: serve’s log as JSON lines
DAMDIT_WEBFLOW_SITE, DAMDIT_GSC_PROPERTY The Webflow site and Search Console property of ci audit

Set these for the install command, not for damdit-cli:

Variable What it does
DAMDIT_CLI_VERSION A version, such as 27.0.0, instead of the newest of the major version
DAMDIT_CLI_BIN Where to put the launcher, ~/.local/bin by default
DAMDIT_CLI_VOLUME The Docker volume for projects and audits, damdit-cli-data by default
Terminal window
curl -fsSL https://download.damdit.com/cli/install.sh | DAMDIT_CLI_VERSION=27.0.0 sh