CLI
The rimfe command line. Write a starter .rimfe.json with npx @rimfe/cli init, then list, start and decide docs checks from the terminal.
The rimfe command line sets up a repository and works with checks from the terminal. It needs Node.js 20 or newer.
Set up a repository
Run this at the root of the repository, or anywhere inside it:
npx @rimfe/cli initinit finds your docs the same way setup in the dashboard does. It recognises Docusaurus, MkDocs, Starlight, Mintlify, GitBook, Sphinx, Antora, Nextra, VitePress, Fumadocs and Fern, and plain docs folders. It then writes a .rimfe.json at the repository root:
{
"$schema": "https://rimfe.com/schema/rimfe.json",
"docsGlobs": ["README.md", "website/docs/**/*.{md,mdx}"]
}- It reads the files git tracks (or the folder, outside git), never sends anything anywhere and needs no sign-in.
- Test fixtures are never taken for your docs.
- With no docs found, it writes a starting guess (
README.mdanddocs/) and says so. - In a terminal, it shows what it found and asks before writing. In CI or a script, or with
--yes(-y), it writes without asking. --printshows the file without writing it.- An existing
.rimfe.jsonis left alone unless you confirm, or pass--force.
Then:
- Check the globs, and commit the file to your default branch.
- Install Rimfe on GitHub (opens in a new tab) on the repository.
- In the repository's settings in Rimfe, set Documentation scope to .rimfe.json at the PR base on the Advanced tab.
Work with checks
Install the CLI, sign in once, then list and act on checks:
npm install -g @rimfe/cli
rimfe login
rimfe checks --view action| Command | What it does |
|---|---|
rimfe login | Signs in through the browser, where you pick the workspace and whether the CLI may make changes. |
rimfe logout | Forgets this computer's sign-in. |
rimfe repos | Lists the workspace's repositories. |
rimfe checks | Lists pull requests with their latest check. --repo owner/name limits it to one repository, --view picks action, all, pass or skipped, --page n pages through. |
rimfe check <check-id> | Shows a check's findings. |
rimfe start <owner/name> <pull-request> | Starts a check of an open pull request. |
rimfe decide <check-id> <finding-id> <decision> | Records accepted, dismissed, resolved or reopened on a finding. --reason text adds why. |
--jsonprints the raw results, for scripts.startanddecidechange things, so they need write access, which you grant when you sign in, and they ask before they run.- A start counts toward the manual check limit, like Run check in the dashboard.
rimfe --versionprints the version, andrimfe <command> --helplists a command's options.
The sign-in is kept in your user config folder, readable by you only. rimfe logout removes it.
Last updated