Skip to main content
pylva validate scans a repository’s dependency manifests for known LLM providers and non-LLM cost-source packages, so you can see what Pylva will track automatically and what needs a declaration.

Install

The CLI ships inside the TypeScript SDK - there is no separate install:
npm install @pylva/sdk   # or: pnpm add @pylva/sdk
npx pylva validate
In this repository’s development environment it is also available as pnpm exec pylva validate.

What it does

  • Scans dependency manifests in the working tree for known LLM providers and known non-LLM cost-source packages (search APIs, speech, vector databases, workflow tools).
  • The plain scan and --ci mode are local-only: no network calls, no API key needed.
  • LLM providers are tracked automatically at ingest; only non-LLM sources you author need to be declared with --approve.

Flags

FlagEffect
--jsonMachine-readable output.
--ciCompare detected sources against .pylva/approved-sources.json; exit 1 if a new, unapproved source is detected.
--approveInteractive flow (requires a TTY): declare non-LLM sources, submit each to POST /api/v1/cost-sources, and write .pylva/approved-sources.json. Commit that file.
--include <glob> / --exclude <glob>Narrow or widen the scanned paths. Repeatable.
-h, --helpUsage.
Exit codes: 0 success, 1 --ci found unapproved sources, 2 error.

Environment variables

Only --approve talks to the API:
VariablePurpose
PYLVA_API_KEYYour Pylva API key. Preferred for --approve.
PYLVA_CLI_KEYLegacy fallback for older scripts; universal-key releases also accept PYLVA_API_KEY.
PYLVA_ENDPOINTOverride https://api.pylva.com for self-hosted deployments.

Approving and pricing sources

During --approve you choose a pricing template per source: flat rate, volume discount, free tier, or advanced (up to 5 tiers). Approved sources appear in the dashboard under Cost Sources, where pricing can be adjusted later. In CI, run pylva validate --ci so a newly added cost-source dependency fails the build until someone approves or ignores it - see Cost Source Discovery for the full workflow.