@bazilio-san/glm-cc 1.0.24 → 1.0.26

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
@@ -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
- All arguments are passed through to `claude`, so you can use `glm` as a drop-in
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 "*)
package/bin/lib/config.js CHANGED
@@ -37,14 +37,14 @@ export const FIELDS = [
37
37
  key: 'ANTHROPIC_DEFAULT_SONNET_MODEL',
38
38
  label: 'Main model (Sonnet slot)',
39
39
  describe: 'Model used for ordinary work',
40
- default: 'glm-5.3[1m]',
40
+ default: 'glm-5.4[1m]',
41
41
  required: true,
42
42
  },
43
43
  {
44
44
  key: 'ANTHROPIC_DEFAULT_OPUS_MODEL',
45
45
  label: 'Main model (Opus slot)',
46
46
  describe: 'Model used when Claude Code asks for its strongest model',
47
- default: 'glm-5.3[1m]',
47
+ default: 'glm-5.4[1m]',
48
48
  required: true,
49
49
  },
50
50
  {
package/bin/lib/models.js CHANGED
@@ -50,6 +50,7 @@ export function modelsUrlFor (baseUrl) {
50
50
 
51
51
  /** Known model id -> context window in tokens. */
52
52
  export const MODEL_CONTEXT_WINDOWS = {
53
+ 'glm-5.4': 1_048_576,
53
54
  'glm-5.3-flash': 1_048_576,
54
55
  'glm-5.3': 1_048_576,
55
56
  'glm-5.2': 1_048_576,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bazilio-san/glm-cc",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "CLI tool for running claude with custom GLM configuration",
5
5
  "bin": {
6
6
  "glm": "bin/glm.cmd"