npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@taplid/cli

v0.1.11

Published

Official CLI for the hosted Taplid audit API.

Downloads

954

Readme

@taplid/cli

Official CLI for the hosted Taplid audit API.

Use it as a thin hosted-service wrapper.

  • Docs: https://taplid.com/setup
  • Playground: https://taplid.com/playground/audit

Usage

npx @taplid/cli audit request.json

If you install the package locally use:

taplid audit request.json

Input

If provided, the input file contains the same request payload used by the playground and API.

Example request.json:

{
  "context": "Support access policy:\n1. Support agents cannot view an existing password.\n2. Users must use the password reset flow to regain access.",
  "prompt": "Can support tell me my current password?",
  "response": "You can update your billing address in Settings > Billing."
}

Only response is required; context, prompt, and audit_mode are optional.

Example response.json:

{
  "decision": "BLOCK",
  "trustScore": 30,
  "summary": "High-risk reliability issues found. Do not use as-is.",
  "issues": [
    {
      "message": "Does not fully answer the request.",
      "reason": "Important parts of the request are missing."
    },
    {
      "message": "Includes unsupported or unverifiable claims.",
      "snippet": "You can update your billing address in Settings > Billing.",
      "reason": "Key claim is not backed by a source."
    }
  ],
  "nextStep": "Do not use this output yet. Rewrite it with better support and review it again.",
  "details": {
    "reviewThreshold": 60,
    "passThreshold": 80
  }
}

Output

By default the CLI writes the full audit result JSON to a sibling file:

  • Input — request.json
  • Output — request.response.json

When no input file is provided, default output is ./taplid.response.json.

Optional Flags

npx @taplid/cli audit request.json --out custom-response.json
npx @taplid/cli audit --response "Inline response only"
npx @taplid/cli audit --response-file-location ./bundle/response.txt
npx @taplid/cli audit --prompt "Inline prompt" --response-file-location ./bundle/response.txt
npx @taplid/cli audit request.json --deep
npx @taplid/cli audit request.json --audit-mode artifact
npx @taplid/cli audit request.json --api-url http://127.0.0.1:7000
npx @taplid/cli audit request.json --api-key your_api_key
npx @taplid/cli audit request.json --env-file .env.taplid
npx @taplid/cli audit request.json --pass-threshold 85 --review-threshold 65
  • --out <path> writes the response JSON to a custom output path.
  • --context <text> sets request context text for this run.
  • --prompt <text> sets request prompt text for this run.
  • --response <text> sets request response text for this run.
  • --context-file-location <path> resolves context text from a file.
  • --prompt-file-location <path> resolves prompt text from a file.
  • --response-file-location <path> resolves response text from a file.
  • --deep forces deepAudit: true find issues the standard audit may miss.
  • --audit-mode <artifact> overrides audit_mode for this run.
  • --api-url <url> overrides the default API origin.
  • --api-key <key> is required and sends the taplid.com account API key.
  • --env-file <path> loads TAPLID env defaults from an explicit env file.
  • --pass-threshold <0-100> overrides the pass threshold for this run.
  • --review-threshold <0-100> overrides the review threshold for this run.

Optional Environment Loading

The CLI supports three ways of providing TAPLID env values:

  1. Shell or process environment
  2. Explicit --env-file <path>
  3. Auto-loaded local .env from the current working directory

If --env-file is provided, the CLI loads that file and does not auto-load the local .env.

If --env-file is not provided, the CLI checks process.cwd() for .env and continues silently if the file is absent.

If --env-file is provided but the file does not exist, the CLI fails fast.

Example shell usage:

$env:TAPLID_AUDIT_MODE = "artifact"
npx @taplid/cli audit request.json

Example explicit env file usage:

npx @taplid/cli audit request.json --env-file .env.taplid

Optional Environment Defaults

Supported variables:

  • TAPLID_API_URL=
  • TAPLID_API_KEY=
  • TAPLID_CONTEXT=
  • TAPLID_PROMPT=
  • TAPLID_RESPONSE=
  • TAPLID_CONTEXT_FILE_LOCATION=
  • TAPLID_PROMPT_FILE_LOCATION=
  • TAPLID_RESPONSE_FILE_LOCATION=
  • TAPLID_AUDIT_MODE=
  • TAPLID_DEEP_AUDIT=
  • TAPLID_REVIEW_THRESHOLD=
  • TAPLID_PASS_THRESHOLD=

context, prompt, and response are resolved per field as: CLI -> env/defaults -> request.json. Within each layer, inline text wins over matching *FileLocation. TAPLID_CONTEXT/TAPLID_PROMPT/TAPLID_RESPONSE override matching TAPLID_*_FILE_LOCATION values in the env layer. contextFileLocation, promptFileLocation, and responseFileLocation read file content as raw UTF-8 text regardless of extension (.txt, .json, etc.). request.json *FileLocation paths resolve from the request file directory, --env-file paths resolve from the env-file directory, and direct CLI/process-env paths resolve from process.cwd().

Precedence

  • text fields (context, prompt, response): CLI -> env/defaults -> request.json
  • non-text fields: CLI flags -> request.json -> shell env -> --env-file -> local .env -> built-in defaults

File format handling for context, prompt, and response inputs

Taplid treats context, prompt, and response file inputs as raw UTF-8 text. Supported examples include .txt, .md, .json, .log, .ndjson, .yaml, and .yml. These files are not parsed by type. Taplid reads the file contents as plain text and uses the resolved text value. This behavior is consistent across the playground, CLI file-location flags, environment file-location variables, and request-payload file-location fields.

Relative file-location paths resolve from:

  • request.json directory for request payload file-location fields
  • --env-file directory for env-file defaults
  • process.cwd() for direct CLI flags and process environment values

If an explicit file-location path is provided and the file cannot be read, the CLI fails with a clear error unless an inline value for the same field is provided in that same layer.