This plugin provides the perplexity-cli skill for Claude Code, enabling AI-powered question answering with Perplexity.ai directly from the terminal.
Add the plugin-marketplace and install the plugin:
# In Claude Code
/plugin marketplace add jamiemills/plugin-marketplace
/plugin install perplexity-cli@plugin-marketplaceYou can also install directly from the repository:
/plugin marketplace add jamiemills/plugin-marketplace
/plugin install perplexity-cli@plugin-marketplaceThis plugin provides the perplexity-cli skill which Claude Code will automatically invoke when you need:
- Current information or recent events
- Detailed explanations with source references
- Research topics with verified citations
- Structured data parsing in JSON format
Before using this plugin, you need to have perplexity-cli installed and configured.
# Install via npm
npm install -g perplexity-cli
# Or using your package manager of choiceAuthenticate with Perplexity.ai (one-time setup):
# Install Chrome for Testing
npx @puppeteer/browsers install chrome@stable
# Create shell alias (add to ~/.bashrc, ~/.zshrc, etc.)
alias chromefortesting='open ~/.local/bin/chrome/mac_arm-*/chrome-mac-arm64/Google\ Chrome\ for\ Testing.app --args "--remote-debugging-port=9222" "about:blank"'
# Terminal 1: Start Chrome
chromefortesting
# Terminal 2: Authenticate
perplexity-cli authCheck that authentication succeeded:
perplexity-cli statusOnce installed and authenticated, Claude Code will automatically use the perplexity-cli skill when appropriate. You don't need to invoke it manually.
User: What are the latest developments in quantum computing?
Claude: Uses the perplexity-cli skill to fetch current information with source citations.
User: Can you research the main challenges in renewable energy and provide sources?
Claude: Automatically invokes perplexity-cli to get comprehensive answers with verified references.
The skill uses perplexity-cli's JSON output format for reliable parsing:
{
"format_version": "1.0",
"answer": "Comprehensive answer text...",
"references": [
{
"index": 1,
"title": "Source Title",
"url": "https://example.com",
"snippet": "Relevant excerpt..."
}
]
}The skill intelligently selects the appropriate format based on context:
- JSON: For programmatic parsing and structured data
- Plain: For clean text without formatting
- Markdown: For rich terminal output with citations
For real-time responses, the skill can use streaming mode to show results as they arrive.
The skill includes comprehensive error handling for:
- Authentication failures
- Rate limiting
- Network errors
- Token expiration
Run the authentication setup:
perplexity-cli authRe-authenticate with Perplexity:
perplexity-cli authEnsure perplexity-cli is installed globally:
npm install -g perplexity-cliEnable debug output for troubleshooting:
perplexity-cli --debug query "test question"Configure a consistent response style:
# Set style
perplexity-cli configure "be concise and technical"
# View current style
perplexity-cli view-style
# Remove style
perplexity-cli clear-styleIf port 9222 is in use:
perplexity-cli auth --port 9223- Token encrypted at rest using Fernet symmetric encryption
- Encryption key derived from system identifiers
- Token stored with restricted permissions (0600)
- No credentials displayed in logs
- Requires initial authentication with Chrome DevTools Protocol
- Rate limited by Perplexity.ai
- Token bound to your machine (not portable)
- Requires active internet connection
For complete documentation on perplexity-cli commands and options, see:
- SKILL.md - Complete skill documentation
- perplexity-cli GitHub - Full CLI documentation
See CHANGELOG.md for version history and updates.
MIT License - see LICENSE for details.
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check the troubleshooting section above
- Review the complete skill documentation