cc-hub-cli 1.0.2 → 1.0.4

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/README.md CHANGED
@@ -45,12 +45,9 @@ cc-hub profile default <name> # Set default
45
45
  Launch Claude Code with a profile's credentials injected as environment variables.
46
46
 
47
47
  ```bash
48
- # Set a profile as default (no launch)
48
+ # Set a profile as default
49
49
  cc-hub use <name>
50
50
 
51
- # Launch Claude Code with a profile
52
- cc-hub use <name> [extra args...]
53
-
54
51
  # Launch using the default profile
55
52
  cc-hub run [extra args...]
56
53
 
@@ -58,7 +55,7 @@ cc-hub run [extra args...]
58
55
  cc-hub run <name> [extra args...]
59
56
  ```
60
57
 
61
- `run` and `use` exec into the `claude` CLI with `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_BASE_URL`, and `--model` set from the profile.
58
+ `run` execs into the `claude` CLI with `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_BASE_URL`, and `--model` set from the profile.
62
59
 
63
60
  ### Hook
64
61
 
package/dist/index.js CHANGED
@@ -152,21 +152,16 @@ function execClaude(profileName, p, extraArgs) {
152
152
  process.exit(result.status ?? 1);
153
153
  }
154
154
  function useCommand() {
155
- return new Command("use").description("Launch Claude Code with a saved profile (or set default if no args)").allowUnknownOption().argument("<name>", "Profile name").argument("[args...]", "Extra arguments passed to claude").action((name, args) => {
155
+ return new Command("use").description("Set a profile as the default").argument("<name>", "Profile name").action((name) => {
156
156
  ensureProfilesFile();
157
157
  const data = readJson(PROFILES_FILE);
158
- const p = data.profiles[name];
159
- if (!p) {
158
+ if (!data.profiles[name]) {
160
159
  console.error(`Profile '${name}' not found.`);
161
160
  process.exit(1);
162
161
  }
163
- if (!args || args.length === 0) {
164
- data.default = name;
165
- writeJson(PROFILES_FILE, data);
166
- console.log(`Default profile set to '${name}'.`);
167
- return;
168
- }
169
- execClaude(name, p, args);
162
+ data.default = name;
163
+ writeJson(PROFILES_FILE, data);
164
+ console.log(`Default profile set to '${name}'.`);
170
165
  });
171
166
  }
172
167
  function runCommand() {
@@ -853,7 +848,7 @@ for name in data.get('profiles', {}):
853
848
  esac
854
849
  }
855
850
 
856
- _cc-hub "$@"
851
+ compdef _cc-hub cc-hub
857
852
  `;
858
853
  var BASH_COMPLETION = `_cc-hub_profiles() {
859
854
  local profiles_file="\${CLAUDE_PROFILES_FILE:-$HOME/.claude/profiles.json}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-hub-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Manage Claude CLI profiles, hooks, and sessions",
5
5
  "type": "module",
6
6
  "bin": {