@tjcoder/cli 0.9.165 → 0.9.166
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 +1 -1
- package/lib/fetch-binary.js +19 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ coder --timeout 30m
|
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
94
|
# install a specific coder version regardless of the @tjcoder/cli wrapper version
|
|
95
|
-
CODER_CLI_VERSION=v0.9.
|
|
95
|
+
CODER_CLI_VERSION=v0.9.166 npm install -g @tjcoder/cli
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
## Troubleshooting
|
package/lib/fetch-binary.js
CHANGED
|
@@ -16,7 +16,7 @@ const { URL } = require("node:url");
|
|
|
16
16
|
const pkg = require("../package.json");
|
|
17
17
|
const REPO = process.env.CODER_CLI_REPO || "tjcoder-labs/cli";
|
|
18
18
|
// Allow pinning a version (matches the @tjcoder/cli package version by
|
|
19
|
-
// default so that `npm i @tjcoder/cli@0.9.
|
|
19
|
+
// default so that `npm i @tjcoder/cli@0.9.166` installs coder v0.9.166).
|
|
20
20
|
const VERSION = process.env.CODER_CLI_VERSION || `v${pkg.version}`;
|
|
21
21
|
|
|
22
22
|
// --- platform detection ----------------------------------------------------
|
|
@@ -152,7 +152,20 @@ async function checksum(filePath) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
//
|
|
155
|
+
// moveFile moves src to dest atomically where possible, and falls back to a
|
|
156
|
+
// copy+unlink when the two paths live on different filesystems (rename()
|
|
157
|
+
// returns EXDEV). This matters for system-wide installs where /tmp and the
|
|
158
|
+
// npm prefix (e.g. /usr/lib) are separate mounts.
|
|
159
|
+
function moveFile(src, dest) {
|
|
160
|
+
try {
|
|
161
|
+
fs.renameSync(src, dest);
|
|
162
|
+
return;
|
|
163
|
+
} catch (err) {
|
|
164
|
+
if (err.code !== "EXDEV") throw err;
|
|
165
|
+
fs.copyFileSync(src, dest);
|
|
166
|
+
fs.unlinkSync(src);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
156
169
|
|
|
157
170
|
async function main() {
|
|
158
171
|
const info = detect();
|
|
@@ -178,7 +191,10 @@ async function main() {
|
|
|
178
191
|
fs.chmodSync(extracted, 0o755);
|
|
179
192
|
}
|
|
180
193
|
await checksum(extracted);
|
|
181
|
-
|
|
194
|
+
moveFile(extracted, binPath);
|
|
195
|
+
if (info.os !== "windows") {
|
|
196
|
+
fs.chmodSync(binPath, 0o755);
|
|
197
|
+
}
|
|
182
198
|
process.stdout.write(`coder: installed ${binPath}\n`);
|
|
183
199
|
} catch (err) {
|
|
184
200
|
process.stderr.write(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tjcoder/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.166",
|
|
4
4
|
"description": "Terminal-first AI coding assistant by TJ Coder / AI Labs. A keyboard-driven TUI with a live cognition pane, 7 specialized agents, and 31 tools, running on local Ollama models by default.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|