Perplexity cli
OpenCLI 技能资产与运行时插件适配器的 monorepo(学术检索 + 报销流程)。Monorepo for OpenCLI skill assets and runtime plugin adapters.
npx -y skills add semantic-craft/opencli-stack --skill perplexity-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 13 days oldThe repository was created 13 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Perplexity CLI setup, auth, and subcommand reference. Use when the user mentions Perplexity CLI, pplx command, PERPLEXITY_API_KEY, or needs help with pplx installation or configuration. For actual search tasks use perplexity-search.
SKILL.md
3.3 KB, as published. Nobody here has run it
perplexity cli
Shell-native Perplexity access. No MCP required. Installed as a pip package via pipx.
Install
# Install from source
pipx install /path/to/opencli-stack/skills/perplexity-cli/
# Verify
pplx models
Credentials: PERPLEXITY_API_KEY env var → macOS Keychain service perplexity-api-key fallback.
# Set key
export PERPLEXITY_API_KEY="pplx-..."
# Or Keychain
security add-generic-password -a "$USER" -s perplexity-api-key -w "<key>" -U
Subcommands
| Command | API | Purpose |
|---|---|---|
pplx search | Search API | Structured web results with URLs |
pplx ask | Sonar (sonar-pro) | Quick grounded answer |
pplx reason | Sonar (sonar-reasoning-pro) | Analytical reasoning with evidence |
pplx research | Sonar (sonar-deep-research) | Deep multi-source investigation |
pplx agent | Agent API | Multi-turn search loop with presets |
pplx expand | Sonar (no search) | Query reformulations |
pplx batch | — | Parallel stdin dispatch |
pplx jobs [ID] | Async API | List async jobs / fetch one result |
pplx models | Models API | List available models |
Common flags
| Flag | Applies to | Purpose |
|---|---|---|
--json | all | Raw JSON output |
-o FILE | all | Write to file |
--domain D | search, ask, reason, research, agent | Domain allow/denylist (repeatable) |
--recency {hour,day,week,month,year} | search, ask, reason, research, agent | Publication recency |
--language XX | search, ask, reason, research | ISO 639-1 (repeatable) |
--search-context-size {low,medium,high} | ask, reason, research | Web search depth (cost lever) |
--search-type {auto,pro,fast} | ask, reason, research | Search pipeline; fast is the cheap/quick tier |
--search-mode {web,academic,sec} | ask, reason, research | Source type |
--stream | ask, reason, research | SSE streaming |
--async | research | Submit async job (sonar-deep-research only); poll with pplx jobs ID |
--preset {fast-search,pro-search,deep-research} | agent | Agent preset |
--instructions TEXT | agent | System prompt (replaces preset default) |
Every sonar/agent call prints actual usage to stderr, e.g. [pplx] usage: 17 prompt + 871 completion tokens, $0.0191 (suppress with --no-cost-warn). 429/5xx responses are retried once automatically.
Cost
| Command / preset | Approx per call |
|---|---|
search | ~free |
ask / agent --preset fast-search | ~$0.005 |
agent --preset pro-search | ~$0.01 |
reason | ~$0.05 |
research / agent --preset deep-research | up to ~$2 |
Deep research holds the connection for minutes; prefer pplx research "..." --async then pplx jobs ID over blocking.
Scripting convention
# Installed via pipx — just use the command directly
pplx search "..."
# Upgrade after git pull
pipx install /path/to/opencli-stack/skills/perplexity-cli/ --force
See also
- perplexity-search — web search and quick answers