codewhale 0.8.60 → 0.8.61
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 +45 -30
- package/package.json +2 -2
- package/scripts/preflight-glibc.js +37 -25
- package/test/install.test.js +44 -0
package/README.md
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# codewhale
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
> The terminal coding agent for any model — open models first.
|
|
4
|
+
|
|
5
|
+
CodeWhale is a Rust TUI and CLI for 24 providers — DeepSeek, OpenRouter,
|
|
6
|
+
Hugging Face, and local vLLM/SGLang/Ollama are first-class routes, and it
|
|
7
|
+
speaks natively to Anthropic Claude and OpenAI when that's what you have —
|
|
8
|
+
with approval-gated tools, OS sandboxing, side-git snapshots, and `/restore`
|
|
9
|
+
rollback.
|
|
5
10
|
|
|
6
11
|
This npm package is a small launcher: it downloads the matching native
|
|
7
|
-
CodeWhale binaries for your platform
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
CodeWhale binaries for your platform, verifies them against the release
|
|
13
|
+
SHA-256 manifest, and installs the `codewhale`, `codew`, and `codewhale-tui`
|
|
14
|
+
commands. The application state and credentials still live in CodeWhale's
|
|
15
|
+
normal config files, not inside `node_modules`.
|
|
10
16
|
|
|
11
|
-
> Previously published as `deepseek-tui`. See
|
|
12
|
-
>
|
|
13
|
-
>
|
|
17
|
+
> Previously published as `deepseek-tui`. See
|
|
18
|
+
> [docs/REBRAND.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/REBRAND.md)
|
|
19
|
+
> for the migration notes; the legacy `deepseek-tui` npm package is deprecated
|
|
20
|
+
> and receives no further releases.
|
|
14
21
|
|
|
15
22
|
## Install
|
|
16
23
|
|
|
@@ -34,45 +41,37 @@ wrapper retries the download on first run.
|
|
|
34
41
|
## First run
|
|
35
42
|
|
|
36
43
|
```bash
|
|
37
|
-
codewhale
|
|
44
|
+
codewhale auth set --provider deepseek
|
|
45
|
+
codewhale auth status
|
|
38
46
|
codewhale doctor
|
|
39
47
|
codewhale
|
|
40
48
|
```
|
|
41
49
|
|
|
50
|
+
Every provider is the same one-line shape — `--provider openrouter`,
|
|
51
|
+
`--provider huggingface`, `--provider ollama`, or `--provider anthropic` for a
|
|
52
|
+
Claude key; the full registry lives in
|
|
53
|
+
[docs/PROVIDERS.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/PROVIDERS.md).
|
|
54
|
+
|
|
42
55
|
The `codewhale` facade and `codewhale-tui` binary share
|
|
43
|
-
`~/.codewhale/config.toml` for
|
|
56
|
+
`~/.codewhale/config.toml` for auth and default model settings. Legacy
|
|
44
57
|
`~/.deepseek/config.toml` installs are still read as a compatibility fallback.
|
|
45
58
|
Common TUI commands are available directly through the facade, including
|
|
46
59
|
`codewhale doctor`, `codewhale models`, `codewhale sessions`, and
|
|
47
60
|
`codewhale resume --last`.
|
|
48
61
|
|
|
49
|
-
The app talks to DeepSeek's documented OpenAI-compatible Chat Completions API.
|
|
50
|
-
Set `DEEPSEEK_BASE_URL` only if you need the China endpoint or DeepSeek beta
|
|
51
|
-
features such as strict tool mode, chat prefix completion, or FIM completion.
|
|
52
|
-
|
|
53
|
-
NVIDIA NIM-hosted DeepSeek V4 Pro is also supported:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
codewhale auth set --provider nvidia-nim --api-key "YOUR_NVIDIA_API_KEY"
|
|
57
|
-
codewhale --provider nvidia-nim
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
For a single process, set `DEEPSEEK_PROVIDER=nvidia-nim` and `NVIDIA_API_KEY`
|
|
61
|
-
or `NVIDIA_NIM_API_KEY` (with `DEEPSEEK_API_KEY` as a compatibility fallback).
|
|
62
|
-
The NIM default model is `deepseek-ai/deepseek-v4-pro` and the default base URL
|
|
63
|
-
is `https://integrate.api.nvidia.com/v1`. With `--provider nvidia-nim`,
|
|
64
|
-
`--model deepseek-v4-flash` maps to `deepseek-ai/deepseek-v4-flash`.
|
|
65
|
-
|
|
66
62
|
## Supported platforms
|
|
67
63
|
|
|
68
64
|
Prebuilt binaries for the GitHub release are downloaded automatically:
|
|
69
65
|
|
|
70
66
|
- Linux x64
|
|
71
|
-
- Linux arm64
|
|
67
|
+
- Linux arm64
|
|
68
|
+
- Linux riscv64
|
|
72
69
|
- macOS x64 / arm64
|
|
73
70
|
- Windows x64
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
HarmonyOS PC (`openharmony`) is treated as `linux`, so it gets the Linux
|
|
73
|
+
binaries matching your CPU architecture (x64, arm64, or riscv64). Other
|
|
74
|
+
platform/architecture combinations (musl, FreeBSD, …) aren't
|
|
76
75
|
shipped as prebuilts. Unsupported platforms, checksum failures, and glibc
|
|
77
76
|
compatibility problems still fail with a clear error pointing you at
|
|
78
77
|
`cargo install codewhale-cli codewhale-tui --locked` and the full
|
|
@@ -84,12 +83,21 @@ build-from-source guide.
|
|
|
84
83
|
| Setting | What it does |
|
|
85
84
|
| --- | --- |
|
|
86
85
|
| `codewhaleBinaryVersion` in `package.json` | Default native binary version. `deepseekBinaryVersion` is still read as a backward-compat fallback. |
|
|
86
|
+
| `CODEWHALE_RELEASE_BASE_URL` | Canonical override: use an internal or mirrored release-asset directory when GitHub Releases is unavailable. The directory must contain `codewhale-artifacts-sha256.txt` and the platform binaries. `DEEPSEEK_TUI_RELEASE_BASE_URL` and `DEEPSEEK_RELEASE_BASE_URL` are the implemented legacy fallbacks. |
|
|
87
|
+
| `CODEWHALE_USE_CNB_MIRROR=1` | Download release assets from the CNB (China-friendly) mirror instead of GitHub. |
|
|
87
88
|
| `DEEPSEEK_TUI_VERSION` or `DEEPSEEK_VERSION` | Override the GitHub release version to download. |
|
|
88
89
|
| `DEEPSEEK_TUI_GITHUB_REPO` or `DEEPSEEK_GITHUB_REPO` | Override the source repo. Defaults to `Hmbown/CodeWhale`. |
|
|
89
|
-
| `DEEPSEEK_TUI_RELEASE_BASE_URL` | Use an internal or mirrored release-asset directory when GitHub Releases is unavailable. The directory must contain `codewhale-artifacts-sha256.txt` and the platform binaries. |
|
|
90
90
|
| `DEEPSEEK_TUI_FORCE_DOWNLOAD=1` | Force download even when the cached binary is already present. |
|
|
91
91
|
| `DEEPSEEK_TUI_DISABLE_INSTALL=1` | Skip install-time download. |
|
|
92
92
|
| `DEEPSEEK_TUI_OPTIONAL_INSTALL=1` | Make install-time retryable download failures warn and exit `0` instead of failing `npm install`. |
|
|
93
|
+
| `DEEPSEEK_TUI_SKIP_GLIBC_CHECK=1` | Bypass the Linux glibc preflight check at your own risk (`DEEPSEEK_SKIP_GLIBC_CHECK=1` also works). |
|
|
94
|
+
|
|
95
|
+
### Proxies
|
|
96
|
+
|
|
97
|
+
Downloads respect `HTTPS_PROXY` / `HTTP_PROXY` (CONNECT tunneling included)
|
|
98
|
+
and `NO_PROXY`, so the wrapper works behind corporate proxies. For fully
|
|
99
|
+
offline installs, set `DEEPSEEK_TUI_DISABLE_INSTALL=1` or point
|
|
100
|
+
`CODEWHALE_RELEASE_BASE_URL` at a local mirror.
|
|
93
101
|
|
|
94
102
|
## Release integrity
|
|
95
103
|
|
|
@@ -97,3 +105,10 @@ build-from-source guide.
|
|
|
97
105
|
exist for the target GitHub release before publishing.
|
|
98
106
|
- Install-time downloads are verified against the release checksum manifest before
|
|
99
107
|
the wrapper marks them executable.
|
|
108
|
+
|
|
109
|
+
## Links
|
|
110
|
+
|
|
111
|
+
- Repository: <https://github.com/Hmbown/CodeWhale>
|
|
112
|
+
- Website: <https://codewhale.net/>
|
|
113
|
+
- Provider registry: [docs/PROVIDERS.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/PROVIDERS.md)
|
|
114
|
+
- Changelog: [CHANGELOG.md](https://github.com/Hmbown/CodeWhale/blob/main/CHANGELOG.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codewhale",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"codewhaleBinaryVersion": "0.8.
|
|
3
|
+
"version": "0.8.61",
|
|
4
|
+
"codewhaleBinaryVersion": "0.8.61",
|
|
5
5
|
"description": "Install and run CodeWhale, the agentic terminal for open-source and open-weight coding models, from GitHub release artifacts.",
|
|
6
6
|
"author": "Hmbown",
|
|
7
7
|
"license": "MIT",
|
|
@@ -83,12 +83,36 @@ function buildFromSourceHint() {
|
|
|
83
83
|
].join("\n");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
function skipGlibcCheck() {
|
|
87
|
+
return (
|
|
88
|
+
process.env.CODEWHALE_SKIP_GLIBC_CHECK === "1" ||
|
|
89
89
|
process.env.DEEPSEEK_TUI_SKIP_GLIBC_CHECK === "1" ||
|
|
90
90
|
process.env.DEEPSEEK_SKIP_GLIBC_CHECK === "1"
|
|
91
|
-
)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function glibcCompatibilityMessage(required, host) {
|
|
95
|
+
const hostLine = host
|
|
96
|
+
? `this system has glibc ${formatVersion(host)}, which is too old for that asset.`
|
|
97
|
+
: "this system does not appear to provide GNU libc.";
|
|
98
|
+
return [
|
|
99
|
+
`Prebuilt CodeWhale Linux binaries require GLIBC_${formatVersion(required)}, but ${hostLine}`,
|
|
100
|
+
"",
|
|
101
|
+
"Official Linux release binaries are GNU libc builds. Ubuntu 22.04 ships glibc 2.35,",
|
|
102
|
+
"so it cannot run a binary built against Ubuntu 24.04/glibc 2.39.",
|
|
103
|
+
"",
|
|
104
|
+
buildFromSourceHint(),
|
|
105
|
+
"",
|
|
106
|
+
"Release engineering follow-up: build Linux GNU assets against an older glibc",
|
|
107
|
+
"baseline, or add a musl/static Linux asset.",
|
|
108
|
+
"",
|
|
109
|
+
"Set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.",
|
|
110
|
+
].join("\n");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function preflightGlibc(filePath) {
|
|
114
|
+
if (!isLinux()) return;
|
|
115
|
+
if (skipGlibcCheck()) {
|
|
92
116
|
return;
|
|
93
117
|
}
|
|
94
118
|
|
|
@@ -100,29 +124,11 @@ function preflightGlibc(filePath) {
|
|
|
100
124
|
|
|
101
125
|
const host = detectHostGlibc();
|
|
102
126
|
if (!host) {
|
|
103
|
-
throw new Error(
|
|
104
|
-
[
|
|
105
|
-
`The prebuilt binary requires GLIBC_${formatVersion(required)}, but no GNU libc was detected on this host.`,
|
|
106
|
-
"This usually means you're on a musl-based distro such as Alpine.",
|
|
107
|
-
"",
|
|
108
|
-
buildFromSourceHint(),
|
|
109
|
-
"",
|
|
110
|
-
"Set DEEPSEEK_TUI_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.",
|
|
111
|
-
].join("\n"),
|
|
112
|
-
);
|
|
127
|
+
throw new Error(glibcCompatibilityMessage(required, null));
|
|
113
128
|
}
|
|
114
129
|
|
|
115
130
|
if (compareVersion(host, required) < 0) {
|
|
116
|
-
throw new Error(
|
|
117
|
-
[
|
|
118
|
-
`Prebuilt DeepSeek TUI binary requires GLIBC_${formatVersion(required)} but this system has glibc ${formatVersion(host)}.`,
|
|
119
|
-
"Older distros (CentOS 7/8, RHEL 7/8, Debian 10, etc.) ship an older glibc that is not compatible with the prebuilt artifact.",
|
|
120
|
-
"",
|
|
121
|
-
buildFromSourceHint(),
|
|
122
|
-
"",
|
|
123
|
-
"Set DEEPSEEK_TUI_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.",
|
|
124
|
-
].join("\n"),
|
|
125
|
-
);
|
|
131
|
+
throw new Error(glibcCompatibilityMessage(required, host));
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
134
|
|
|
@@ -131,5 +137,11 @@ module.exports = {
|
|
|
131
137
|
detectHostGlibc,
|
|
132
138
|
detectBinaryRequiredGlibc,
|
|
133
139
|
// exported for tests
|
|
134
|
-
_internal: {
|
|
140
|
+
_internal: {
|
|
141
|
+
parseVersion,
|
|
142
|
+
compareVersion,
|
|
143
|
+
formatVersion,
|
|
144
|
+
glibcCompatibilityMessage,
|
|
145
|
+
skipGlibcCheck,
|
|
146
|
+
},
|
|
135
147
|
};
|
package/test/install.test.js
CHANGED
|
@@ -10,6 +10,7 @@ const installScript = fs.readFileSync(
|
|
|
10
10
|
"utf8",
|
|
11
11
|
);
|
|
12
12
|
const { installFailureHint, _internal } = require("../scripts/install");
|
|
13
|
+
const { _internal: glibcInternal } = require("../scripts/preflight-glibc");
|
|
13
14
|
|
|
14
15
|
function sha256(content) {
|
|
15
16
|
return crypto.createHash("sha256").update(content).digest("hex");
|
|
@@ -111,6 +112,49 @@ test("install failure hint checks configured release base when override is alrea
|
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
|
|
115
|
+
test("glibc preflight message is CodeWhale-branded and actionable", () => {
|
|
116
|
+
const message = glibcInternal.glibcCompatibilityMessage([2, 39, 0], [2, 35, 0]);
|
|
117
|
+
|
|
118
|
+
assert.match(message, /Prebuilt CodeWhale Linux binaries require GLIBC_2\.39/);
|
|
119
|
+
assert.match(message, /this system has glibc 2\.35/);
|
|
120
|
+
assert.match(message, /cargo install codewhale-cli --locked/);
|
|
121
|
+
assert.match(message, /build Linux GNU assets against an older glibc/);
|
|
122
|
+
assert.match(message, /CODEWHALE_SKIP_GLIBC_CHECK=1/);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test("glibc preflight accepts canonical and legacy skip env vars", () => {
|
|
126
|
+
const previousCodewhale = process.env.CODEWHALE_SKIP_GLIBC_CHECK;
|
|
127
|
+
const previousTui = process.env.DEEPSEEK_TUI_SKIP_GLIBC_CHECK;
|
|
128
|
+
const previousLegacy = process.env.DEEPSEEK_SKIP_GLIBC_CHECK;
|
|
129
|
+
delete process.env.CODEWHALE_SKIP_GLIBC_CHECK;
|
|
130
|
+
delete process.env.DEEPSEEK_TUI_SKIP_GLIBC_CHECK;
|
|
131
|
+
delete process.env.DEEPSEEK_SKIP_GLIBC_CHECK;
|
|
132
|
+
try {
|
|
133
|
+
assert.equal(glibcInternal.skipGlibcCheck(), false);
|
|
134
|
+
process.env.CODEWHALE_SKIP_GLIBC_CHECK = "1";
|
|
135
|
+
assert.equal(glibcInternal.skipGlibcCheck(), true);
|
|
136
|
+
delete process.env.CODEWHALE_SKIP_GLIBC_CHECK;
|
|
137
|
+
process.env.DEEPSEEK_TUI_SKIP_GLIBC_CHECK = "1";
|
|
138
|
+
assert.equal(glibcInternal.skipGlibcCheck(), true);
|
|
139
|
+
} finally {
|
|
140
|
+
if (previousCodewhale === undefined) {
|
|
141
|
+
delete process.env.CODEWHALE_SKIP_GLIBC_CHECK;
|
|
142
|
+
} else {
|
|
143
|
+
process.env.CODEWHALE_SKIP_GLIBC_CHECK = previousCodewhale;
|
|
144
|
+
}
|
|
145
|
+
if (previousTui === undefined) {
|
|
146
|
+
delete process.env.DEEPSEEK_TUI_SKIP_GLIBC_CHECK;
|
|
147
|
+
} else {
|
|
148
|
+
process.env.DEEPSEEK_TUI_SKIP_GLIBC_CHECK = previousTui;
|
|
149
|
+
}
|
|
150
|
+
if (previousLegacy === undefined) {
|
|
151
|
+
delete process.env.DEEPSEEK_SKIP_GLIBC_CHECK;
|
|
152
|
+
} else {
|
|
153
|
+
process.env.DEEPSEEK_SKIP_GLIBC_CHECK = previousLegacy;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
114
158
|
test("ensureBinary adopts a manually placed target binary after checksum validation", async (t) => {
|
|
115
159
|
const dir = await makeTempDir(t);
|
|
116
160
|
const target = path.join(dir, process.platform === "win32" ? "codewhale.exe" : "codewhale");
|