Repository navigation
perplexity-cli v1.0.0 - Initial Release
Overview
perplexity-cli is a command-line interface tool that allows you to interact with the Perplexity API directly from your terminal. Ask questions, get AI-powered responses, and streamline your workflow without leaving the command line.
Features
- π Query Perplexity AI: Run natural language queries directly from your terminal
- π Stream Responses: Watch responses generate in real-time with the
--streamoption - πΎ Save Results: Export responses to files with the
--outputoption - π Query History: View your recent query history
- π API Key Management: Securely store and manage your Perplexity API key
- π€ Multiple Models: Choose from various Perplexity AI models
Supported Models
sonar: Default, balanced speed and capabilitysonar-small: Fastest, least capablesonar-medium: Good balance of speed and capabilitysonar-large: Most capable, slowercodellama-70b: Specialized for code generationmistral-7b: Open-source modelmixtral-8x7b: Mixture of experts modelllama-3-70b: Meta's latest model
Installation
NPM (Recommended)
npm install -g perplexity-cliDirect Use
npx perplexity-cliFrom Source
git clone https://github.com/AbdullahAdeebx/perplexity-cli.git
cd perplexity-cli
npm install
npm linkQuick Start
-
Set your API key:
perplexity-cli set-key YOUR_API_KEY_HERE
-
Run your first query:
perplexity-cli query "What is the capital of France?" -
Try streaming a response:
perplexity-cli query "Explain quantum computing" --stream
Requirements
- Node.js β₯ 14.0.0
- Perplexity API key (Get one here)
Documentation
For complete documentation, visit the GitHub repository.
License
MIT