Perplexity、コーディングエージェント向け CLI ツール「pplx」を公開
Perplexity は検索 API をターミナルで利用可能な単一バイナリ CLI ツール「pplx」をリリースし、開発者やコーディングエージェントが構造化された検索結果を取得できる環境を整えた。
AI深層分析を開く2026年7月28日 02:08
AI深層分析
キーポイント
CLI ツールの機能と設計思想
Perplexity が公開した pplx はチャット機能を持たず、検索結果を JSON 形式で返すことに特化した CLI ツールであり、人間とコーディングエージェントの両方を対象としている。
厳格な出力契約とエラーハンドリング
成功時は exit code 0 と単一の JSON オブジェクトを標準出力へ返し、失敗時は exit code 1 と詳細なエラー情報を標準エラー出力へ返す設計となっている。
トークン予算管理の仕組み
コーディングエージェント向けの機能として、--output-dir で結果を保存し、--stdout-preview で長文フィールドをトリミングするトークン節約機能が実装されている。
プラットフォーム対応とインストール方法
Apple Silicon 搭載 macOS および Linux (x86_64, arm64) のみに対応し、Windows や Intel Mac 版は提供されていないため、利用可能な環境が限定される。
検索結果とコンテンツ取得の保存形式
成功したリクエストの結果は指定ディレクトリの JSON ファイルに保存され、PPLX_OUTPUT_DIR でデフォルト作業領域を設定できる。
重要な引用
The tool targets humans and coding agents equally. It is not a chat client.
Success means exit code 0 and exactly one JSON object on stdout.
--stdout-preview is a no-op without a save directory.
Verify error and is_paywall in the output before trusting content.
編集コメントを表示
編集コメント
Perplexity が検索 API を CLI ツールとして公開したのは、開発者や AI エージェントが外部情報を取得する際のハードルを下げた意義深い動きである。特にトークン予算管理に配慮した設計は、大規模な自動化タスクにおける実用性を高める要素となっている。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Perplexity は、検索 API 用の公式コマンドラインクライアント「pplx」をリリースしました。このツールは、根拠のある検索結果と抽出されたページテキストを JSON 形式で返します。ドキュメントによると、対象ユーザーは人間もコーディングエージェントも等しく想定されています。ただし、チャット機能を持つクライアントではなく、会話モードやモデル選択、合成された回答の生成はありません。
二つの操作インターフェースと共通の出力規約
このツールが提供する機能は実質的に二つだけです。「pplx search web」はライブでのウェブ検索を実行し、「pplx content fetch」は指定した URL からページテキストを取得してクリーンな状態で返します。両者を統括する重要な点は、厳格に定義された出力規約にあります。
公式の「Agent Skill」ドキュメントによると、成功時は exit code 0 を返し、標準出力には JSON オブジェクトがちょうど一つだけ出力されます。検索結果は {hits: [{url, title, domain, snippet, ...}], total, saved_to?} という形式になります。
一方、エラーが発生した場合は exit code 1 で終了し、標準出力は空になります。エラー情報は標準エラー出力に JSON オブジェクトとして出力され、{"error":{"code","message","command","hint"?}} の構造を持ちます。ドキュメントに記載されているエラーコードには AUTHENTICATION(認証エラー)、UNKNOWN_ARGUMENT(不明な引数)、ARGUMENT_ERROR(引数の誤り)、BAD_REQUEST(不正なリクエスト)などがありますが、このリストは網羅的ではないため、呼び出し元側で error.code に応じた分岐処理を行う必要があります。
インストールパスとプラットフォーム対応状況
インストールは、単一のシェルコマンドでスクリプトを sh にパイプするだけで完了します。
curl -fsSL https://github.com/perplexityai/perplexity-cli/releases/latest/download/install.sh | sh
install.sh の中身を確認すると、実際の動作がわかります。このスクリプトは最新リリースから manifest.json をダウンロードし、タグとバージョン情報を取得します。その後、残りのすべてのダウンロードをその特定のタグに固定します。これは、並行する公開処理との競合を避けるための明確な意図によるものです。
次に、SHA256SUMS ファイルとプラットフォーム固有のバイナリを取得し、チェックサムを検証して ~/.local/bin/pplx へインストールします。sudo 権限は不要です。ただし、インストールされたバイナリが正常に実行されて初めて、レシート情報が ~/.config/pplx/pplx-receipt.json に書き込まれます。
対応プラットフォームは限られており、macOS(Apple Silicon)、Linux x86_64、Linux arm64 の 3 つのみです。それ以外の環境ではエラーで終了します。Windows や Intel 搭載 Mac 向けのビルドはまだ提供されていません。
コンテキストウィンドウの経済性は、設計上の最優先事項です
エージェントに特化した最も重要な機能はトークン予算の管理です。--output-dir オプションを使えば、結果セット全体を JSON ファイルとして出力できます。また、--stdout-preview[=] を使用すると、標準出力に表示される長い文字列フィールドが切り捨てられ、「...」というマーカーが付加されます。
この機能には明確な注意点があります。--stdout-preview は、保存先ディレクトリを指定しない場合、単なる無効なオプション(no-op)に過ぎません。結果を --output-dir または $PPLX_OUTPUT_DIR 経由で保存した場合のみ、文字列の切り捨てが有効になります。このオプションを単独で使用すると、フルサイズの出力が返され、1 回の呼び出しで数 KB に達するケースも珍しくありません。
検索結果は {dir}/web/{rand}.json に、フェッチ結果は {dir}/fetch/{rand}.json に保存されます。ファイルはリクエストが成功した後にのみ書き込まれます。PPLX_OUTPUT_DIR 環境変数でワークスペースのデフォルトを指定できるため、フラグを毎回指定する必要はありません。
コンテンツ取得機能では、コストではなく正しさを確認するチェックが追加されています。信頼できるコンテンツとして扱う前に、出力内の error と is_paywall を必ず検証してください。--html オプションを使うと、クローラー経由でリアルタイムに取得した生 HTML が raw_html フィールドとして返されます。また、--no-cache を指定するとキャッシュを無効化してリアルタイムフェッチが実行されます。
主なポイント
pplx は、2 つのコマンド(pplx search web と pplx content fetch)を提供する単一の検証済みバイナリです。
成功時は終了コード 0 に加え、標準出力に JSON オブジェクトが 1 つ出力されます。失敗した場合は、標準エラー出力に JSON エラーオブジェクトが 1 つ出力されます。
pplx auth login コマンドは TTY(端末)でのみ動作するため、エージェントや CI/CD パイプラインでは PERPLEXITY_API_KEY 環境変数を設定する必要があります。
--stdout-preview オプションは、--output-dir または $PPLX_OUTPUT_DIR と組み合わせて使用した場合にのみ、出力の切り捨てが行われます。
検索 API の課金は 1,000 リクエストあたり 5 ドルで、すべての利用階層において毎秒最大 50 リクエスト(QPS)が上限となっています。
参照元:perplexityai/perplexity-cli、pplx-cli SKILL.md、api-platform-developers、Perplexity API 価格設定、レート制限と利用階層、検索 API クイックスタート
Perplexity が、コーディングエージェント向けにターミナル内で検索 API を利用可能にするシングルバイナリ CLI「pplx」をリリースした。
原文を表示
Perplexity has released pplx, an official command line client for its Search API. The tool returns grounded search results and extracted page text, all as JSON. According to its docs, it targets humans and coding agents equally. It is not a chat client. There is no conversational mode, no model selection and no synthesized answer.
Two surfaces, one output contract
The tool exposes exactly two working surfaces. pplx search web runs a live web search. pplx content fetch pulls a URL and returns cleaned page text.
The contract around them is the interesting part. Per the official pplx-cli Agent Skill, success means exit code 0 and exactly one JSON object on stdout. Search returns {hits: [{url, title, domain, snippet, ...}], total, saved_to?}.
Every failure exits 1 with an empty stdout. One JSON error object goes to stderr, shaped {"error":{"code","message","command","hint"?}}. Documented codes include AUTHENTICATION, UNKNOWN_ARGUMENT, ARGUMENT_ERROR and BAD_REQUEST. The skill notes that list is not exhaustive, so callers should branch on error.code.
Install path and platform support
Installation is a single shell command that pipes a script into sh:
Copy CodeCopiedUse a different Browser
curl -fsSL https://github.com/perplexityai/perplexity-cli/releases/latest/download/install.sh | sh
Reading install.sh shows what it actually does. It downloads manifest.json from the latest release and extracts the tag and version. It then pins every remaining download to that tag, explicitly to avoid racing a concurrent publish.
It fetches SHA256SUMS and the platform binary, verifies the checksum, and installs to ~/.local/bin/pplx. No sudo is required. A receipt is written to ~/.config/pplx/pplx-receipt.json, but only after the installed binary runs successfully.
Platform coverage is limited to three targets: macOS on Apple Silicon, Linux x86_64 and Linux arm64. Anything else exits with an error. There is no Windows build and no Intel macOS build.
Context-window economics are a first-class design concern
The most agent-specific feature is token budgeting. --output-dir writes the full result set to a JSON file. --stdout-preview[=<CHARS>] truncates long string fields in stdout, adding ...<truncated> markers.
The skill is blunt about the trap: --stdout-preview is a no-op without a save directory. It truncates only when the result is also saved via --output-dir or $PPLX_OUTPUT_DIR. Used alone it returns full-size output, and hits can be multiple KB each.
Saved search results land at {dir}/web/{rand}.json and fetches at {dir}/fetch/{rand}.json. Files are written only after a successful request. PPLX_OUTPUT_DIR sets a workspace default so the flag need not be repeated.
For content fetch, the skill adds a correctness check rather than a cost one. Verify error and is_paywall in the output before trusting content. --html adds a raw_html field fetched live via crawler, and --no-cache forces a live fetch.
Key Takeaways
pplx is a single verified binary exposing two commands: pplx search web and pplx content 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 agents and CI must export PERPLEXITY_API_KEY.
--stdout-preview only 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 every usage 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 post Perplexity Releases pplx, a Single-Binary CLI That Puts Its Search API in the Terminal for Coding Agents appeared first on MarkTechPost.
AI算出
主要ニュースainew評価標準
記事は Perplexity の新ツール「pplx」の機能、出力形式(JSON)、エラーハンドリング、インストール方法、および対応プラットフォームについて詳細な技術情報を提供しており、AI エージェント運用における実装価値が高い新規情報です。ただし、対象が世界共通の開発ツールであり、日本固有の導入事例や規制情報は含まれていないため、日本の関連性は低めに見積もります。
6つの評価軸を見る
- AI関連度
- 100
- 情報源の信頼性
- 25
- 新規性
- 75
- 調べる価値
- 75
- 重複の少なさ
- 100
- 日本での有用性
- 25
関連記事
News to Guide
ニュースの次に確認する
発表内容を、現在の料金や仕様と照らし合わせられる関連ガイドです。
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み