A command-line interface for interacting with Perplexity AI's API, featuring chat history management, note-taking, and AI search capabilities.
- 🤖 Direct interaction with Perplexity AI models
- 📝 Local note-taking with AI-powered search
- 💬 Comprehensive chat history management
- 📊 Conversation analytics and statistics
- 📤 Multiple export formats (Markdown, JSON, Excel)
pip install pplx-cli
Set up your Perplexity API key:
perplexity setup
Or set the environment variable:
export PERPLEXITY_API_KEY='your-api-key'
Ask a question:
perplexity ask "What is the capital of France?"
# With a topic
perplexity ask "What are the main differences between Python lists and tuples?" --topic programming
List available models:
perplexity list-models
View chat history:
perplexity history
Show detailed chat statistics:
perplexity chat-stats
View a specific conversation:
perplexity show-chat <conversation-id>
Export a conversation:
# Export to markdown
perplexity export-chat <conversation-id> --format markdown -o conversation.md
# Export to JSON
perplexity export-chat <conversation-id> --format json -o conversation.json
Export all conversations:
# Export to Excel
perplexity export-all --format excel -o chat_history.xlsx
# Export to JSON
perplexity export-all --format json -o chat_history.json
Create a note:
perplexity note "My note content" --title "My Note" --tags "tag1,tag2"
List notes:
perplexity notes
View a note:
perplexity show-note <note-id>
Search notes:
perplexity search-notes "search query"
- Conversation Tracking: Automatically saves all conversations with timestamps
- Topic Organization: Add topics to conversations for better organization
- Rich Statistics: View detailed statistics about your chat history
- Flexible Export Options: Export conversations in multiple formats
- Markdown: Great for documentation
- JSON: Perfect for data analysis
- Excel: Ideal for spreadsheet analysis
- CSV: Simple tabular format
- Local Storage: All notes are stored locally
- Tag Support: Organize notes with tags
- AI-Powered Search: Find notes using natural language queries
- Markdown Support: Write notes in markdown format
Clone the repository:
git clone https://github.com/yourusername/pplx-cli.git
cd pplx-cli
Install dependencies:
pip install -e .
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.