DocsCareConfigurationCommands and flags

Commands and flags

Every flag for status, get, and changelog, with short forms and environment variables.

care has three commands. status runs the checks, get fetches a config file, and changelog derives release notes. Bare care is care status with everything on. Every flag also reads from an environment variable, so a flag set once in the environment applies to every run.

A global --cwd sets the directory care operates in and applies to all commands.

status

Runs the configured checks against the current repo and renders their results. Passing no feature flag runs everything. The process exits non-zero when any check fails.

Feature selection

FlagShortEnvRuns
--version-control-vcCARE_STATUS_VERSION_CONTROLGit working-tree and upstream-sync state
--build-bCARE_STATUS_BUILDThe compile check
--lint-lCARE_STATUS_LINTThe linter
--dependencies-dCARE_STATUS_DEPENDENCIESThe dependency check
--runtime-rCARE_STATUS_RUNTIMEDeclared vs code vs dependency runtime versions
--docs-dcCARE_STATUS_DOCSDocumentation coverage
--tests-tCARE_STATUS_TESTSThe test run
--benchmarks-bnCARE_STATUS_BENCHMARKSThe benchmark run
--secrets-sCARE_STATUS_SECRETSThe secret scan
--vulnerabilities-vuCARE_STATUS_VULNERABILITIESThe vulnerability scan
--quality-qCARE_STATUS_QUALITYUmbrella for build, lint, dependencies, runtime, and docs
--security-seCARE_STATUS_SECURITYUmbrella for secrets and vulnerabilities

Run modes

FlagShortEnvEffect
--coverage-cCARE_STATUS_COVERAGECollect coverage when running tests (implies --tests)
--race-raCARE_STATUS_RACERun tests with -race
--fixCARE_STATUS_FIXApply auto-fixes before checking
--amend-aCARE_STATUS_AMENDRefresh only the working-tree state into the --output file, then exit

Output

FlagShortEnvEffect
--json-jCARE_JSONEmit the report as JSON to stdout
--output <file>-oCARE_OUTPUTWrite the JSON report to a file instead of stdout
--stdout-sCARE_STDOUTWith --output, also render the human report to stdout
--explain-xCARE_EXPLAINShow the per-check score breakdown
--expand-install-eiCARE_EXPAND_INSTALLExpand the per-tool install phase into its own section

get

Fetches one file from a source into the current repo, applying any placeholder substitutions before the write. See Fetching config files for the source-resolution rules.

Argument or flagShortEnvMeaning
<source>CARE_GET_SOURCEFirst positional. A local path, a github or gist URL, or the owner/repo/path shorthand
--out <path>-oCARE_GET_OUTDestination relative to cwd. Defaults to the source's filename
--token <token>-tGITHUB_TOKENGitHub token for private sources
-r token=value-rCARE_GET_REPLACEReplace a placeholder. Repeat for more
--forceCARE_GET_FORCEOverwrite an existing destination file

changelog

Derives release notes from conventional commits and, with --write, maintains a Keep a Changelog file. See Changelog for the workflow.

Argument or flagShortEnvMeaning
<tag>CARE_CHANGELOG_TAGFirst positional. Range end. Defaults to the CI ref, the latest tag, then HEAD
--since <ref>CARE_CHANGELOG_SINCEExclusive start of the range. Defaults to the previous tag
--fullCARE_CHANGELOG_FULLStart from the first commit, ignoring tags. Conflicts with --since
--file <path>-fCARE_CHANGELOG_FILECHANGELOG.md path read for curated notes and written by --write. Defaults to ./CHANGELOG.md
--writeCARE_CHANGELOG_WRITEMaintain the CHANGELOG.md instead of printing
--release <version>CARE_CHANGELOG_RELEASEWith --write, stage a section for an upcoming untagged version
--remote <url>CARE_CHANGELOG_REMOTERemote URL overriding git-host detection
--token <token>-tCARE_GIT_HOST_TOKENGit-host API token. Falls back to GITHUB_TOKEN or GH_TOKEN
--plainCARE_CHANGELOG_PLAINDrop links and author attribution