Command line
The writinglint package installs a writinglint
command. It lints prose against the ai-style rulepack (by default) and, separately, scores how
AI-shaped a document reads.
Install
Section titled “Install”npm install -g writinglint# the parser needs the model once (~145 MB):npx nlpgraph download --model xsmall --dir ./modelsOr run it without installing: npx writinglint essay.txt. Working inside this repo instead? Use
the workspace script — npm run cli -- lint README.md.
writinglint essay.txt # lint one doc (+ score)writinglint lint posts/*.md # lint many docswritinglint score posts/*.md # just the AI-style score per doccat essay.txt | writinglint # read from stdinwritinglint --json essay.txt # machine-readable outputwritinglint --quiet posts/*.md # one summary line per docwritinglint --config writinglint.config.ts essay.txtwritinglint --model ./models/xsmall essay.txt # where the parser model livesThe parser model is found automatically at ./models/xsmall in the working directory (where
nlpgraph download --dir ./models puts it); override with --model <dir> or NLPGRAPH_MODEL_DIR.
Each lint prints its location, rule id, category, and message, followed by an inline colour reproduction of the text with the flagged spans highlighted — and, at the end, the document’s AI-style score.
Configuration
Section titled “Configuration”Drop a writinglint.config.ts in your working directory and the CLI picks it up automatically (or point at one
with --config). It’s the same defineConfig you’d use as a library:
import { defineConfig } from 'writinglint-core';import { recommended } from 'writinglint-rulepack-ai-style';
export default defineConfig({ extends: [recommended], rules: { // Linting Markdown? Silence the format-artifact rules: 'ai-style/markdown-bold': 'off', 'ai-style/markdown-heading': 'off', 'ai-style/emoji': 'off', // Promote the construction that started this project to an error: 'ai-style/corrective-antithesis': 'error', },});With no config file, the CLI falls back to the ai-style recommended config (every rule at warn).
Exit code & CI
Section titled “Exit code & CI”--json emits a structured record per document (score, verdict, and every lint with offsets), which
is what you want in CI or an editor integration. Pipe it to jq, gate a commit on it, or feed it to
your own reporter.