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.
damdit-cli help # every command and variabledamdit-cli help audit # one commandOutput
Section titled “Output”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.
Projects
Section titled “Projects”damdit-cli project create --name Example --production https://example.com/damdit-cli projectsdamdit-cli settings Example --pagespeed onproject createtakes--production,--stagingand--localaddresses and--defaultfor the one audits use. The address you give is your approval: the project can be audited at once.settingschanges 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-websiteto keep its history or--new-websiteto 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:
damdit-cli project delete Example --yesWithout --yes, Damdit CLI only lists what would be deleted. A project can’t be deleted while it is being audited.
Audits
Section titled “Audits”damdit-cli audit Example # waits and prints the new audit's summarydamdit-cli audit Example --target staging # another address of the projectdamdit-cli audit Example Northwind # several projects, one after anotherdamdit-cli audit --all # every projectauditruns in the foreground and prints progress on stderr. Ctrl+C stops it. Whiledamdit-cli serveruns, Ctrl+C ends only the command, and the audit goes on inserve.--detachreturns at once and needsdamdit-cli serve. Without it, the command ends with exit code 3 andserve_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 withci audit.- One audit runs at a time.
Read the results
Section titled “Read the results”damdit-cli summary Example --format textdamdit-cli issues Example --severity highdamdit-cli compare ExampleStart 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.
Reports
Section titled “Reports”damdit-cli report Example --audience client --file-format pdf --out client.pdfdamdit-cli reports Example--audienceisclient(the default),developerorai.--file-formatispdf(the default),markdownorhtml; an AI report isjson.- Reports are kept in Damdit CLI’s data volume.
--outalso copies the file to your computer. It writes a new file; if the file exists, Damdit CLI refuses unless you add--force. reportslists the reports of a project or of one audit.damdit-cli report delete <reportId> --yesdeletes 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.
Check a website on your computer
Section titled “Check a website on your computer”damdit-cli check http://localhost:3000 --pages 20Audits 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.
Files Damdit CLI can reach
Section titled “Files Damdit CLI can reach”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.
Exit codes
Section titled “Exit codes”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. |