@j4k-oss/askpplx (1.4.14)

Published 2026-10-21 14:39:05 +00:00 by oss-publisher in j4k-oss/askpplx

Installation

@j4k-oss:registry=
npm config set @j4k-oss:registry=
npm install @j4k-oss/askpplx@1.4.14
"@j4k-oss/askpplx": "1.4.14"

About this package

askpplx

Source: https://code.j4k.dev/j4k-oss/askpplx. github.com/Jercik/askpplx is a read-only mirror; open issues and pull requests on the Forge.

askpplx is a minimal Unix-style CLI for querying Perplexity Sonar.

Perplexity AI is an AI-powered search engine and answer engine that delivers concise, accurate responses to user queries by combining real-time web searches with advanced language models.

  • Command name: askpplx
  • Output: plain text or JSON to stdout
  • No MCPs, no agents, no plugins, no TUI
  • Just a thin, script-friendly wrapper around the Perplexity API

Installation

Each release is published under two names with the same files:

  • askpplx on npmjs.org, for npx and npm exec. All examples below use it.
  • @j4k-oss/askpplx on the code.j4k.dev registry, for pnpm projects that exempt the @j4k-oss scope from minimumReleaseAge. The registry reads anonymously.

To use the code.j4k.dev copy, map the scope to its registry and exempt it in pnpm-workspace.yaml, then add the package:

registries:
  "@j4k-oss": https://code.j4k.dev/api/packages/j4k-oss/npm/
minimumReleaseAgeExclude:
  - "@j4k-oss/*"
pnpm add -D @j4k-oss/askpplx

Both packages install the same askpplx command and read the same stored API key.

Setup

Provide your Perplexity API key via environment variable or persistent storage:

# Option 1: Environment variable
export PERPLEXITY_API_KEY="pplx-..."

# Option 2: Store persistently
npx -y askpplx config --set-api-key "pplx-..."

Examples

# simple question
askpplx "Explain Raft vs Paxos in simple terms"

# web-enabled search with local context
askpplx "What are breaking changes in React 19 that affect this code? $(cat src/app.tsx)"

# read prompt from stdin (filter style)
cat article.txt | askpplx -S "Summarize this article"

# extract plain text from JSON response
askpplx "Node.js LTS version" --json | jq -r '.text'

# list cited source URLs
askpplx "Latest TypeScript release notes" --json | jq -r '.sources[].url' | sort -u

Agent Rule

Add this rule to your CLAUDE.md or AGENTS.md:

# Rule: Use `askpplx` for Current Facts

At the start of each session, run `npx -y askpplx --help` to verify the CLI is available and configured properly and check available options.
When a task depends on current or uncertain external information, query `askpplx` instead of relying on memory.

Dependencies

Dependencies

ID Version
@ai-sdk/perplexity ^3.0.42
@commander-js/extra-typings ^15.0.0
ai ^6.0.198
commander ^15.0.0
conf ^15.1.0
zod ^4.4.3

Development dependencies

ID Version
@j4k-oss/fta-check ^1.5.10
@j4k/oxlint-config 2.14.2
@j4k/semantic-release-forgejo ^1.2.4
@total-typescript/ts-reset ^0.6.1
@types/node ^24.0.0
@vitest/coverage-v8 ^4.1.8
conventional-changelog-conventionalcommits ^9.3.1
fta-cli ^3.0.0
knip ^6.16.1
oxfmt ^0.57.0
oxlint 1.87.0
oxlint-tsgolint 7.0.2004
semantic-release ^25.0.3
typescript ^7.0.2
vitest ^4.1.8
Details
npm
2026-10-21 14:39:05 +00:00
12
2026-11-04 15:21:23 +00:00
Łukasz Jerciński
MIT
15 KiB
Assets (1)
Versions (3) View all
1.4.16 2026-11-03
1.4.15 2026-10-28
1.4.14 2026-10-21