@cc-claw/code 0.6.11 → 0.6.13
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 +3 -3
- package/bin/cc-code +3 -3
- package/install.js +13 -13
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,13 +21,13 @@ npm update -g @cc-claw/code
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
# 启动交互式 TUI
|
|
24
|
-
|
|
24
|
+
cc-code
|
|
25
25
|
|
|
26
26
|
# 直接给任务
|
|
27
|
-
|
|
27
|
+
cc-code "解释这个项目的目录结构"
|
|
28
28
|
|
|
29
29
|
# 指定模型
|
|
30
|
-
|
|
30
|
+
cc-code --model deepseek/deepseek-chat "重构这个函数"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## 支持的平台
|
package/bin/cc-code
CHANGED
|
@@ -5,9 +5,9 @@ const { join, dirname } = require("path");
|
|
|
5
5
|
const { execFileSync } = require("child_process");
|
|
6
6
|
|
|
7
7
|
const dir = dirname(__filename);
|
|
8
|
-
const binPath = existsSync(join(dir, "
|
|
9
|
-
? join(dir, "
|
|
10
|
-
: join(dir, "
|
|
8
|
+
const binPath = existsSync(join(dir, "cc-code-bin"))
|
|
9
|
+
? join(dir, "cc-code-bin")
|
|
10
|
+
: join(dir, "cc-code.exe");
|
|
11
11
|
|
|
12
12
|
try {
|
|
13
13
|
execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
|
package/install.js
CHANGED
|
@@ -74,7 +74,7 @@ function downloadViaProxy(url, proxyUrl) {
|
|
|
74
74
|
port: proxy.port || (isHttps ? 443 : 80),
|
|
75
75
|
path: url,
|
|
76
76
|
method: "GET",
|
|
77
|
-
headers: { "Host": target.hostname, "User-Agent": "
|
|
77
|
+
headers: { "Host": target.hostname, "User-Agent": "cc-code-installer" },
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
// Support proxy auth
|
|
@@ -106,7 +106,7 @@ function downloadViaProxy(url, proxyUrl) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
function extractTarGz(buffer, dest) {
|
|
109
|
-
const tmpFile = join(dest, "
|
|
109
|
+
const tmpFile = join(dest, "cc-code.tar.gz");
|
|
110
110
|
writeFileSync(tmpFile, buffer);
|
|
111
111
|
execSync(`tar -xzf "${tmpFile}" -C "${dest}"`, { stdio: "ignore" });
|
|
112
112
|
unlinkSync(tmpFile);
|
|
@@ -121,7 +121,7 @@ function extractZip(buffer, dest) {
|
|
|
121
121
|
async function main() {
|
|
122
122
|
const key = getPlatformKey();
|
|
123
123
|
const platform = PLATFORMS[key];
|
|
124
|
-
const fileName = `
|
|
124
|
+
const fileName = `cc-code-${platform.suffix}.${platform.ext}`;
|
|
125
125
|
const url = `${BASE_URL}/${fileName}`;
|
|
126
126
|
const binDir = join(__dirname, "bin");
|
|
127
127
|
|
|
@@ -129,7 +129,7 @@ async function main() {
|
|
|
129
129
|
mkdirSync(binDir, { recursive: true });
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
console.log(`Downloading
|
|
132
|
+
console.log(`Downloading cc-code ${VERSION} for ${platform.os}-${platform.arch}...`);
|
|
133
133
|
console.log(` URL: ${url}`);
|
|
134
134
|
|
|
135
135
|
const buffer = await download(url);
|
|
@@ -141,9 +141,9 @@ async function main() {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
const extractedName = platform.os === "win32"
|
|
144
|
-
? `
|
|
145
|
-
: `
|
|
146
|
-
const finalName = platform.os === "win32" ? "
|
|
144
|
+
? `cc-code-${platform.suffix}.exe`
|
|
145
|
+
: `cc-code-${platform.suffix}`;
|
|
146
|
+
const finalName = platform.os === "win32" ? "cc-code.exe" : "cc-code-bin";
|
|
147
147
|
const extractedPath = join(binDir, extractedName);
|
|
148
148
|
const finalPath = join(binDir, finalName);
|
|
149
149
|
|
|
@@ -154,19 +154,19 @@ async function main() {
|
|
|
154
154
|
|
|
155
155
|
if (platform.os !== "win32") {
|
|
156
156
|
chmodSync(finalPath, 0o755);
|
|
157
|
-
const wrapperPath = join(__dirname, "bin", "
|
|
157
|
+
const wrapperPath = join(__dirname, "bin", "cc-code");
|
|
158
158
|
if (existsSync(wrapperPath)) chmodSync(wrapperPath, 0o755);
|
|
159
159
|
} else {
|
|
160
|
-
// Generate Windows batch wrapper so npm's
|
|
160
|
+
// Generate Windows batch wrapper so npm's cc-code.cmd/ps1 can invoke it
|
|
161
161
|
const binDirPath = join(__dirname, "bin");
|
|
162
|
-
writeFileSync(join(binDirPath, "
|
|
163
|
-
writeFileSync(join(binDirPath, "
|
|
162
|
+
writeFileSync(join(binDirPath, "cc-code.cmd"), `@echo off\r\n"%~dp0cc-code.exe" %*\r\n`);
|
|
163
|
+
writeFileSync(join(binDirPath, "cc-code.ps1"), `$basedir = Split-Path $MyInvocation.MyCommand.Definition -Parent\r\n& "$basedir\\cc-code.exe" @args\r\nexit $LASTEXITCODE\r\n`);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
console.log(`
|
|
166
|
+
console.log(`cc-code ${VERSION} installed successfully.`);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
main().catch((err) => {
|
|
170
|
-
console.error("Failed to install
|
|
170
|
+
console.error("Failed to install cc-code:", err.message);
|
|
171
171
|
process.exit(1);
|
|
172
172
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cc-claw/code",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13",
|
|
4
4
|
"description": "cc-code — Terminal coding agent powered by open-source models — Rust-built, Claude Code compatible",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/cc-claws/cc-code.git"
|
|
15
|
+
"url": "git+https://github.com/cc-claws/cc-code.git"
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/cc-claws/cc-code",
|
|
18
18
|
"bugs": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"bin": {
|
|
23
|
-
"cc-code": "
|
|
23
|
+
"cc-code": "bin/cc-code"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"postinstall": "node install.js"
|