|

Perplexity Releases pplx, a Single-Binary CLI That Puts Its Search API in the Terminal for Coding Agents

Perplexity has launched pplx, an official command line shopper for its Search API. The device returns grounded search outcomes and extracted web page textual content, all as JSON. According to its docs, it targets people and coding brokers equally. It shouldn’t be a chat shopper. There is not any conversational mode, no mannequin choice and no synthesized reply.

Two surfaces, one output contract

The device exposes precisely two working surfaces. pplx search internet runs a stay internet search. pplx content material fetch pulls a URL and returns cleaned web page textual content.

The contract round them is the attention-grabbing half. Per the official pplx-cli Agent Skill, success means exit code 0 and precisely one JSON object on stdout. Search returns {hits: [{url, title, domain, snippet, ...}], whole, saved_to?}.

Every failure exits 1 with an empty stdout. One JSON error object goes to stderr, formed {"error":{"code","message","command","trace"?}}. Documented codes embrace AUTHENTICATION, UNKNOWN_ARGUMENT, ARGUMENT_ERROR and BAD_REQUEST. The talent notes that record shouldn’t be exhaustive, so callers ought to department on error.code.

Install path and platform help

Installation is a single shell command that pipes a script into sh:

curl -fsSL https://github.com/perplexityai/perplexity-cli/releases/newest/obtain/set up.sh | sh

Reading install.sh exhibits what it really does. It downloads manifest.json from the newest launch and extracts the tag and model. It then pins each remaining obtain to that tag, explicitly to keep away from racing a concurrent publish.

It fetches SHA256SUMS and the platform binary, verifies the checksum, and installs to ~/.native/bin/pplx. No sudo is required. A receipt is written to ~/.config/pplx/pplx-receipt.json, however solely after the put in binary runs efficiently.

Platform protection is restricted to a few targets: macOS on Apple Silicon, Linux x86_64 and Linux arm64. Anything else exits with an error. There is not any Windows construct and no Intel macOS construct.

Context-window economics are a first-class design concern

The most agent-specific characteristic is token budgeting. --output-dir writes the full end result set to a JSON file. --stdout-preview[=<CHARS>] truncates lengthy string fields in stdout, including ...<truncated> markers.

The talent is blunt about the entice: --stdout-preview is a no-op with out a save listing. It truncates solely when the end result can also be saved through --output-dir or $PPLX_OUTPUT_DIR. Used alone it returns full-size output, and hits could be a number of KB every.

Saved search outcomes land at {dir}/internet/{rand}.json and fetches at {dir}/fetch/{rand}.json. Files are written solely after a profitable request. PPLX_OUTPUT_DIR units a workspace default so the flag needn’t be repeated.

For content material fetch, the talent provides a correctness test moderately than a value one. Verify error and is_paywall in the output earlier than trusting content material. --html provides a raw_html discipline fetched stay through crawler, and --no-cache forces a stay fetch.

Key Takeaways

  • pplx is a single verified binary exposing two instructions: pplx search internet and pplx content material fetch.
  • Success is exit 0 plus one JSON object on stdout; failures put one JSON error object on stderr.
  • pplx auth login is TTY-only, so brokers and CI should export PERPLEXITY_API_KEY.
  • --stdout-preview solely truncates when paired with --output-dir or $PPLX_OUTPUT_DIR.
  • Search API billing is $5.00 per 1,000 requests, capped at 50 QPS on each utilization tier.


Sources: perplexityai/perplexity-cli, pplx-cli SKILL.md, api-platform-developers, Perplexity API pricing, Rate limits and usage tiers, and Search API quickstart

The publish Perplexity Releases pplx, a Single-Binary CLI That Puts Its Search API in the Terminal for Coding Agents appeared first on MarkTechPost.

Similar Posts