@bazilio-san/glm-cc 1.0.13 → 1.0.17
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 +12 -12
- package/bin/glm.js +12 -18
- package/package.json +40 -40
package/README.md
CHANGED
|
@@ -10,23 +10,23 @@ npm install -g @bazilio-san/glm-cc
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
glm
|
|
16
|
-
```
|
|
13
|
+
All arguments are passed through to `claude`, so you can use `glm` as a drop-in replacement:
|
|
17
14
|
|
|
18
|
-
### Interactive configuration
|
|
19
15
|
```bash
|
|
20
|
-
glm
|
|
21
|
-
#
|
|
22
|
-
glm
|
|
16
|
+
glm # launch claude interactively
|
|
17
|
+
glm -h # claude -h
|
|
18
|
+
glm plugin -h # claude plugin -h
|
|
19
|
+
glm -p "hello" # claude -p "hello"
|
|
20
|
+
glm --version # claude --version
|
|
21
|
+
glm mcp serve # claude mcp serve
|
|
23
22
|
```
|
|
24
23
|
|
|
25
|
-
###
|
|
24
|
+
### glm-specific commands
|
|
25
|
+
|
|
26
26
|
```bash
|
|
27
|
-
glm -
|
|
28
|
-
#
|
|
29
|
-
glm --
|
|
27
|
+
glm -c # interactive configuration (alias: --glm-config)
|
|
28
|
+
glm --glm-show # show current settings
|
|
29
|
+
glm --glm-version # show glm version
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Configuration
|
package/bin/glm.js
CHANGED
|
@@ -78,16 +78,8 @@ async function runConfig(fields) {
|
|
|
78
78
|
return config;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
function
|
|
81
|
+
function showConfig(config) {
|
|
82
82
|
const lines = [
|
|
83
|
-
'',
|
|
84
|
-
'Usage: glm [options]',
|
|
85
|
-
'',
|
|
86
|
-
'Options:',
|
|
87
|
-
' -c, --config Interactive configuration',
|
|
88
|
-
' -h, --help Show this help',
|
|
89
|
-
'',
|
|
90
|
-
'Without options: applies config to environment and launches claude.',
|
|
91
83
|
'',
|
|
92
84
|
`Config file: ${CONFIG_FILE}`,
|
|
93
85
|
'',
|
|
@@ -103,14 +95,14 @@ function showHelp(config) {
|
|
|
103
95
|
console.log(lines.join('\n'));
|
|
104
96
|
}
|
|
105
97
|
|
|
106
|
-
function launchClaude(config) {
|
|
98
|
+
function launchClaude(config, args) {
|
|
107
99
|
const env = { ...process.env };
|
|
108
100
|
for (const field of CONFIG_FIELDS) {
|
|
109
101
|
if (config[field.key]) {
|
|
110
102
|
env[field.key] = config[field.key];
|
|
111
103
|
}
|
|
112
104
|
}
|
|
113
|
-
const proc = spawn('claude',
|
|
105
|
+
const proc = spawn('claude', args, {
|
|
114
106
|
env,
|
|
115
107
|
stdio: 'inherit',
|
|
116
108
|
shell: process.platform === 'win32',
|
|
@@ -125,18 +117,19 @@ function launchClaude(config) {
|
|
|
125
117
|
async function main() {
|
|
126
118
|
const args = process.argv.slice(2);
|
|
127
119
|
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
// Only glm-specific flags: --config, --show-config, --glm-version
|
|
121
|
+
if (args.includes('--glm-config') || args.includes('-c')) {
|
|
122
|
+
await runConfig(CONFIG_FIELDS);
|
|
130
123
|
return;
|
|
131
124
|
}
|
|
132
125
|
|
|
133
|
-
if (args.includes('-
|
|
134
|
-
|
|
126
|
+
if (args.includes('--glm-show')) {
|
|
127
|
+
showConfig(loadConfig());
|
|
135
128
|
return;
|
|
136
129
|
}
|
|
137
130
|
|
|
138
|
-
if (args.includes('-
|
|
139
|
-
|
|
131
|
+
if (args.includes('--glm-version')) {
|
|
132
|
+
console.log(`glm v${pkg.version}`);
|
|
140
133
|
return;
|
|
141
134
|
}
|
|
142
135
|
|
|
@@ -150,7 +143,8 @@ async function main() {
|
|
|
150
143
|
config = loadConfig();
|
|
151
144
|
}
|
|
152
145
|
|
|
153
|
-
|
|
146
|
+
// All arguments are passed through to claude
|
|
147
|
+
launchClaude(config, args);
|
|
154
148
|
}
|
|
155
149
|
|
|
156
150
|
main().catch(err => {
|
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bazilio-san/glm-cc",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "CLI tool for running claude with custom GLM configuration",
|
|
5
|
-
"main": "bin/glm.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"glm": "bin/glm.js"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"claude",
|
|
15
|
-
"cli",
|
|
16
|
-
"anthropic",
|
|
17
|
-
"glm"
|
|
18
|
-
],
|
|
19
|
-
"author": {
|
|
20
|
-
"name": "Viacheslav Makarov",
|
|
21
|
-
"email": "npmjs@bazilio.ru"
|
|
22
|
-
},
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/Bazilio-san/glm-cc.git"
|
|
26
|
-
},
|
|
27
|
-
"homepage": "https://github.com/Bazilio-san/glm-cc#readme",
|
|
28
|
-
"publishConfig": {
|
|
29
|
-
"access": "public"
|
|
30
|
-
},
|
|
31
|
-
"license": "MIT",
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18.0.0"
|
|
34
|
-
},
|
|
35
|
-
"os": [
|
|
36
|
-
"win32",
|
|
37
|
-
"darwin",
|
|
38
|
-
"linux"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bazilio-san/glm-cc",
|
|
3
|
+
"version": "1.0.17",
|
|
4
|
+
"description": "CLI tool for running claude with custom GLM configuration",
|
|
5
|
+
"main": "bin/glm.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"glm": "bin/glm.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"claude",
|
|
15
|
+
"cli",
|
|
16
|
+
"anthropic",
|
|
17
|
+
"glm"
|
|
18
|
+
],
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "Viacheslav Makarov",
|
|
21
|
+
"email": "npmjs@bazilio.ru"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/Bazilio-san/glm-cc.git"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/Bazilio-san/glm-cc#readme",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18.0.0"
|
|
34
|
+
},
|
|
35
|
+
"os": [
|
|
36
|
+
"win32",
|
|
37
|
+
"darwin",
|
|
38
|
+
"linux"
|
|
39
|
+
]
|
|
40
|
+
}
|