Skip to content

Commands

damdit-cli answers the same commands as the app’s damdit command, with the same options, output and exit codes. This page covers the commands you use most and what is different in Damdit CLI.

Terminal window
damdit-cli help # every command and variable
damdit-cli help audit # one command

At a terminal, every command prints a short readable form. Through a pipe, into a file or to an AI tool it prints JSON, which --json asks for anywhere; --format text asks for the readable form anywhere. Errors are one JSON line on stderr with an error code, a message and an exit code.

<project> is a project’s name, address or ID.

Terminal window
damdit-cli project create --name Example --production https://example.com/
damdit-cli projects
damdit-cli settings Example --pagespeed on
  • project create takes --production, --staging and --local addresses and --default for the one audits use. The address you give is your approval: the project can be audited at once.
  • settings changes a project’s name, addresses, PageSpeed Insights, Webflow site, Search Console property, client name and description. When you change the address of a project that has audits, add --same-website to keep its history or --new-website to start a new project.
  • Keys aren’t set with settings. Damdit CLI reads them from the environment: see Keys and environment variables.

To delete a project with its audits, evidence, issue statuses, reports and schedule:

Terminal window
damdit-cli project delete Example --yes

Without --yes, Damdit CLI only lists what would be deleted. A project can’t be deleted while it is being audited.

Terminal window
damdit-cli audit Example # waits and prints the new audit's summary
damdit-cli audit Example --target staging # another address of the project
damdit-cli audit Example Northwind # several projects, one after another
damdit-cli audit --all # every project
  • audit runs in the foreground and prints progress on stderr. Ctrl+C stops it. While damdit-cli serve runs, Ctrl+C ends only the command, and the audit goes on in serve.
  • --detach returns at once and needs damdit-cli serve. Without it, the command ends with exit code 3 and serve_required.
  • damdit-cli audit https://example.com/ audits the project with that address. If there is none, Damdit CLI says how to create one, or how to audit the address once with ci audit.
  • One audit runs at a time.
Terminal window
damdit-cli summary Example --format text
damdit-cli issues Example --severity high
damdit-cli compare Example

Start with summary. issues, occurrences, finding, review, compare and history work as in the app’s command: see Read audits. set-status changes an issue’s status in Damdit, never the website.

Terminal window
damdit-cli report Example --audience client --file-format pdf --out client.pdf
damdit-cli reports Example
  • --audience is client (the default), developer or ai. --file-format is pdf (the default), markdown or html; an AI report is json.
  • Reports are kept in Damdit CLI’s data volume. --out also copies the file to your computer. It writes a new file; if the file exists, Damdit CLI refuses unless you add --force.
  • reports lists the reports of a project or of one audit.
  • damdit-cli report delete <reportId> --yes deletes one report. Without --yes, it only says what would be deleted.

damdit-cli export-data --out damdit-export.zip exports all of Damdit CLI’s data: projects, audit history, reports, findings and evidence, without keys.

Terminal window
damdit-cli check http://localhost:3000 --pages 20

Audits a website running on this computer once, as the app’s damdit check does. In Damdit CLI it works on Linux only, where the container shares the computer’s network, and not while damdit-cli serve runs. On a Mac, localhost inside Docker is the container itself, so nothing answers.

Each command runs in a new container that sees only Damdit CLI’s data volume. A command with --out also sees the folder of that file, at the same path. ci commands see the current folder. Other commands work from any folder.

With Colima or rootless Docker, an --out path outside the folders Docker shares may fail. A path in your home folder works.

The exit codes are the damdit command’s. Damdit CLI adds:

Code Error code Meaning
3 serve_required --detach needs damdit-cli serve
6 private_address The address is in a private network. See Private addresses.
6 licence_required No CI key in DAMDIT_CI_KEY
9 ci audit or ci run found what --fail-on asks to fail on. See Pipelines.