@plexor-dev/plexr
v2.0.15
Published
Plexor CLI - Sync Claude MAX OAuth tokens to Plexor API
Downloads
1,446
Maintainers
Readme
plexr
Plexor CLI - LLM gateway, prompt optimization, and developer tools.
Installation
npm install -g @plexor-dev/plexrQuick Start
# Set your API key
export PLEXOR_API_KEY="plx_user0_your_key_here"
# Send a prompt
plexr prompt "Explain recursion in one sentence"
# List available models
plexr models
# Check usage & savings
plexr usageCommands
LLM Gateway
plexr prompt <text>
Send a prompt to Plexor's LLM gateway.
# Basic prompt
plexr prompt "What is the capital of France?"
# With specific model
plexr prompt "Write a haiku" --model gpt-4o
# With system prompt
plexr prompt "Translate to Spanish" --system "You are a translator"
# JSON output
plexr prompt "List 3 colors" --json
# With optimization (compression)
plexr prompt "Long prompt here..." --optimizeOptions:
-m, --model <model>- Model to use (default: claude-sonnet-4-20250514)-o, --optimize- Apply prompt compression--max-tokens <n>- Max response tokens (default: 4096)-t, --temperature <n>- Temperature 0.0-1.0 (default: 0.7)--system <prompt>- System prompt--json- Output raw JSON
plexr models
List all available models grouped by provider.
plexr models
plexr models --jsonplexr usage
Show usage statistics and cost savings.
plexr usage
plexr usage --jsonToken Sync (Claude MAX)
Sync your Claude MAX OAuth token to Plexor, enabling the platform to use your MAX subscription.
plexr sync
One-time sync of your Claude MAX token.
plexr sync
plexr sync --force # Force sync even if unchangedplexr status
Show token and sync status.
plexr statusplexr watch
Continuously watch for token changes and auto-sync.
plexr watch
plexr watch --interval 60 # Check every 60 secondsplexr clear-cache
Clear the local sync cache.
plexr clear-cacheConfiguration
Environment Variables
| Variable | Required | Description | Default |
|----------|----------|-------------|---------|
| PLEXOR_API_KEY | Yes | Your Plexor API key | - |
| PLEXOR_API_URL | No | API endpoint | https://staging.api.plexor.dev |
Setting API Key
Linux/macOS:
echo 'export PLEXOR_API_KEY="plx_user0_your_key"' >> ~/.bashrc
source ~/.bashrcWindows PowerShell:
[Environment]::SetEnvironmentVariable("PLEXOR_API_KEY", "plx_user0_your_key", "User")Daemon Setup (Token Sync)
For automatic token sync, run plexr as a background service.
Linux (systemd)
# Install service
mkdir -p ~/.config/systemd/user
curl -o ~/.config/systemd/user/plexr.service \
https://raw.githubusercontent.com/micoverde/plex-vc-fund-platform/main/scripts/plexr.service
# Enable and start
systemctl --user daemon-reload
systemctl --user enable --now plexr.service
# Check logs
journalctl --user -u plexr.service -fmacOS (launchd)
# Create plist at ~/Library/LaunchAgents/com.plexor.plexr.plist
# Then load:
launchctl load ~/Library/LaunchAgents/com.plexor.plexr.plistCron (simple)
# Sync every 30 minutes
*/30 * * * * PLEXOR_API_KEY=plx_xxx plexr sync >> /tmp/plexr.log 2>&1Examples
Daily workflow
# Morning: check your usage
plexr usage
# Work: send prompts
plexr prompt "Review this code: $(cat myfile.py)"
# Quick questions
plexr prompt "What's the time complexity of quicksort?"Scripting
# Pipe input
echo "Summarize this" | xargs plexr prompt
# JSON for parsing
plexr prompt "List 5 programming languages" --json | jq '.content'
# Batch processing
for file in *.txt; do
plexr prompt "Summarize: $(cat $file)" >> summaries.txt
doneSupported Models
Run plexr models to see all available models. Includes:
- Anthropic: Claude Opus, Sonnet, Haiku (3.5, 4.0, 4.5)
- OpenAI: GPT-4o, GPT-4 Turbo, o1, o3
- DeepSeek: deepseek-chat, deepseek-reasoner
- Mistral: mistral-large, codestral
- Google: Gemini 2.0, 2.5, 3.0
License
MIT - Plexor Inc.
