@bazilio-san/glm-cc 1.0.24 → 1.0.25
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 +2 -2
- package/bin/glm-config.js +6 -0
- package/bin/glm.cmd +10 -0
- package/bin/glm.sh +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ No runtime dependencies — the package is plain Node.js plus two shell scripts.
|
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Most arguments are passed through to `claude`, so you can use `glm` as a drop-in
|
|
21
21
|
replacement:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
@@ -25,13 +25,13 @@ glm # launch claude interactively
|
|
|
25
25
|
glm -h # claude -h
|
|
26
26
|
glm plugin -h # claude plugin -h
|
|
27
27
|
glm -p "hello" # claude -p "hello"
|
|
28
|
-
glm --version # claude --version
|
|
29
28
|
glm mcp serve # claude mcp serve
|
|
30
29
|
```
|
|
31
30
|
|
|
32
31
|
### glm-specific commands
|
|
33
32
|
|
|
34
33
|
```bash
|
|
34
|
+
glm -V # print the glm-cc and Claude Code versions (alias: --version)
|
|
35
35
|
glm -c # configuration menu (alias: --glm-config)
|
|
36
36
|
glm --glm-show # print the current settings
|
|
37
37
|
glm --glm-doctor # check the key, the endpoint and the models
|
package/bin/glm-config.js
CHANGED
|
@@ -30,6 +30,7 @@ function printHelp () {
|
|
|
30
30
|
write(c.gray(' Runs Claude Code against a GLM-compatible API endpoint.'));
|
|
31
31
|
write('');
|
|
32
32
|
write(c.bold('glm-specific flags'));
|
|
33
|
+
write(` ${'-V, --version'.padEnd(20)} print the glm-cc and Claude Code versions`);
|
|
33
34
|
write(` ${'-c, --glm-config'.padEnd(20)} open the configuration menu`);
|
|
34
35
|
write(` ${'--glm-show'.padEnd(20)} print the current settings`);
|
|
35
36
|
write(` ${'--glm-doctor'.padEnd(20)} check the key, the endpoint and the models`);
|
|
@@ -50,6 +51,11 @@ async function main () {
|
|
|
50
51
|
const args = process.argv.slice(2);
|
|
51
52
|
const has = (flag) => args.includes(flag);
|
|
52
53
|
|
|
54
|
+
if (args.length === 1 && has('--version')) {
|
|
55
|
+
write(`glm-cc v${pkg.version}`);
|
|
56
|
+
return 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
53
59
|
if (has('--glm-version')) {
|
|
54
60
|
write(`glm v${pkg.version}`);
|
|
55
61
|
return 0;
|
package/bin/glm.cmd
CHANGED
|
@@ -12,6 +12,10 @@ rem cmd : `:;` = malformed label, skipped silently
|
|
|
12
12
|
rem -------------------------------------------------------------------------
|
|
13
13
|
|
|
14
14
|
setlocal DisableDelayedExpansion
|
|
15
|
+
if "%~2"=="" (
|
|
16
|
+
if "%~1"=="-V" goto version
|
|
17
|
+
if "%~1"=="--version" goto version
|
|
18
|
+
)
|
|
15
19
|
set "GLM_ARGS=%*"
|
|
16
20
|
|
|
17
21
|
rem --- glm-specific flags are delegated to the node helper ----------------
|
|
@@ -41,3 +45,9 @@ exit /b %errorlevel%
|
|
|
41
45
|
:config
|
|
42
46
|
node "%~dp0glm-config.js" %*
|
|
43
47
|
exit /b %errorlevel%
|
|
48
|
+
|
|
49
|
+
:version
|
|
50
|
+
node "%~dp0glm-config.js" --version
|
|
51
|
+
if errorlevel 1 exit /b %errorlevel%
|
|
52
|
+
claude --version
|
|
53
|
+
exit /b %errorlevel%
|
package/bin/glm.sh
CHANGED
|
@@ -16,6 +16,11 @@ GLM_BIN_DIR="$(cd "$(dirname "$_glm_real")" && pwd)"
|
|
|
16
16
|
|
|
17
17
|
GLM_ENV_FILE="${HOME}/.glm-claude-code.env"
|
|
18
18
|
|
|
19
|
+
if [[ $# -eq 1 && ( $1 == -V || $1 == --version ) ]]; then
|
|
20
|
+
node "${GLM_BIN_DIR}/glm-config.js" --version
|
|
21
|
+
exec claude --version
|
|
22
|
+
fi
|
|
23
|
+
|
|
19
24
|
# --- glm-specific flags delegate to the node helper -----------------------
|
|
20
25
|
case " $* " in
|
|
21
26
|
*" --glm-config "*|*" -c "*|*" --glm-show "*|*" --glm-doctor "*|*" --glm-version "*|*" --glm-help "*)
|