A command-line tool that evaluates Markdown content using LLMs and provides quality scores. Think of it like Vale, but instead of pattern matching, it uses LLMs enabling you to catch subjective issues like clarity, tone, and technical accuracy.
- LLM-based - Uses LLMs to check content quality
- CLI Support - Run locally or in CI/CD pipelines
- Consistent Evaluations - Write structured evaluation prompts to get consistent evaluation results
- Quality Scores & Thresholds - Set scores and thresholds for your quality standards
Get up and running in minutes.
-
Clone the repository:
git clone https://github.com/TinyRocketLabs/vectorlint.git cd vectorlint -
Install dependencies & Build:
npm install npm run build
-
Configure Environment:
cp .env.example .env # Edit .env with your API key (e.g., OPENAI_API_KEY) -
Run a check:
# Run against a local file npm run dev -- path/to/article.md
To run vectorlint from anywhere on your machine, use npm link.
-
Build and Link:
# Inside the vectorlint directory npm run build npm link -
Verify Installation:
vectorlint --help
-
Usage:
Now you can run
vectorlintin any project:vectorlint my-article.md
VectorLint supports OpenAI, Azure OpenAI, Anthropic, and Perplexity.
Minimal Setup (OpenAI):
- Copy
.env.exampleto.env. - Set
LLM_PROVIDER=openai. - Set
OPENAI_API_KEY=your-key.
For other providers (Azure, Anthropic), see the comments in .env.example.
To customize which prompts run on which files, use a vectorlint.ini file in your project root.
cp vectorlint.example.ini vectorlint.iniKey Settings:
PromptsPath: Directory containing your.mdprompts.ScanPaths: Glob patterns for files to scan (e.g.,[content/**/*.md]).
# Basic usage (if linked globally)
vectorlint path/to/article.md
# Using npm script (if not linked)
npm run dev -- path/to/article.md
# Debug mode (shows prompts and full JSON response)
vectorlint --verbose --show-prompt --debug-json path/to/article.mdPrompts are simple Markdown files with YAML frontmatter.
Example (prompts/grammar.md):
---
evaluator: basic
id: GrammarChecker
name: Grammar Checker
---
Check the content for grammar issues and ensure professional writing quality.npm test: Run tests in watch modenpm run test:run: Single runnpm run test:ci: CI run with coverage
Tests live under tests/ and use Vitest. They validate config parsing (PromptsPath, ScanPaths), file discovery (including prompts exclusion), prompt/file mapping, and prompt aggregation with a mocked provider.
