@kaitranntt/ccs 3.0.1 → 3.0.2
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/VERSION +1 -1
- package/bin/auth-commands.js +10 -1
- package/bin/ccs.js +1 -26
- package/bin/profile-registry.js +3 -4
- package/lib/ccs +18 -26
- package/lib/ccs.ps1 +22 -25
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.2
|
package/bin/auth-commands.js
CHANGED
|
@@ -39,12 +39,18 @@ class AuthCommands {
|
|
|
39
39
|
console.log('');
|
|
40
40
|
console.log(colored('Examples:', 'cyan'));
|
|
41
41
|
console.log(` ${colored('ccs auth create work', 'yellow')} # Create & login to work profile`);
|
|
42
|
+
console.log(` ${colored('ccs auth default work', 'yellow')} # Set work as default`);
|
|
42
43
|
console.log(` ${colored('ccs auth list', 'yellow')} # List all profiles`);
|
|
43
44
|
console.log(` ${colored('ccs work "review code"', 'yellow')} # Use work profile`);
|
|
45
|
+
console.log(` ${colored('ccs "review code"', 'yellow')} # Use default profile`);
|
|
44
46
|
console.log('');
|
|
45
47
|
console.log(colored('Options:', 'cyan'));
|
|
46
48
|
console.log(` ${colored('--force', 'yellow')} Allow overwriting existing profile`);
|
|
47
49
|
console.log('');
|
|
50
|
+
console.log(colored('Note:', 'cyan'));
|
|
51
|
+
console.log(` By default, ${colored('ccs', 'yellow')} uses Claude CLI defaults from ~/.claude/`);
|
|
52
|
+
console.log(` Use ${colored('ccs auth default <profile>', 'yellow')} to change the default profile.`);
|
|
53
|
+
console.log('');
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
/**
|
|
@@ -119,7 +125,10 @@ class AuthCommands {
|
|
|
119
125
|
console.log(` Instance: ${instancePath}`);
|
|
120
126
|
console.log('');
|
|
121
127
|
console.log('Usage:');
|
|
122
|
-
console.log(` ${colored(`ccs ${profileName} "your prompt here"`, 'yellow')}`);
|
|
128
|
+
console.log(` ${colored(`ccs ${profileName} "your prompt here"`, 'yellow')} # Use this specific profile`);
|
|
129
|
+
console.log('');
|
|
130
|
+
console.log('To set as default (so you can use just "ccs"):');
|
|
131
|
+
console.log(` ${colored(`ccs auth default ${profileName}`, 'yellow')}`);
|
|
123
132
|
console.log('');
|
|
124
133
|
process.exit(0);
|
|
125
134
|
} else {
|
package/bin/ccs.js
CHANGED
|
@@ -114,14 +114,9 @@ function handleHelpCommand() {
|
|
|
114
114
|
|
|
115
115
|
// Account Management
|
|
116
116
|
console.log(colored('Account Management:', 'cyan'));
|
|
117
|
-
console.log(` ${colored('ccs auth
|
|
118
|
-
console.log(` ${colored('ccs auth list', 'yellow')} List all saved profiles`);
|
|
119
|
-
console.log(` ${colored('ccs auth show <profile>', 'yellow')} Show profile details`);
|
|
120
|
-
console.log(` ${colored('ccs auth remove <profile>', 'yellow')} Remove profile (requires --force)`);
|
|
121
|
-
console.log(` ${colored('ccs auth default <profile>', 'yellow')} Set default profile`);
|
|
117
|
+
console.log(` ${colored('ccs auth --help', 'yellow')} Manage multiple Claude accounts`);
|
|
122
118
|
console.log(` ${colored('ccs work', 'yellow')} Switch to work account`);
|
|
123
119
|
console.log(` ${colored('ccs personal', 'yellow')} Switch to personal account`);
|
|
124
|
-
console.log(` ${colored('ccs work', 'yellow')} "review code" Run command with work account`);
|
|
125
120
|
console.log('');
|
|
126
121
|
|
|
127
122
|
// Diagnostics
|
|
@@ -142,26 +137,6 @@ function handleHelpCommand() {
|
|
|
142
137
|
console.log(' Environment: CCS_CONFIG (override config path)');
|
|
143
138
|
console.log('');
|
|
144
139
|
|
|
145
|
-
// Examples
|
|
146
|
-
console.log(colored('Examples:', 'cyan'));
|
|
147
|
-
console.log(' # Try without installing');
|
|
148
|
-
console.log(` ${colored('npx @kaitranntt/ccs glm', 'yellow')} "write tests"`);
|
|
149
|
-
console.log(` ${colored('npx @kaitranntt/ccs kimi', 'yellow')} "write tests"`);
|
|
150
|
-
console.log('');
|
|
151
|
-
console.log(' # Use default Claude subscription');
|
|
152
|
-
console.log(` ${colored('ccs', 'yellow')} "Review this architecture"`);
|
|
153
|
-
console.log('');
|
|
154
|
-
console.log(' # Switch to GLM for cost-effective tasks');
|
|
155
|
-
console.log(` ${colored('ccs glm', 'yellow')} "Write unit tests"`);
|
|
156
|
-
console.log('');
|
|
157
|
-
console.log(' # Switch to Kimi for alternative option');
|
|
158
|
-
console.log(` ${colored('ccs kimi', 'yellow')} "Write integration tests"`);
|
|
159
|
-
console.log('');
|
|
160
|
-
console.log(' # Use with verbose output');
|
|
161
|
-
console.log(` ${colored('ccs glm', 'yellow')} --verbose "Debug error"`);
|
|
162
|
-
console.log(` ${colored('ccs kimi', 'yellow')} --verbose "Review code"`);
|
|
163
|
-
console.log('');
|
|
164
|
-
|
|
165
140
|
// Uninstall
|
|
166
141
|
console.log(colored('Uninstall:', 'yellow'));
|
|
167
142
|
console.log(' npm: npm uninstall -g @kaitranntt/ccs');
|
package/bin/profile-registry.js
CHANGED
|
@@ -94,10 +94,9 @@ class ProfileRegistry {
|
|
|
94
94
|
last_used: null
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
97
|
+
// Note: No longer auto-set as default
|
|
98
|
+
// Users must explicitly run: ccs auth default <profile>
|
|
99
|
+
// Default always stays on implicit 'default' profile (uses ~/.claude/)
|
|
101
100
|
|
|
102
101
|
this._write(data);
|
|
103
102
|
}
|
package/lib/ccs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
# Version (updated by scripts/bump-version.sh)
|
|
5
|
-
CCS_VERSION="3.0.
|
|
5
|
+
CCS_VERSION="3.0.2"
|
|
6
6
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
7
|
readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}"
|
|
8
8
|
readonly PROFILES_JSON="$HOME/.ccs/profiles.json"
|
|
@@ -55,14 +55,9 @@ show_help() {
|
|
|
55
55
|
echo -e " ${YELLOW}ccs glm${RESET} \"debug this code\" Use GLM and run command"
|
|
56
56
|
echo ""
|
|
57
57
|
echo -e "${CYAN}Account Management:${RESET}"
|
|
58
|
-
echo -e " ${YELLOW}ccs auth
|
|
59
|
-
echo -e " ${YELLOW}ccs auth list${RESET} List all profiles"
|
|
60
|
-
echo -e " ${YELLOW}ccs auth show <profile>${RESET} Show profile details"
|
|
61
|
-
echo -e " ${YELLOW}ccs auth remove <profile>${RESET} Remove profile (requires --force)"
|
|
62
|
-
echo -e " ${YELLOW}ccs auth default <profile>${RESET} Set default profile"
|
|
58
|
+
echo -e " ${YELLOW}ccs auth --help${RESET} Manage multiple Claude accounts"
|
|
63
59
|
echo -e " ${YELLOW}ccs work${RESET} Switch to work account"
|
|
64
60
|
echo -e " ${YELLOW}ccs personal${RESET} Switch to personal account"
|
|
65
|
-
echo -e " ${YELLOW}ccs work${RESET} \"review code\" Run command with work account"
|
|
66
61
|
echo ""
|
|
67
62
|
echo -e "${CYAN}Diagnostics:${RESET}"
|
|
68
63
|
echo -e " ${YELLOW}ccs doctor${RESET} Run health check and diagnostics"
|
|
@@ -76,16 +71,6 @@ show_help() {
|
|
|
76
71
|
echo -e " Profiles: ~/.ccs/profiles.json"
|
|
77
72
|
echo -e " Settings: ~/.ccs/*.settings.json"
|
|
78
73
|
echo ""
|
|
79
|
-
echo -e "${CYAN}Examples:${RESET}"
|
|
80
|
-
echo -e " # Create work account profile"
|
|
81
|
-
echo -e " ${YELLOW}ccs auth create work${RESET}"
|
|
82
|
-
echo ""
|
|
83
|
-
echo -e " # Use work account"
|
|
84
|
-
echo -e " ${YELLOW}ccs work${RESET} \"Review architecture\""
|
|
85
|
-
echo ""
|
|
86
|
-
echo -e " # Switch to GLM for cost-effective tasks"
|
|
87
|
-
echo -e " ${YELLOW}ccs glm${RESET} \"Write unit tests\""
|
|
88
|
-
echo ""
|
|
89
74
|
echo -e "${CYAN}Documentation:${RESET}"
|
|
90
75
|
echo -e " GitHub: ${CYAN}https://github.com/kaitranntt/ccs${RESET}"
|
|
91
76
|
echo -e " Docs: https://github.com/kaitranntt/ccs/blob/main/README.md"
|
|
@@ -428,11 +413,9 @@ register_profile() {
|
|
|
428
413
|
"last_used": null
|
|
429
414
|
}')
|
|
430
415
|
|
|
431
|
-
#
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
data=$(echo "$data" | jq --arg name "$profile_name" '.default = $name')
|
|
435
|
-
fi
|
|
416
|
+
# Note: No longer auto-set as default
|
|
417
|
+
# Users must explicitly run: ccs auth default <profile>
|
|
418
|
+
# Default always stays on implicit 'default' profile (uses ~/.claude/)
|
|
436
419
|
|
|
437
420
|
write_profiles_json "$data"
|
|
438
421
|
}
|
|
@@ -687,9 +670,15 @@ auth_help() {
|
|
|
687
670
|
echo -e " ${YELLOW}default <profile>${RESET} Set default profile"
|
|
688
671
|
echo ""
|
|
689
672
|
echo -e "${CYAN}Examples:${RESET}"
|
|
690
|
-
echo -e " ${YELLOW}ccs auth create work${RESET}"
|
|
691
|
-
echo -e " ${YELLOW}ccs auth
|
|
692
|
-
echo -e " ${YELLOW}ccs auth
|
|
673
|
+
echo -e " ${YELLOW}ccs auth create work${RESET} # Create & login to work profile"
|
|
674
|
+
echo -e " ${YELLOW}ccs auth default work${RESET} # Set work as default"
|
|
675
|
+
echo -e " ${YELLOW}ccs auth list${RESET} # List all profiles"
|
|
676
|
+
echo -e " ${YELLOW}ccs work \"review code\"${RESET} # Use work profile"
|
|
677
|
+
echo -e " ${YELLOW}ccs \"review code\"${RESET} # Use default profile"
|
|
678
|
+
echo ""
|
|
679
|
+
echo -e "${CYAN}Note:${RESET}"
|
|
680
|
+
echo -e " By default, ${YELLOW}ccs${RESET} uses Claude CLI defaults from ~/.claude/"
|
|
681
|
+
echo -e " Use ${YELLOW}ccs auth default <profile>${RESET} to change the default profile."
|
|
693
682
|
echo ""
|
|
694
683
|
}
|
|
695
684
|
|
|
@@ -749,7 +738,10 @@ auth_create() {
|
|
|
749
738
|
echo " Instance: $instance_path"
|
|
750
739
|
echo ""
|
|
751
740
|
echo "Usage:"
|
|
752
|
-
echo " ${YELLOW}ccs $profile_name \"your prompt here\"${RESET}"
|
|
741
|
+
echo " ${YELLOW}ccs $profile_name \"your prompt here\"${RESET} # Use this specific profile"
|
|
742
|
+
echo ""
|
|
743
|
+
echo "To set as default (so you can use just \"ccs\"):"
|
|
744
|
+
echo " ${YELLOW}ccs auth default $profile_name${RESET}"
|
|
753
745
|
echo ""
|
|
754
746
|
}
|
|
755
747
|
|
package/lib/ccs.ps1
CHANGED
|
@@ -12,7 +12,7 @@ param(
|
|
|
12
12
|
$ErrorActionPreference = "Stop"
|
|
13
13
|
|
|
14
14
|
# Version (updated by scripts/bump-version.sh)
|
|
15
|
-
$CcsVersion = "3.0.
|
|
15
|
+
$CcsVersion = "3.0.2"
|
|
16
16
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
17
17
|
$ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" }
|
|
18
18
|
$ProfilesJson = "$env:USERPROFILE\.ccs\profiles.json"
|
|
@@ -111,14 +111,9 @@ function Show-Help {
|
|
|
111
111
|
Write-ColorLine " ccs glm 'debug this code' Use GLM and run command" "Yellow"
|
|
112
112
|
Write-Host ""
|
|
113
113
|
Write-ColorLine "Account Management:" "Cyan"
|
|
114
|
-
Write-ColorLine " ccs auth
|
|
115
|
-
Write-ColorLine " ccs auth list List all profiles" "Yellow"
|
|
116
|
-
Write-ColorLine " ccs auth show <profile> Show profile details" "Yellow"
|
|
117
|
-
Write-ColorLine " ccs auth remove <profile> Remove profile (requires --force)" "Yellow"
|
|
118
|
-
Write-ColorLine " ccs auth default <profile> Set default profile" "Yellow"
|
|
114
|
+
Write-ColorLine " ccs auth --help Manage multiple Claude accounts" "Yellow"
|
|
119
115
|
Write-ColorLine " ccs work Switch to work account" "Yellow"
|
|
120
116
|
Write-ColorLine " ccs personal Switch to personal account" "Yellow"
|
|
121
|
-
Write-ColorLine " ccs work 'review code' Run command with work account" "Yellow"
|
|
122
117
|
Write-Host ""
|
|
123
118
|
Write-ColorLine "Diagnostics:" "Cyan"
|
|
124
119
|
Write-ColorLine " ccs doctor Run health check and diagnostics" "Yellow"
|
|
@@ -132,16 +127,6 @@ function Show-Help {
|
|
|
132
127
|
Write-Host " Profiles: ~/.ccs/profiles.json"
|
|
133
128
|
Write-Host " Settings: ~/.ccs/*.settings.json"
|
|
134
129
|
Write-Host ""
|
|
135
|
-
Write-ColorLine "Examples:" "Cyan"
|
|
136
|
-
Write-Host " # Create work account profile"
|
|
137
|
-
Write-ColorLine " ccs auth create work" "Yellow"
|
|
138
|
-
Write-Host ""
|
|
139
|
-
Write-Host " # Use work account"
|
|
140
|
-
Write-ColorLine " ccs work 'Review architecture'" "Yellow"
|
|
141
|
-
Write-Host ""
|
|
142
|
-
Write-Host " # Switch to GLM for cost-effective tasks"
|
|
143
|
-
Write-ColorLine " ccs glm 'Write unit tests'" "Yellow"
|
|
144
|
-
Write-Host ""
|
|
145
130
|
Write-ColorLine "Documentation:" "Cyan"
|
|
146
131
|
Write-Host " GitHub: https://github.com/kaitranntt/ccs"
|
|
147
132
|
Write-Host " Docs: https://github.com/kaitranntt/ccs/blob/main/README.md"
|
|
@@ -350,10 +335,9 @@ function Register-Profile {
|
|
|
350
335
|
last_used = $null
|
|
351
336
|
})
|
|
352
337
|
|
|
353
|
-
#
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
338
|
+
# Note: No longer auto-set as default
|
|
339
|
+
# Users must explicitly run: ccs auth default <profile>
|
|
340
|
+
# Default always stays on implicit 'default' profile (uses ~/.claude/)
|
|
357
341
|
|
|
358
342
|
Write-ProfilesJson $Data
|
|
359
343
|
}
|
|
@@ -640,9 +624,19 @@ function Show-AuthHelp {
|
|
|
640
624
|
Write-Host " default <profile> Set default profile" -ForegroundColor Yellow
|
|
641
625
|
Write-Host ""
|
|
642
626
|
Write-Host "Examples:" -ForegroundColor Cyan
|
|
643
|
-
Write-Host " ccs auth create work" -ForegroundColor Yellow
|
|
644
|
-
Write-Host " ccs auth
|
|
645
|
-
Write-Host " ccs auth
|
|
627
|
+
Write-Host " ccs auth create work # Create & login to work profile" -ForegroundColor Yellow
|
|
628
|
+
Write-Host " ccs auth default work # Set work as default" -ForegroundColor Yellow
|
|
629
|
+
Write-Host " ccs auth list # List all profiles" -ForegroundColor Yellow
|
|
630
|
+
Write-Host ' ccs work "review code" # Use work profile' -ForegroundColor Yellow
|
|
631
|
+
Write-Host ' ccs "review code" # Use default profile' -ForegroundColor Yellow
|
|
632
|
+
Write-Host ""
|
|
633
|
+
Write-Host "Note:" -ForegroundColor Cyan
|
|
634
|
+
Write-Host " By default, " -NoNewline
|
|
635
|
+
Write-Host "ccs" -ForegroundColor Yellow -NoNewline
|
|
636
|
+
Write-Host " uses Claude CLI defaults from ~/.claude/"
|
|
637
|
+
Write-Host " Use " -NoNewline
|
|
638
|
+
Write-Host "ccs auth default <profile>" -ForegroundColor Yellow -NoNewline
|
|
639
|
+
Write-Host " to change the default profile."
|
|
646
640
|
Write-Host ""
|
|
647
641
|
}
|
|
648
642
|
|
|
@@ -703,7 +697,10 @@ function Invoke-AuthCreate {
|
|
|
703
697
|
Write-Host " Instance: $InstancePath"
|
|
704
698
|
Write-Host ""
|
|
705
699
|
Write-Host "Usage:"
|
|
706
|
-
Write-Host " ccs $ProfileName `"your prompt here`"" -ForegroundColor Yellow
|
|
700
|
+
Write-Host " ccs $ProfileName `"your prompt here`" # Use this specific profile" -ForegroundColor Yellow
|
|
701
|
+
Write-Host ""
|
|
702
|
+
Write-Host 'To set as default (so you can use just "ccs"):'
|
|
703
|
+
Write-Host " ccs auth default $ProfileName" -ForegroundColor Yellow
|
|
707
704
|
Write-Host ""
|
|
708
705
|
}
|
|
709
706
|
|