@j4k-oss/askpplx (1.4.16)

Published 2026-11-03 14:31:22 +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.16
"@j4k-oss/askpplx": "1.4.16"

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

askpplx is published only as @j4k-oss/askpplx on the code.j4k.dev registry, which reads anonymously. The unscoped askpplx on npmjs.org is deprecated and gets no updates.

Without a registry mapping, npm looks on npmjs.org, finds nothing, and fails with a 404, so map the scope to code.j4k.dev. Do it once in ~/.npmrc:

@j4k-oss:registry=https://code.j4k.dev/api/packages/j4k-oss/npm/

The inline flag below is enough for a single npx run. Keep the ~/.npmrc line for global installs: npm update -g and npm outdated -g read the registry from your configuration, and without the line they look the scoped name up on npmjs.org.

If you installed the unscoped askpplx globally, run npm uninstall -g askpplx first. Both packages provide the askpplx command, so npm install -g would stop with EEXIST.

# global
npm install -g --@j4k-oss:registry=https://code.j4k.dev/api/packages/j4k-oss/npm/ @j4k-oss/askpplx

# one-off
npx -y --@j4k-oss:registry=https://code.j4k.dev/api/packages/j4k-oss/npm/ @j4k-oss/askpplx@latest --help

In a pnpm project, map the scope to its registry and exempt it from minimumReleaseAge 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

The examples below run the globally installed askpplx.

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
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

With askpplx installed globally, add this rule to your CLAUDE.md or AGENTS.md:

# Rule: Use `askpplx` for Current Facts

At the start of each session, run `askpplx --help` to check CLI availability, available options, and whether an API key is present.
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 ^26.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-11-03 14:31:22 +00:00
1
2026-11-04 16:21:33 +00:00
Łukasz Jerciński
MIT
latest
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