Skip to content
Logo

csb lint

Check a wiki for broken links, orphan pages and bad frontmatter, from any directory.

Usage

csb lint [<name>…] [--brain <name>] [--path <dir>] [--all] [--json]

With no target, csb lint shows a multi-select of your registered brains with the default brain preselected, and lints each one you pick. When there's no terminal to prompt in, or with --json, it lints the default brain.

It's a thin wrapper: it runs pnpm lint:wiki inside each vault (passing --json through), the same script /lint starts with. Vaults scaffolded before lint:wiki existed use the copy bundled with the CLI.

Checks

CheckSeverityWhat it finds
broken-linkerrorA [[wikilink]] that points to no file in the vault.
frontmattererrorA page with no frontmatter, or a missing or invalid type or updated.
orphanwarningA page no other wiki page links to.
short-linkwarningA link that only resolves by bare name, not the full [[wiki/...]] path.
contradictioninfoAn open [!WARNING] Contradiction callout.

Exits 0 when no target has errors, 1 when any target has errors, and 2 on bad usage or a folder with no wiki/.

Options

<name>, --brain <name>

Lint a registered brain. Repeat to lint several.

csb lint work personal

--path <dir>

Lint any vault folder, registered or not. Repeatable. --vault is an alias.

csb lint --path ~/notes/my-vault

--all

Lint every registered brain.

--json

Print a JSON report with summary, issues and missingPages. With several targets, prints an array of { target, path, exitCode, report }.

csb lint --all --json

-h, --help

Displays help message.

csb lint --help