Install PromptScore and run your first prompt check
Use the CLI for local or CI workflows, or import the core library when you want PromptScore inside your own product.
Install or run once
PromptScore ships as a public CLI package. You can install it globally or invoke it with `npx`.
npm install -g @promptscore/cli
npx @promptscore/cli analyze prompt.txtAnalyze a file, directory, glob, inline prompt, or stdin
The `analyze` command accepts prompt files, directories of prompt-like text files, glob patterns, inline strings, or piped stdin.
promptscore analyze prompt.txt
promptscore analyze prompts/
promptscore analyze "prompts/**/*.{txt,md}"
promptscore analyze --inline "You are a helpful assistant."
cat prompt.txt | promptscore analyzeChoose a profile
The current public release ships with `_base`, `claude`, and `gpt`. Profiles adjust weight, severity, suggestions, and references while using the same deterministic core engine.
promptscore analyze prompt.txt --model claude
promptscore profilesSave project defaults
If your team wants shared defaults, add a `promptscore.config.yaml` file to the repo and let the CLI discover it automatically.
model: claude
format: text
fail_on_severity: warningUse it in code
In Node or server-side code, import `analyze` from `@promptscore/core`. The API returns a Promise<ScoreReport>.
import { analyze, format } from '@promptscore/core';
const report = await analyze('You are a helpful assistant. Summarize the article.', {
model: 'claude',
});
console.log(report.overall);
console.log(format(report, 'text'));Where to go next
- Read CLI Guide for command details, formats, and exit codes.
- Read Config to set project-wide defaults and CI policy.
- Read Browser Analyzer for the browser-safe entry point and client usage.
- Read Rules Reference to understand what the score is actually measuring.