# Perplexity CLI
A command-line interface for interacting with Perplexity AI's API, featuring chat history management, note-taking, and AI search capabilities.
## Features
- 🤖 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)
## Installation
```bash
pip install pplx-cli
```
## Configuration
Set up your Perplexity API key:
```bash
perplexity setup
```
Or set the environment variable:
```bash
export PERPLEXITY_API_KEY='your-api-key'
```
## Usage
### Basic Commands
Ask a question:
```bash
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:
```bash
perplexity list-models
```
### Chat History Management
View chat history:
```bash
perplexity history
```
Show detailed chat statistics:
```bash
perplexity chat-stats
```
View a specific conversation:
```bash
perplexity show-chat <conversation-id>
```
Export a conversation:
```bash
# 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:
```bash
# Export to Excel
perplexity export-all --format excel -o chat_history.xlsx
# Export to JSON
perplexity export-all --format json -o chat_history.json
```
### Note Management
Create a note:
```bash
perplexity note "My note content" --title "My Note" --tags "tag1,tag2"
```
List notes:
```bash
perplexity notes
```
View a note:
```bash
perplexity show-note <note-id>
```
Search notes:
```bash
perplexity search-notes "search query"
```
## Features in Detail
### Chat History Features
- **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
### Note-Taking Features
- **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
## Development
Clone the repository:
```bash
git clone https://github.com/yourusername/pplx-cli.git
cd pplx-cli
```
Install dependencies:
```bash
pip install -e .
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/xerexcoded/pplx-cli",
"name": "pplx-cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "perplexity, ai, cli, llm",
"author": "xerexcoded",
"author_email": "arnavbanerjee61@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8f/a7/918389cef9bef935836bdde9b681ed9f1652e1530f1b7b62bb037988014b/pplx_cli-0.1.5.tar.gz",
"platform": null,
"description": "# Perplexity CLI\n\nA command-line interface for interacting with Perplexity AI's API, featuring chat history management, note-taking, and AI search capabilities.\n\n## Features\n\n- \ud83e\udd16 Direct interaction with Perplexity AI models\n- \ud83d\udcdd Local note-taking with AI-powered search\n- \ud83d\udcac Comprehensive chat history management\n- \ud83d\udcca Conversation analytics and statistics\n- \ud83d\udce4 Multiple export formats (Markdown, JSON, Excel)\n\n## Installation\n\n```bash\npip install pplx-cli\n```\n\n## Configuration\n\nSet up your Perplexity API key:\n\n```bash\nperplexity setup\n```\n\nOr set the environment variable:\n\n```bash\nexport PERPLEXITY_API_KEY='your-api-key'\n```\n\n## Usage\n\n### Basic Commands\n\nAsk a question:\n```bash\nperplexity ask \"What is the capital of France?\"\n\n# With a topic\nperplexity ask \"What are the main differences between Python lists and tuples?\" --topic programming\n```\n\nList available models:\n```bash\nperplexity list-models\n```\n\n### Chat History Management\n\nView chat history:\n```bash\nperplexity history\n```\n\nShow detailed chat statistics:\n```bash\nperplexity chat-stats\n```\n\nView a specific conversation:\n```bash\nperplexity show-chat <conversation-id>\n```\n\nExport a conversation:\n```bash\n# Export to markdown\nperplexity export-chat <conversation-id> --format markdown -o conversation.md\n\n# Export to JSON\nperplexity export-chat <conversation-id> --format json -o conversation.json\n```\n\nExport all conversations:\n```bash\n# Export to Excel\nperplexity export-all --format excel -o chat_history.xlsx\n\n# Export to JSON\nperplexity export-all --format json -o chat_history.json\n```\n\n### Note Management\n\nCreate a note:\n```bash\nperplexity note \"My note content\" --title \"My Note\" --tags \"tag1,tag2\"\n```\n\nList notes:\n```bash\nperplexity notes\n```\n\nView a note:\n```bash\nperplexity show-note <note-id>\n```\n\nSearch notes:\n```bash\nperplexity search-notes \"search query\"\n```\n\n## Features in Detail\n\n### Chat History Features\n\n- **Conversation Tracking**: Automatically saves all conversations with timestamps\n- **Topic Organization**: Add topics to conversations for better organization\n- **Rich Statistics**: View detailed statistics about your chat history\n- **Flexible Export Options**: Export conversations in multiple formats\n - Markdown: Great for documentation\n - JSON: Perfect for data analysis\n - Excel: Ideal for spreadsheet analysis\n - CSV: Simple tabular format\n\n### Note-Taking Features\n\n- **Local Storage**: All notes are stored locally\n- **Tag Support**: Organize notes with tags\n- **AI-Powered Search**: Find notes using natural language queries\n- **Markdown Support**: Write notes in markdown format\n\n## Development\n\nClone the repository:\n```bash\ngit clone https://github.com/yourusername/pplx-cli.git\ncd pplx-cli\n```\n\nInstall dependencies:\n```bash\npip install -e .\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "A command-line notes and RAG interface for Perplexity AI API",
"version": "0.1.5",
"project_urls": {
"Documentation": "https://github.com/xerexcoded/pplx-cli#readme",
"Homepage": "https://github.com/xerexcoded/pplx-cli",
"Repository": "https://github.com/xerexcoded/pplx-cli"
},
"split_keywords": [
"perplexity",
" ai",
" cli",
" llm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "84e1e2db9611d23651251fbf25a8b8bd050162aeaf51f70070492dd4f5eccb65",
"md5": "0e0841e75218550e1c8254bc854d3adc",
"sha256": "c73fc967e9cd879fb3026ac7e25b469e3a431f049e1110d6619ef7cff0b1154e"
},
"downloads": -1,
"filename": "pplx_cli-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0e0841e75218550e1c8254bc854d3adc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 14821,
"upload_time": "2024-12-02T22:44:32",
"upload_time_iso_8601": "2024-12-02T22:44:32.678190Z",
"url": "https://files.pythonhosted.org/packages/84/e1/e2db9611d23651251fbf25a8b8bd050162aeaf51f70070492dd4f5eccb65/pplx_cli-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8fa7918389cef9bef935836bdde9b681ed9f1652e1530f1b7b62bb037988014b",
"md5": "4e4b2fd92379111ca42f3c8501213b17",
"sha256": "8f0cc46734d70c869abab8eeb0aeb8f83ec172262ad543018099b6d3671941e5"
},
"downloads": -1,
"filename": "pplx_cli-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "4e4b2fd92379111ca42f3c8501213b17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 13425,
"upload_time": "2024-12-02T22:44:34",
"upload_time_iso_8601": "2024-12-02T22:44:34.081757Z",
"url": "https://files.pythonhosted.org/packages/8f/a7/918389cef9bef935836bdde9b681ed9f1652e1530f1b7b62bb037988014b/pplx_cli-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 22:44:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xerexcoded",
"github_project": "pplx-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pplx-cli"
}