Your friendly Windows-first CLI for asking Perplexity anything—no Node.js expertise required.
- Ask Perplexity questions right from PowerShell (
enigma "Explain this error"). - Stay interactive with quick follow-ups (
enigmathen keep chatting). - Save your settings once; they auto-load every time.
- Switch models on the fly (sonar, sonar-pro, sonar-reasoning, sonar-deep-research, etc.).
-
Install Node.js 18+
Download and run: https://nodejs.org (LTS recommended). -
Open PowerShell (Start menu ➜ type “PowerShell” ➜ Run).
-
Install Enigma from npm
npm install -g perplexity-enigma
(If you’re running from this repo instead, run
pwsh .\setup.ps1.) -
Launch and enter your API key
enigma
- If no key is found, you’ll be prompted to paste it.
- Key is saved to both
.envand.pplxrcfor future runs.
-
See it work
enigma "What can you help me with?"
Visual confirmation: you’ll see a green “=== Perplexity ===” header followed by the answer.
enigma— Interactive mode (type:helpinside for tips,:exitto quit).enigma ask "your question"— One-shot question.enigma --model sonar-pro "optimize this script"— Override model for a call.enigma config— View resolved config (model, search mode, streaming note).enigma config --save— Persist current settings to.pplxrc(path shown).
Run enigma --help or enigma <command> --help for examples.
Precedence: Env vars > .pplxrc > defaults.
Key env vars: PPLX_API_KEY, PPLX_MODEL_DEFAULT, PPLX_SEARCH_MODE, PPLX_OUTPUT_STREAM.
Built-in models list:
sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro, sonar-reasoning-large, sonar-deep-research, sonar-large.
If you provide an invalid model, Enigma shows the valid list and falls back to the default (sonar-pro).
.pplxrc is YAML; malformed YAML is ignored with a warning and defaults are used.
- PowerShell profile lives at:
C:\Users\<you>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 setup.ps1is idempotent: it creates the profile if missing, avoids duplicateenigmafunctions, and prints what changed.- After running
setup.ps1, restart PowerShell (or run. $PROFILE) then useenigmaanywhere.
| Issue | What to do |
|---|---|
| API key not found | Run enigma; paste your key when prompted or run enigma config to set it. |
| API key invalid (401/403) | Re-run enigma config and update your key. |
| Invalid model | CLI will list available models and auto-fallback to sonar-pro. |
| Network/timeout | Check connection/VPN, then retry your question. |
| Malformed .pplxrc | CLI will warn and continue with defaults. Fix the YAML or delete .pplxrc. |
| Command not found | If installed globally, restart PowerShell or run . $PROFILE. For local dev, use npm link then enigma. |
npm install
npm run build
npm test
npm link # to try the global `enigma` command locallyThis project follows Semantic Versioning. See CHANGELOG.md for version history and VERSIONING.md for the complete release process.
Check the Releases page for the latest version and release notes.
- Continuous Integration: Automated tests run on every push and PR
- Automated Releases: GitHub releases and npm publishes are automated via tags
- Where do files live? In this folder; profile is at
C:\\Users\\<you>\\Documents\\PowerShell\\Microsoft.PowerShell_profile.ps1. - Do I need Git? Only if running from source. From npm, just
npm install -g perplexity-enigma. - Can I change models per call? Yes:
enigma --model sonar-reasoning "question". - How do I exit interactive mode? Type
:exitor pressCtrl+C.
Happy questioning!