Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ppxai-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ppxai-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

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

Hashes for ppxai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb3b4dcf3e9d9bf6938a67643b5a039f92da12d0cf880d4be476f06d48e51b97
MD5 40fed2f29e26ba4dd50f8137e38fbdd4
BLAKE2b-256 6aacce96d39e6a22b2261c9373abd94abe0fbc5bc2801ddcd4ca9ec95cf10aa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppxai-0.1.0.tar.gz:

Publisher: publish.yml on 0xjjjjjj/ppxai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ppxai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd2c456357824adf3b39d1a6c8731b5b524d7fed4031031875658fd98fe5493
MD5 7c52cb0d8db30d2132a59ebda4f0cd46
BLAKE2b-256 94a72c5043d584a24cef7d1296b3006f7bcc1f6e4fe17382c7c8ee43191da17b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppxai-0.1.0-py3-none-any.whl:

Publisher: publish.yml on 0xjjjjjj/ppxai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page