Perplexify CLI is a standalone terminal and HTTP wrapper around a cookie-based
Perplexity reverse web client. It does not call the official
api.perplexity.ai endpoint.
From this folder:
.\perplexify_setup.batManual install:
python -m pip install -r requirements.txt
python -m playwright install chromiumFast Windows setup from the Perplexify folder:
.\perplexify_setup.batThis installs Python dependencies, installs Playwright Chromium, then opens the cookie setup flow.
Manual setup:
python cli.py setupPaste the __Secure-next-auth.session-token cookie from a logged-in
Perplexity session. The CLI stores it in cookie.private.json and mirrors it to
the local Perplexify .env by default.
For GitHub/public sharing, commit .env.example and never commit .env.
Perplexify reads configuration in this order:
- Process environment variable
PPLX_COOKIE - Local
.env - Local
cookie.private.json
Use --no-env if you only want the private CLI store:
python cli.py setup --no-envQuick launcher:
.\perplexify_launch.bat
.\perplexify_launch.bat search "Latest PSG injury news"
.\perplexify_launch.bat serve --host 127.0.0.1 --port 8787With no arguments, perplexify_launch.bat opens chat mode.
Direct Python commands:
python cli.py status
python cli.py models
python cli.py ask "Explain Perplexity reverse SSE"
python cli.py search "Latest PSG injury news"
python cli.py chat --model sonarSearch mode prints a formatted answer followed by a Sources table when the
reverse stack extracts web URLs.
Chat mode keeps a small in-memory conversation context and animates the final answer in the terminal.
Perplexify also ships a modern keyboard-driven terminal app in Go under
go-tui/. It uses the Python JSON backend for real Perplexity reverse-web
queries, but the interface is a native terminal app with menus, panels, loading
animations, and a dark coral theme.
Install Go first from https://go.dev/dl/, then run from this folder:
.\perplexify_go_run.batBuild a Windows executable:
.\perplexify_go_build.bat
.\go-tui\dist\perplexify.exeLaunch the built executable when available, falling back to go run:
.\perplexify_app.batKeyboard controls:
up/downorj/k: move in menusenter: select, submit search, or send chat messageesc: return homeq: back/quit depending on screenctrl+c: quit immediatelyr: refresh status screen
The Go app intentionally uses no green UI states. The palette is black, coral/orange, white, grey, and small cyan accents for technical metadata. The layout is responsive: wide terminals show side-by-side panels, while smaller terminals switch to stacked panels and a compact logo so the interface does not get crushed.
Use this when another program wants to launch Perplexify as a subprocess:
python cli.py json --mode search --query "latest Ligue 1 injuries"If --query is omitted, stdin is read:
"latest Ligue 1 injuries" | python cli.py json --mode searchStable response shape:
{
"ok": true,
"mode": "search",
"query": "...",
"answer": "...",
"sources": [{"title": "...", "url": "...", "snippet": "", "host": ""}],
"model_requested": "sonar",
"model_used": "perplexity-pro-browser",
"status": "bridge_ok",
"elapsed_ms": 12000,
"error": null
}python cli.py serve --host 127.0.0.1 --port 8787Endpoints:
GET /healthGET /modelsPOST /askPOST /searchPOST /chat
Example body:
{
"query": "latest Real Madrid injury news",
"model": "sonar",
"context": ""
}Keep the default 127.0.0.1 bind for local extension/software usage.
Run all launch paths plus live search/chat validation:
.\perplexify_test.batThe live test reads the cookie from the local .env first, validates the
session, runs one search query, runs one chat query, and fails if no external
source URLs are returned.
Export a portable folder:
.\perplexify_go_build.bat
.\perplexify_export.bat C:\Users\jonha.UWUKIRTIS\Documents\PerplexitfyThe exported folder contains:
- the Python backend files;
- the local
.env; requirements.txt;- the Go executable at
go-tui\dist\perplexify.exewhen built.
From the exported folder:
cd C:\Users\jonha.UWUKIRTIS\Documents\Perplexitfy
python -m pip install -r requirements.txt
.\go-tui\dist\perplexify.exeThe Go executable searches upward from its own location for a folder containing
cli.py, then calls python cli.py ....
Create a public package without .env, cookies, or private files:
.\perplexify_go_build.bat
.\perplexify_export.bat --public --zip C:\Users\jonha.UWUKIRTIS\Documents\Perplexify-publicThe public ZIP includes .env.example, source files, scripts, Go sources, and
the built go-tui\dist\perplexify.exe. It intentionally excludes .env and
cookie.private.json.