Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Pyright

$ pyright Official Low Risk
Microsoft · Code & DevOps · MIT · macos / linux / windows

Microsoft's high-speed static type checker for Python powering Pylance, written in TypeScript/Node.js. Delivers rich, structured --outputjson diagnostics with exact character ranges, --verifytypes library completeness checks, and zero-config speed.

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install pyright
CLI vs MCP Decision CLI Only

Performs fast local Python type analysis with structured --outputjson; no MCP needed.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

First-class --outputjson payload with exact start/end positions, severity, rule IDs, and deterministic exit codes.

  • --outputjson produces a single clean JSON object on stdout
Trust & Safety 24 / 25

Purely read-only static analyzer; never imports or executes Python source files.

  • Strictly read-only AST/type-graph analysis
Setup & Portability 13 / 15

Available across npm/npx, PyPI/uvx, and Homebrew, though PyPI wrapper downloads Node under the hood.

  • Installable via brew, npm, npx, pip, and uvx
Utility & Efficiency 14 / 15

Significantly faster than mypy on large Python repositories with strict type-narrowing inference.

  • Fast incremental-style whole-workspace checking and --verifytypes
Maintenance & Lineage 9 / 10

Official Microsoft open-source project (microsoft/pyright) under MIT license.

  • Maintained by Microsoft (microsoft/pyright)
Docs & Verifiability 8 / 10

Detailed CLI, pyrightconfig.json, and type-checking rules documentation.

  • Official docs at microsoft.github.io/pyright/

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Offline local Python type checker; no credentials stored or required.

Side Effects
Read-Only
Cost & Quotas

MIT open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Pyright (pyright) Agent Rules
- Always pass `--outputjson` to capture exact file, line, character, and rule metadata.
- Pass `--pythonpath $(which python)` if scanning inside a virtualenv that Pyright does not auto-detect.

Agent-Ready Command Recipes

Safe Read-Only Queries

Type-check workspace with JSON diagnostics
pyright --outputjson src/

Emits a complete JSON report containing generalDiagnostics, exact spans, rule names, and summary counts.

Verify type completeness of an installed package
pyright --verifytypes my_package --outputjson

Audits exported symbol type annotations in JSON without modifying files.

Strengths for Agents

  • + --outputjson delivers one of the cleanest, most complete JSON diagnostic schemas in Python tooling.
  • + Fast whole-project analysis without requiring mypy plugin wrappers for standard typing.

Caveats & Pitfalls

  • ! Note the non-hyphenated flag spelling --outputjson (not --output json).
  • ! PyPI package bundles/downloads a Node.js runtime if Node is not already present.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI