<PRs.md/>

Guides

CLI

The prs-md CLI runs a Turing Test challenge directly in your terminal — no browser required. Your AI key is used locally for grading; it never leaves your machine.

Requirements

  • Node.js 20 or later
  • An API key for OpenAI, Anthropic, or Gemini

Running a challenge

npx prs-md https://github.com/owner/repo/pull/123

The CLI fetches the PR diff, generates 3 targeted questions via your AI key, and launches an interactive timed quiz in your terminal. On pass, a shareable proof link is printed and (if you're logged in) recorded to your dashboard.

You can also install globally and skip the npx prefix:

npm install -g prs-md

Authentication (optional)

Authentication links your CLI results to your PRs.md web account. It's optional — anonymous runs still get a shareable proof URL on pass. Log in with GitHub Device Flow:

prs-md login   # Opens github.com — enter the displayed code
prs-md whoami  # Confirm who you're logged in as
prs-md logout  # Remove stored credentials

Credentials are stored at ~/.config/prs-md/auth.json (mode 600).

Once logged in, two things happen automatically on each run:

  • API keys you've saved on the dashboard are fetched and used — no manual key entry needed.
  • Pass and fail attempts both appear on your dashboard, and re-running the same PR reuses the original questions so attempts stay comparable.

Providing an AI key

If you're not logged in (or want to override the saved key), supply a key in any of these ways — highest precedence first:

  1. Flags: --provider anthropic --key sk-ant-...
  2. Environment variables: PRS_PROVIDER and PRS_API_KEY
  3. Keys saved in your PRs.md dashboard (requires login)
  4. Interactive prompt (if none of the above resolve)

The provider is inferred automatically from the key prefix when not specified: sk-ant- → Anthropic, sk- → OpenAI, AI → Gemini.

# Explicit flags
prs-md https://github.com/owner/repo/pull/123 --provider anthropic --key sk-ant-...

# Environment variables
PRS_PROVIDER=openai PRS_API_KEY=sk-... prs-md https://github.com/owner/repo/pull/123

Flags

  --provider, -p   AI provider: openai | anthropic | gemini
  --key, -k        AI API key
  --help, -h       Show usage

Exit codes

  • 0 — challenge passed
  • 1 — challenge failed, timed out, or an error occurred

Environment variables

  • PRS_PROVIDER — AI provider (openai, anthropic, gemini)
  • PRS_API_KEY — AI API key
  • PRS_API_URL — Override the API base URL (default: https://www.prs.md). Useful for self-hosted instances or local development.
GitHub Action alternative: For tighter GitHub integration — automatic PR comments and commit status checks — use the GitHub Action. It runs server-side and posts results directly to the PR thread without any local setup. No prs.md account required.