ccenv-cli 1.0.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 bhadraagada
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,206 @@
1
+ # Claude Env (ccx)
2
+
3
+ **Environment Orchestrator and Context Switcher for Claude Code CLI**
4
+
5
+ Switch AI backends with a single command. Like `nvm` for Node.js, but for your Claude Code AI provider.
6
+
7
+ ## Why?
8
+
9
+ Every time you want to switch Claude Code from the official Anthropic API to OpenRouter, DeepSeek, or a local Ollama instance, you have to manually set environment variables. This tool eliminates that friction by letting you:
10
+
11
+ - Save provider configurations as **profiles**
12
+ - Switch between them with a single command
13
+ - Keep your API keys encrypted and secure
14
+ - Support multiple shells (bash, zsh, fish, PowerShell, cmd)
15
+
16
+ **Zero server required** - Unlike proxy-based solutions, ccx just manages environment variables.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install -g ccenv-cli
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ### 1. Create a profile
27
+
28
+ ```bash
29
+ # Using a template
30
+ ccx create work --template openrouter --api-key sk-or-xxxxx
31
+
32
+ # Or use the interactive wizard
33
+ ccx setup
34
+ ```
35
+
36
+ ### 2. Activate the profile
37
+
38
+ ```bash
39
+ # Bash/Zsh
40
+ eval "$(ccx use work)"
41
+
42
+ # PowerShell
43
+ Invoke-Expression (ccx use work --shell powershell)
44
+
45
+ # Fish
46
+ ccx use work --shell fish | source
47
+ ```
48
+
49
+ ### 3. Run Claude Code
50
+
51
+ ```bash
52
+ claude
53
+ ```
54
+
55
+ That's it! Claude Code will now route through OpenRouter.
56
+
57
+ ### 4. Switch back to official Anthropic
58
+
59
+ ```bash
60
+ eval "$(ccx use official)"
61
+ # or
62
+ eval "$(ccx reset)"
63
+ ```
64
+
65
+ ## Commands
66
+
67
+ | Command | Description |
68
+ |---------|-------------|
69
+ | `ccx list` | List all profiles |
70
+ | `ccx show <name>` | Show profile details |
71
+ | `ccx create <name>` | Create a new profile |
72
+ | `ccx edit <name>` | Edit an existing profile |
73
+ | `ccx delete <name>` | Delete a profile |
74
+ | `ccx use <name>` | Activate a profile (outputs shell script) |
75
+ | `ccx reset` | Reset environment to default |
76
+ | `ccx current` | Show current profile status |
77
+ | `ccx templates` | List available provider templates |
78
+ | `ccx setup` | Interactive profile setup wizard |
79
+ | `ccx export <name>` | Export profile as JSON |
80
+ | `ccx import <json>` | Import profile from JSON |
81
+
82
+ ## Available Templates
83
+
84
+ | Template | Description | Default Model |
85
+ |----------|-------------|---------------|
86
+ | `official` | Anthropic Official API | claude-sonnet-4-20250514 |
87
+ | `openrouter` | OpenRouter multi-model | anthropic/claude-sonnet-4 |
88
+ | `openrouter-minimax` | MiniMax via OpenRouter | minimax/minimax-m1-80k |
89
+ | `openrouter-deepseek` | DeepSeek via OpenRouter | deepseek/deepseek-chat-v3-0324 |
90
+ | `deepseek` | DeepSeek Direct API | deepseek-chat |
91
+ | `gemini` | Google Gemini | gemini-2.5-flash |
92
+ | `ollama` | Local Ollama | qwen2.5-coder:latest |
93
+ | `lmstudio` | Local LM Studio | local-model |
94
+ | `groq` | Groq fast inference | llama-3.3-70b-versatile |
95
+ | `together` | Together AI | Meta-Llama-3.1-70B |
96
+ | `custom` | Custom endpoint | (your choice) |
97
+
98
+ ## Examples
99
+
100
+ ### Create profiles for different use cases
101
+
102
+ ```bash
103
+ # High-stakes work with official Claude
104
+ ccx create pro --template official
105
+
106
+ # Budget-friendly coding with DeepSeek
107
+ ccx create budget --template openrouter-deepseek --api-key sk-or-xxxxx
108
+
109
+ # Local offline mode
110
+ ccx create local --template ollama
111
+
112
+ # Custom provider
113
+ ccx create myproxy --base-url http://localhost:8080/v1 --api-key my-key --model gpt-4
114
+ ```
115
+
116
+ ### Shell integration (add to .bashrc/.zshrc)
117
+
118
+ ```bash
119
+ # Function to switch profiles easily
120
+ ccx-switch() {
121
+ eval "$(ccx use $1)"
122
+ echo "Switched to profile: $1"
123
+ }
124
+
125
+ # Aliases
126
+ alias cc-pro='ccx-switch pro'
127
+ alias cc-budget='ccx-switch budget'
128
+ alias cc-local='ccx-switch local'
129
+ alias cc-reset='eval "$(ccx reset)"'
130
+ ```
131
+
132
+ ### PowerShell integration (add to $PROFILE)
133
+
134
+ ```powershell
135
+ function Switch-Claude {
136
+ param([string]$Profile)
137
+ Invoke-Expression (ccx use $Profile --shell powershell)
138
+ Write-Host "Switched to profile: $Profile"
139
+ }
140
+
141
+ Set-Alias cc-switch Switch-Claude
142
+ ```
143
+
144
+ ## How It Works
145
+
146
+ 1. **Profiles are stored** in `~/.config/claude-env/config.json` (cross-platform via `conf`)
147
+ 2. **API keys are encrypted** using AES-256 with a machine-specific key
148
+ 3. **`ccx use`** outputs shell-specific export commands for `eval`
149
+ 4. **Environment variables set:**
150
+ - `ANTHROPIC_BASE_URL` - The API endpoint
151
+ - `ANTHROPIC_AUTH_TOKEN` - Your API key
152
+ - `ANTHROPIC_MODEL` - The model to use
153
+ - `ANTHROPIC_API_KEY` - Unset when using proxies (important!)
154
+ - `CCX_ACTIVE_PROFILE` - Tracks the active profile
155
+
156
+ ## Security
157
+
158
+ - API keys are encrypted at rest using AES-256-CBC
159
+ - Encryption key is derived from machine-specific info (hostname + username)
160
+ - Keys are never logged or exposed in plain text
161
+ - Export command excludes API keys by default
162
+
163
+ ## Comparison with claude-code-router
164
+
165
+ | Feature | ccx | claude-code-router |
166
+ |---------|-----|-------------------|
167
+ | Architecture | Env vars only | Local proxy server |
168
+ | Background process | No | Yes |
169
+ | Profile switching | Instant | Requires restart |
170
+ | Request routing | N/A | Yes (background/think/etc) |
171
+ | Custom transformers | N/A | Yes |
172
+ | Complexity | Low | High |
173
+
174
+ **Use ccx if:** You want simple, fast profile switching without running a server.
175
+
176
+ **Use claude-code-router if:** You need advanced request routing or custom transformers.
177
+
178
+ ## Troubleshooting
179
+
180
+ ### "Profile not taking effect"
181
+
182
+ Make sure you're using `eval`:
183
+ ```bash
184
+ # Wrong
185
+ ccx use work
186
+
187
+ # Right
188
+ eval "$(ccx use work)"
189
+ ```
190
+
191
+ ### "Shell not detected correctly"
192
+
193
+ Specify the shell explicitly:
194
+ ```bash
195
+ ccx use work --shell zsh
196
+ ```
197
+
198
+ ### "Config file location"
199
+
200
+ ```bash
201
+ ccx config-path
202
+ ```
203
+
204
+ ## License
205
+
206
+ MIT
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env node
2
+ // Claude Env (ccx) - Environment Orchestrator for Claude Code CLI
3
+ import { Command } from 'commander';
4
+ import { listProfiles, showProfile, createProfile, editProfile, deleteProfileCommand, useProfile, resetEnvironment, showCurrent, showTemplates, exportProfile, importProfile } from './commands/profile.js';
5
+ import { runSetupWizard, runQuickSetup } from './commands/wizard.js';
6
+ import { getConfigPath } from './lib/config.js';
7
+ const program = new Command();
8
+ program
9
+ .name('ccx')
10
+ .description('Environment Orchestrator and Context Switcher for Claude Code CLI')
11
+ .version('1.0.0');
12
+ // List all profiles
13
+ program
14
+ .command('list')
15
+ .alias('ls')
16
+ .description('List all profiles')
17
+ .action(listProfiles);
18
+ // Show a specific profile
19
+ program
20
+ .command('show <name>')
21
+ .description('Show profile details')
22
+ .action(showProfile);
23
+ // Create a new profile
24
+ program
25
+ .command('create <name>')
26
+ .description('Create a new profile')
27
+ .option('-t, --template <template>', 'Use a provider template')
28
+ .option('-u, --base-url <url>', 'API base URL')
29
+ .option('-m, --model <model>', 'Default model')
30
+ .option('-k, --api-key <key>', 'API key')
31
+ .option('-d, --description <desc>', 'Profile description')
32
+ .option('--clear-key', 'Unset ANTHROPIC_API_KEY when using this profile', true)
33
+ .option('--no-clear-key', 'Keep ANTHROPIC_API_KEY when using this profile')
34
+ .action((name, options) => {
35
+ createProfile(name, {
36
+ template: options.template,
37
+ baseUrl: options.baseUrl,
38
+ model: options.model,
39
+ apiKey: options.apiKey,
40
+ description: options.description,
41
+ clearKey: options.clearKey
42
+ });
43
+ });
44
+ // Edit an existing profile
45
+ program
46
+ .command('edit <name>')
47
+ .description('Edit an existing profile')
48
+ .option('-u, --base-url <url>', 'API base URL')
49
+ .option('-m, --model <model>', 'Default model')
50
+ .option('-k, --api-key <key>', 'API key')
51
+ .option('-d, --description <desc>', 'Profile description')
52
+ .option('--clear-key', 'Unset ANTHROPIC_API_KEY when using this profile')
53
+ .option('--no-clear-key', 'Keep ANTHROPIC_API_KEY when using this profile')
54
+ .action((name, options) => {
55
+ editProfile(name, {
56
+ baseUrl: options.baseUrl,
57
+ model: options.model,
58
+ apiKey: options.apiKey,
59
+ description: options.description,
60
+ clearKey: options.clearKey
61
+ });
62
+ });
63
+ // Delete a profile
64
+ program
65
+ .command('delete <name>')
66
+ .alias('rm')
67
+ .description('Delete a profile')
68
+ .option('-f, --force', 'Force deletion without confirmation')
69
+ .action((name, options) => {
70
+ deleteProfileCommand(name, options.force);
71
+ });
72
+ // Use/activate a profile (outputs shell script for eval)
73
+ program
74
+ .command('use <name>')
75
+ .description('Activate a profile (use with eval)')
76
+ .option('-s, --shell <shell>', 'Shell type: bash, zsh, fish, powershell, cmd')
77
+ .action((name, options) => {
78
+ useProfile(name, options.shell);
79
+ });
80
+ // Reset to default (unset all ccx env vars)
81
+ program
82
+ .command('reset')
83
+ .description('Reset environment to default (use with eval)')
84
+ .option('-s, --shell <shell>', 'Shell type: bash, zsh, fish, powershell, cmd')
85
+ .action((options) => {
86
+ resetEnvironment(options.shell);
87
+ });
88
+ // Show current status
89
+ program
90
+ .command('current')
91
+ .alias('status')
92
+ .description('Show current profile and environment status')
93
+ .action(showCurrent);
94
+ // Show available templates
95
+ program
96
+ .command('templates')
97
+ .description('List available provider templates')
98
+ .action(showTemplates);
99
+ // Interactive setup wizard
100
+ program
101
+ .command('setup')
102
+ .description('Interactive profile setup wizard')
103
+ .option('-t, --template <template>', 'Quick setup with a specific template')
104
+ .action(async (options) => {
105
+ if (options.template) {
106
+ await runQuickSetup(options.template);
107
+ }
108
+ else {
109
+ await runSetupWizard();
110
+ }
111
+ });
112
+ // Export a profile (without API key)
113
+ program
114
+ .command('export <name>')
115
+ .description('Export profile as JSON (without API key)')
116
+ .action(exportProfile);
117
+ // Import a profile
118
+ program
119
+ .command('import <json>')
120
+ .description('Import profile from JSON')
121
+ .option('-n, --name <name>', 'Override profile name')
122
+ .action((json, options) => {
123
+ importProfile(json, options.name);
124
+ });
125
+ // Show config file path
126
+ program
127
+ .command('config-path')
128
+ .description('Show configuration file path')
129
+ .action(() => {
130
+ console.log(getConfigPath());
131
+ });
132
+ // Quick alias commands for common operations
133
+ program
134
+ .command('official')
135
+ .description('Quick switch to official Anthropic (creates profile if needed)')
136
+ .action(async () => {
137
+ const { profileExists } = await import('./lib/config.js');
138
+ if (!profileExists('official')) {
139
+ createProfile('official', { template: 'official' });
140
+ }
141
+ useProfile('official');
142
+ });
143
+ program
144
+ .command('openrouter')
145
+ .description('Quick setup/switch to OpenRouter')
146
+ .action(async () => {
147
+ const { profileExists } = await import('./lib/config.js');
148
+ if (!profileExists('openrouter')) {
149
+ await runQuickSetup('openrouter');
150
+ }
151
+ else {
152
+ useProfile('openrouter');
153
+ }
154
+ });
155
+ // Run Claude with a specific profile
156
+ program
157
+ .command('run [name]')
158
+ .description('Activate profile and launch Claude Code directly')
159
+ .option('-p, --profile <name>', 'Profile to use')
160
+ .action(async (name, options) => {
161
+ const profileName = name || options.profile;
162
+ const { runWithProfile, runReset } = await import('./commands/profile.js');
163
+ if (profileName) {
164
+ await runWithProfile(profileName);
165
+ }
166
+ else {
167
+ await runReset();
168
+ }
169
+ });
170
+ // Parse and execute
171
+ program.parse();
172
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,kEAAkE;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,KAAK,CAAC;KACX,WAAW,CAAC,mEAAmE,CAAC;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,cAAc,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAE3E,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,cAAc,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;SAAM,CAAC;QACN,MAAM,QAAQ,EAAE,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,oBAAoB;AACpB,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { ShellType } from '../types.js';
2
+ export declare function listProfiles(): void;
3
+ export declare function showProfile(name: string): void;
4
+ export declare function createProfile(name: string, options: {
5
+ template?: string;
6
+ baseUrl?: string;
7
+ model?: string;
8
+ apiKey?: string;
9
+ description?: string;
10
+ clearKey?: boolean;
11
+ }): void;
12
+ export declare function editProfile(name: string, options: {
13
+ baseUrl?: string;
14
+ model?: string;
15
+ apiKey?: string;
16
+ description?: string;
17
+ clearKey?: boolean;
18
+ }): void;
19
+ export declare function deleteProfileCommand(name: string, force?: boolean): void;
20
+ export declare function useProfile(name: string, shell?: ShellType): void;
21
+ export declare function resetEnvironment(shell?: ShellType): void;
22
+ export declare function showCurrent(): void;
23
+ export declare function showTemplates(): void;
24
+ export declare function exportProfile(name: string): void;
25
+ export declare function importProfile(jsonStr: string, name?: string): void;
26
+ export declare function runWithProfile(name: string): Promise<void>;
27
+ export declare function runReset(): Promise<void>;
28
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/commands/profile.ts"],"names":[],"mappings":"AAKA,OAAO,EAAW,SAAS,EAAE,MAAM,aAAa,CAAC;AAGjD,wBAAgB,YAAY,IAAI,IAAI,CAgCnC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAoB9C;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IACP,QAAQ,CAAC,EA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