Skip to content

Command line

Documentation checks for a build that has no browser.

The staleless command runs the checks that must work where there is no browser and no session: your CI, failing a build before broken documentation reaches a reader.

Terminal window
npx staleless --help
CommandWhat it answers
auditPoint it at a codebase: a score, and what is missing.
lintThe publish rules, over a checkout. No network.
checkWhat is wrong in a live workspace right now.
impactThese files changed; which pages describe them.
documentRead the code; say what documentation it would draft.

The instinct is staleless push: send my documentation to the host. That is not built and should not be.

You connect the GitHub App and point a project at your own repository and a folder inside it. From then on the repository is the content store, and a merge publishes. There is nothing to push, and a push command would be a second, competing way to change the same files.

CommandNetworkToken
auditNoNo
lintNoNo
impactNoNo
document --dryNoNo
checkYesYes

lint has no network at all, on purpose. The pull requests that most need checking come from forks, and a fork’s build has no secrets. A check that needed a credential would skip exactly where it matters.

--jsonflag

The same answer, for a pull request comment or a dashboard.

--strictflag

Count warnings as failures. Off by default: an error is a site that would be wrong, a warning is something to look at.

--advisoryflag

Report everything and never fail the build.

--fixflag

lint only. Rewrite what has a mechanical repair, then report what is left.

--debugflag

Say what is being asked of the network, on stderr.

CodeMeaning
0Ran, nothing to report.
1Ran, and found problems.
2Could not run, and running it again unchanged will not help.
3Could not run because the far side did not answer. Worth retrying.

The split between 2 and 3 is for your CI. A 3 is a retry; a 2 is a misconfiguration, and retrying it wastes a runner.

lint and impact compute over files, and their rules ship inside this one tool rather than as separate packages.

If they were versioned separately you could hold staleless and its rule packages at versions that disagree about what a dead link is. One artifact, one set of rules.