@plexor-dev/claude-code-plugin 0.1.0-beta.21 → 0.1.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,41 +4,25 @@ description: Configure Plexor settings (user)
4
4
 
5
5
  # Plexor Config
6
6
 
7
- View and modify Plexor configuration. This is an alias for /plexor-settings.
7
+ Run this command to view configuration details:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Read current configuration**
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-config.js
11
+ ```
12
12
 
13
- Use the Read tool to read `~/.plexor/config.json`.
13
+ Options:
14
14
 
15
- If the file doesn't exist, show:
16
- ```
17
- Plexor Config
18
- =============
19
- No configuration found. Run /plexor-login to set up Plexor.
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-config.js --raw # Show raw JSON
17
+ node ~/.claude/plugins/plexor/commands/plexor-config.js --paths # Show file paths
20
18
  ```
21
19
 
22
- **Step 2: Display current configuration**
20
+ Use the Bash tool to execute this command.
23
21
 
24
- ```
25
- Plexor Config
26
- =============
27
- Enabled: [enabled]
28
- API URL: [apiUrl]
29
- API Key: [show "configured" if apiKey exists, otherwise "not configured"]
30
- Mode: [mode]
31
- Provider: [preferredProvider]
32
- Local Cache: [localCacheEnabled]
33
- Timeout: [timeout]ms
34
-
35
- Configuration file: ~/.plexor/config.json
36
-
37
- Other commands:
38
- - /plexor-settings - View/edit all settings
39
- - /plexor-mode - Change optimization mode
40
- - /plexor-provider - Change provider
41
- - /plexor-enabled - Enable/disable proxy
42
- ```
22
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
23
+ - Read any files
24
+ - Explore the codebase
25
+ - Run additional commands
26
+ - Ask follow-up questions
43
27
 
44
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
28
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -4,53 +4,25 @@ description: Enable or disable Plexor proxy (routes all traffic through Plexor A
4
4
 
5
5
  # Plexor Enabled
6
6
 
7
- Toggle Plexor proxy mode on or off.
7
+ Run this command to view or toggle the Plexor proxy:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Read current configuration**
12
-
13
- Use the Read tool to read `~/.plexor/config.json` and check the current `enabled` status.
14
-
15
- **Step 2: Ask user what they want to do**
16
-
17
- Use the `AskUserQuestion` tool to present options:
18
-
19
- Question: "Enable or disable Plexor proxy?"
20
- Header: "Proxy"
21
- Options:
22
- 1. **Enable** - Route traffic through Plexor for optimization (60-90% cost savings)
23
- 2. **Disable** - Direct to Anthropic (no optimization, full price)
24
-
25
- **Step 3: Update the configuration**
26
-
27
- Use the Read tool to get the current config, then use the Write tool to update `~/.plexor/config.json`:
28
- - If **Enable**: Set `"enabled": true`
29
- - If **Disable**: Set `"enabled": false`
30
-
31
- Keep all other settings unchanged.
32
-
33
- **Step 4: Show confirmation**
34
-
35
- If **Enabled**:
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-enabled.js
36
11
  ```
37
- Plexor Proxy: ENABLED
38
12
 
39
- Benefits:
40
- - 60-90% cost reduction via intelligent provider routing
41
- - Automatic selection of Mistral/DeepSeek/Gemini based on task
42
- - Usage tracking and savings analytics
13
+ To enable or disable, pass an argument:
43
14
 
44
- Your prompts will now be routed through Plexor for optimization.
45
- Run /plexor-status to see your savings.
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-enabled.js true
17
+ node ~/.claude/plugins/plexor/commands/plexor-enabled.js false
46
18
  ```
47
19
 
48
- If **Disabled**:
49
- ```
50
- Plexor Proxy: DISABLED
20
+ Use the Bash tool to execute this command.
51
21
 
52
- Your prompts will go directly to Anthropic at full price.
53
- Run /plexor-enabled to re-enable optimization.
54
- ```
22
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
23
+ - Read any files
24
+ - Explore the codebase
25
+ - Run additional commands
26
+ - Ask follow-up questions
55
27
 
56
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
28
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -4,83 +4,24 @@ description: Authenticate with Plexor to enable optimization (user)
4
4
 
5
5
  # Plexor Login
6
6
 
7
- Authenticate with your Plexor account to enable LLM cost optimization.
7
+ Run this command to authenticate with Plexor:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Check existing authentication**
12
-
13
- Use the Read tool to read `~/.plexor/config.json`.
14
-
15
- If the file exists and has `auth.api_key` that starts with "plx_", the user is already authenticated. Show them:
16
- ```
17
- Plexor Login
18
- ============
19
- Already authenticated!
20
- API Key: plx_****[last 4 chars]
21
- API URL: [apiUrl from config]
22
- Status: [Enabled/Disabled]
23
-
24
- Run /plexor-status to see your usage statistics.
25
- Run /plexor-logout to sign out.
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-login.js
26
11
  ```
27
12
 
28
- **Step 2: If not authenticated, ask for API key**
13
+ To login with an API key:
29
14
 
30
- Ask the user to provide their Plexor API key. They can get one from:
31
- - https://plexor.dev/dashboard (if they have an account)
32
- - https://plexor.dev/signup (to create an account)
33
-
34
- Tell them: "Please provide your Plexor API key (starts with 'plx_'):"
35
-
36
- **Step 3: Save the configuration**
37
-
38
- Once the user provides an API key (or it was passed as an argument), use the Write tool to create/update `~/.plexor/config.json`:
39
-
40
- ```json
41
- {
42
- "version": 1,
43
- "auth": {
44
- "api_key": "[user's API key]",
45
- "authenticated_at": "[current ISO timestamp]"
46
- },
47
- "settings": {
48
- "enabled": true,
49
- "apiUrl": "https://api.plexor.dev",
50
- "preferred_provider": "auto",
51
- "mode": "balanced",
52
- "localCacheEnabled": true,
53
- "timeout": 5000
54
- }
55
- }
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-login.js plx_your_api_key_here
56
17
  ```
57
18
 
58
- **IMPORTANT**: If the user provided the API key as an argument (e.g., `/plexor-login plx_abc123`), use that key directly instead of asking for it.
59
-
60
- **Step 4: Verify the key works**
61
-
62
- Make a test request to verify authentication:
63
- ```
64
- GET https://api.plexor.dev/api/users/me
65
- Authorization: Bearer [apiKey]
66
- ```
67
-
68
- If successful, show:
69
- ```
70
- Plexor Login
71
- ============
72
- Authentication successful!
73
-
74
- Your API key has been saved to ~/.plexor/config.json
75
-
76
- Next steps:
77
- 1. Run /plexor-status to see your usage
78
- 2. Run /plexor-enabled true to enable the proxy
79
- 3. Start saving on LLM costs!
80
-
81
- Dashboard: https://plexor.dev/dashboard
82
- ```
19
+ Use the Bash tool to execute this command.
83
20
 
84
- If the API call fails, tell the user the key may be invalid and ask them to check it.
21
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
22
+ - Read any files
23
+ - Explore the codebase
24
+ - Run additional commands
25
+ - Ask follow-up questions
85
26
 
86
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
27
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -4,41 +4,24 @@ description: Log out from Plexor and clear credentials (user)
4
4
 
5
5
  # Plexor Logout
6
6
 
7
- Log out from your Plexor account and clear stored credentials.
7
+ Run this command to log out and clear credentials:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Read current configuration**
12
-
13
- Use the Read tool to read `~/.plexor/config.json`.
14
-
15
- If the file doesn't exist or has no `apiKey`, show:
16
- ```
17
- Plexor Logout
18
- =============
19
- You are not currently logged in.
20
- Run /plexor-login to authenticate.
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-logout.js
21
11
  ```
22
12
 
23
- **Step 2: Clear the API key**
24
-
25
- If authenticated, use the Write tool to update `~/.plexor/config.json`:
26
- - Remove or clear the `apiKey` field (set to empty string "")
27
- - Keep all other settings (mode, preferredProvider, etc.)
28
-
29
- **Step 3: Show confirmation**
13
+ To also clear the cache:
30
14
 
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-logout.js --clear-cache
31
17
  ```
32
- Plexor Logout
33
- =============
34
- Successfully logged out!
35
18
 
36
- - API key cleared from ~/.plexor/config.json
37
- - Settings preserved (mode, provider preferences)
19
+ Use the Bash tool to execute this command.
38
20
 
39
- To use Plexor again, run /plexor-login
40
-
41
- Dashboard: https://plexor.dev/dashboard
42
- ```
21
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
22
+ - Read any files
23
+ - Explore the codebase
24
+ - Run additional commands
25
+ - Ask follow-up questions
43
26
 
44
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
27
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -4,46 +4,24 @@ description: Set Plexor optimization mode (eco/balanced/quality/passthrough) (us
4
4
 
5
5
  # Plexor Mode
6
6
 
7
- Set the Plexor optimization mode to control cost vs quality trade-offs.
7
+ Run this command to view or set the optimization mode:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Read current configuration**
12
-
13
- Use the Read tool to read `~/.plexor/config.json` and check the current `mode` setting.
14
-
15
- **Step 2: Ask user which mode they want**
16
-
17
- Use the `AskUserQuestion` tool:
18
-
19
- Question: "Which optimization mode would you like to use?"
20
- Header: "Mode"
21
- Options:
22
- 1. **eco** - Maximum savings (~$0.04/1M tokens) - Uses Ministral 3B
23
- 2. **balanced** - Good balance (~$0.15/1M) - DeepSeek, Gemini Flash, Mistral Small
24
- 3. **quality** - Premium models (~$5/1M) - Claude Opus, Gemini Pro, Mistral Large
25
- 4. **passthrough** - No optimization - Direct to requested model
26
-
27
- **Step 3: Update the configuration**
28
-
29
- Use the Read tool to get the current config, then use the Write tool to update `~/.plexor/config.json`:
30
- - Set the `mode` field to the selected value: "eco", "balanced", "quality", or "passthrough"
31
-
32
- Keep all other settings unchanged.
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-mode.js
11
+ ```
33
12
 
34
- **Step 4: Show confirmation**
13
+ To set a specific mode, pass it as an argument:
35
14
 
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-mode.js balanced
36
17
  ```
37
- Plexor Mode: [SELECTED MODE]
38
18
 
39
- Mode Details:
40
- - eco: Maximum cost savings using Ministral 3B ($0.04/$0.04 per 1M tokens)
41
- - balanced: Cost-first with quality fallbacks (DeepSeek → Gemini Flash → Mistral)
42
- - quality: Premium models for complex tasks (Claude Opus, Gemini Pro)
43
- - passthrough: No optimization, direct to Anthropic
19
+ Use the Bash tool to execute this command.
44
20
 
45
- Current mode: [mode]
46
- Run /plexor-status to see your savings.
47
- ```
21
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
22
+ - Read any files
23
+ - Explore the codebase
24
+ - Run additional commands
25
+ - Ask follow-up questions
48
26
 
49
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
27
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -4,46 +4,24 @@ description: Force a specific LLM provider (claude/openai/deepseek/mistral/gemin
4
4
 
5
5
  # Plexor Provider
6
6
 
7
- Set your preferred LLM provider for Plexor routing.
7
+ Run this command to view or set the preferred provider:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Read current configuration**
12
-
13
- Use the Read tool to read `~/.plexor/config.json` and check the current `preferredProvider` setting.
14
-
15
- **Step 2: Ask user which provider they prefer**
16
-
17
- Use the `AskUserQuestion` tool:
18
-
19
- Question: "Which LLM provider would you prefer?"
20
- Header: "Provider"
21
- Options:
22
- 1. **auto** - Let Plexor choose the best provider based on task (Recommended)
23
- 2. **deepseek** - Use DeepSeek models (cheapest, good for code)
24
- 3. **mistral** - Use Mistral models (fast, good balance)
25
- 4. **gemini** - Use Google Gemini models (good for analysis)
26
-
27
- **Step 3: Update the configuration**
28
-
29
- Use the Read tool to get the current config, then use the Write tool to update `~/.plexor/config.json`:
30
- - Set `preferredProvider` to: "auto", "deepseek", "mistral", or "gemini"
31
-
32
- Keep all other settings unchanged.
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-provider.js
11
+ ```
33
12
 
34
- **Step 4: Show confirmation**
13
+ To set a specific provider:
35
14
 
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-provider.js deepseek
36
17
  ```
37
- Plexor Provider: [SELECTED PROVIDER]
38
18
 
39
- Provider options:
40
- - auto: Plexor automatically selects the best provider for each task
41
- - deepseek: DeepSeek models ($0.14/$0.28 per 1M tokens) - Great for code
42
- - mistral: Mistral models ($0.10/$0.30 per 1M tokens) - Fast and versatile
43
- - gemini: Google Gemini ($0.075/$0.30 per 1M tokens) - Good for analysis
19
+ Use the Bash tool to execute this command.
44
20
 
45
- Current provider: [preferredProvider]
46
- Run /plexor-status to see your usage.
47
- ```
21
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
22
+ - Read any files
23
+ - Explore the codebase
24
+ - Run additional commands
25
+ - Ask follow-up questions
48
26
 
49
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
27
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -4,57 +4,25 @@ description: Configure Plexor settings (API URL, mode, provider preferences) (us
4
4
 
5
5
  # Plexor Settings
6
6
 
7
- View and configure all Plexor settings.
7
+ Run this command to view or update settings:
8
8
 
9
- ## Steps
10
-
11
- **Step 1: Read current configuration**
12
-
13
- Use the Read tool to read `~/.plexor/config.json`.
14
-
15
- If the file doesn't exist, show:
16
- ```
17
- Plexor Settings
18
- ===============
19
- No configuration found. Run /plexor-login to set up Plexor.
9
+ ```bash
10
+ node ~/.claude/plugins/plexor/commands/plexor-settings.js
20
11
  ```
21
12
 
22
- **Step 2: Display current settings**
13
+ To update a setting:
23
14
 
24
- Show the current configuration:
25
-
26
- ```
27
- Plexor Settings
28
- ===============
29
- Enabled: [enabled - true/false]
30
- API URL: [apiUrl]
31
- API Key: plx_****[last 4 chars] (configured/not configured)
32
- Mode: [mode]
33
- Provider: [preferredProvider]
34
- Local Cache: [localCacheEnabled - enabled/disabled]
35
- Timeout: [timeout]ms
36
-
37
- Quick Commands:
38
- - /plexor-enabled - Toggle proxy on/off
39
- - /plexor-mode - Change optimization mode
40
- - /plexor-provider - Change provider preference
41
- - /plexor-status - View usage statistics
42
-
43
- Dashboard: https://plexor.dev/dashboard
15
+ ```bash
16
+ node ~/.claude/plugins/plexor/commands/plexor-settings.js cache true
17
+ node ~/.claude/plugins/plexor/commands/plexor-settings.js timeout 10000
44
18
  ```
45
19
 
46
- **Step 3: If user wants to change a setting**
47
-
48
- If the user specifies they want to change something, use the `AskUserQuestion` tool:
49
-
50
- Question: "Which setting would you like to change?"
51
- Header: "Setting"
52
- Options:
53
- 1. **API URL** - Change the Plexor API endpoint
54
- 2. **Mode** - Change optimization mode (eco/balanced/quality)
55
- 3. **Provider** - Change preferred provider
56
- 4. **Timeout** - Change request timeout
20
+ Use the Bash tool to execute this command.
57
21
 
58
- Then update `~/.plexor/config.json` with the new value using the Write tool.
22
+ **IMPORTANT**: After running this command and displaying the output, STOP. Do not:
23
+ - Read any files
24
+ - Explore the codebase
25
+ - Run additional commands
26
+ - Ask follow-up questions
59
27
 
60
- **IMPORTANT**: After completing the task, STOP. Do not run additional commands or explore the codebase.
28
+ The command output is the complete response. Simply show the output and wait for the user's next input.
@@ -31,7 +31,7 @@ class PlexorClient {
31
31
  'Content-Type': 'application/json',
32
32
  'X-API-Key': this.apiKey,
33
33
  'X-Plexor-Key': this.apiKey,
34
- 'User-Agent': 'plexor-claude-code-plugin/0.1.0-beta.21'
34
+ 'User-Agent': 'plexor-claude-code-plugin/0.1.0-beta.22'
35
35
  },
36
36
  timeout: this.timeout
37
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexor-dev/claude-code-plugin",
3
- "version": "0.1.0-beta.21",
3
+ "version": "0.1.0-beta.22",
4
4
  "description": "LLM cost optimization plugin for Claude Code - Save up to 90% on AI costs",
5
5
  "main": "lib/constants.js",
6
6
  "bin": {