Perplexity AI search from your terminal
Project description
ppx
Perplexity AI search from your terminal. Zero dependencies.
Install
pip install ppxai
Setup
Get an API key from perplexity.ai/settings/api, then:
export PERPLEXITY_API_KEY=pplx-...
Or save it permanently:
mkdir -p ~/.config/ppx
echo "PERPLEXITY_API_KEY=pplx-..." > ~/.config/ppx/config
chmod 600 ~/.config/ppx/config
Usage
# Default: research mode (sonar-pro)
ppx "best practices for Python async"
# Quick question
ppx --ask "latest Python version"
# Direct web results (no AI synthesis)
ppx --search "FastAPI middleware" --max-results 5
# Chain-of-thought reasoning
ppx --reason "Redis vs PostgreSQL for sessions"
# Deep research (requires cost confirmation)
ppx --deep --yes-expensive "comprehensive guide to OpenTelemetry"
# JSON output (pipe to jq, scripts, etc.)
ppx --json "test query" | python -m json.tool
Modes & Cost
| Flag | Model | Cost/query | Use for |
|---|---|---|---|
| (default) | sonar-pro | ~$0.05 | General research |
--ask |
sonar | ~$0.01 | Quick factual questions |
--search |
(direct) | ~$0.01 | Raw web results |
--reason |
sonar-reasoning-pro | ~$0.10 | Complex decisions |
--deep |
sonar-deep-research | ~$3.00 | Exhaustive research |
--deep requires --yes-expensive to prevent accidental spend.
Options
| Flag | Description |
|---|---|
--json |
Output raw JSON |
--max-results N |
Max results for --search (default: 10) |
--recency PERIOD |
Filter: day, week, month, year |
--domains DOMAIN |
Limit to specific domains |
--model MODEL |
Override model selection |
--yes-expensive |
Confirm --deep queries |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppxai-0.1.0.tar.gz.
File metadata
- Download URL: ppxai-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb3b4dcf3e9d9bf6938a67643b5a039f92da12d0cf880d4be476f06d48e51b97
|
|
| MD5 |
40fed2f29e26ba4dd50f8137e38fbdd4
|
|
| BLAKE2b-256 |
6aacce96d39e6a22b2261c9373abd94abe0fbc5bc2801ddcd4ca9ec95cf10aa5
|
Provenance
The following attestation bundles were made for ppxai-0.1.0.tar.gz:
Publisher:
publish.yml on 0xjjjjjj/ppxai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppxai-0.1.0.tar.gz -
Subject digest:
bb3b4dcf3e9d9bf6938a67643b5a039f92da12d0cf880d4be476f06d48e51b97 - Sigstore transparency entry: 923149141
- Sigstore integration time:
-
Permalink:
0xjjjjjj/ppxai@4a03bd4fda510601b616ab84c29957500732e7a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/0xjjjjjj
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a03bd4fda510601b616ab84c29957500732e7a5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ppxai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ppxai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dd2c456357824adf3b39d1a6c8731b5b524d7fed4031031875658fd98fe5493
|
|
| MD5 |
7c52cb0d8db30d2132a59ebda4f0cd46
|
|
| BLAKE2b-256 |
94a72c5043d584a24cef7d1296b3006f7bcc1f6e4fe17382c7c8ee43191da17b
|
Provenance
The following attestation bundles were made for ppxai-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on 0xjjjjjj/ppxai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppxai-0.1.0-py3-none-any.whl -
Subject digest:
1dd2c456357824adf3b39d1a6c8731b5b524d7fed4031031875658fd98fe5493 - Sigstore transparency entry: 923149191
- Sigstore integration time:
-
Permalink:
0xjjjjjj/ppxai@4a03bd4fda510601b616ab84c29957500732e7a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/0xjjjjjj
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a03bd4fda510601b616ab84c29957500732e7a5 -
Trigger Event:
push
-
Statement type: