helpofai 0.8.62
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 +114 -0
- package/bin/helpofai-tui.js +8 -0
- package/bin/helpofai.js +8 -0
- package/bin/hoa.js +8 -0
- package/package.json +62 -0
- package/scripts/artifacts.js +136 -0
- package/scripts/install.js +1182 -0
- package/scripts/preflight-glibc.js +147 -0
- package/scripts/run.js +71 -0
- package/scripts/verify-release-assets.js +140 -0
- package/test/artifacts.test.js +76 -0
- package/test/install.test.js +224 -0
- package/test/postinstall.test.js +157 -0
- package/test/run.test.js +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# helpofai
|
|
2
|
+
|
|
3
|
+
> The terminal coding agent for any model — open models first.
|
|
4
|
+
|
|
5
|
+
HelpOfAi 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.
|
|
10
|
+
|
|
11
|
+
This npm package is a small launcher: it downloads the matching native
|
|
12
|
+
HelpOfAi binaries for your platform, verifies them against the release
|
|
13
|
+
SHA-256 manifest, and installs the `helpofai`, `hoa`, and `helpofai-tui`
|
|
14
|
+
commands. The application state and credentials still live in HelpOfAi's
|
|
15
|
+
normal config files, not inside `node_modules`.
|
|
16
|
+
|
|
17
|
+
> Previously published as `deepseek-tui`. See
|
|
18
|
+
> [docs/REBRAND.md](https://github.com/helpofai/HelpOfAi-Cli/blob/main/docs/REBRAND.md)
|
|
19
|
+
> for the migration notes; the legacy `deepseek-tui` npm package is deprecated
|
|
20
|
+
> and receives no further releases.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g helpofai
|
|
26
|
+
# or
|
|
27
|
+
pnpm add -g helpofai
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For project-local usage:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install helpofai
|
|
34
|
+
npx helpofai --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`postinstall` tries to download platform binaries into `bin/downloads/`. If
|
|
38
|
+
GitHub release assets are temporarily unreachable, install continues and the
|
|
39
|
+
wrapper retries the download on first run.
|
|
40
|
+
|
|
41
|
+
## First run
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
helpofai auth set --provider deepseek
|
|
45
|
+
helpofai auth status
|
|
46
|
+
helpofai doctor
|
|
47
|
+
helpofai
|
|
48
|
+
```
|
|
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/helpofai/HelpOfAi-Cli/blob/main/docs/PROVIDERS.md).
|
|
54
|
+
|
|
55
|
+
The `helpofai` facade and `helpofai-tui` binary share
|
|
56
|
+
`~/.helpofai/config.toml` for auth and default model settings. Legacy
|
|
57
|
+
`~/.deepseek/config.toml` installs are still read as a compatibility fallback.
|
|
58
|
+
Common TUI commands are available directly through the facade, including
|
|
59
|
+
`helpofai doctor`, `helpofai models`, `helpofai sessions`, and
|
|
60
|
+
`helpofai resume --last`.
|
|
61
|
+
|
|
62
|
+
## Supported platforms
|
|
63
|
+
|
|
64
|
+
Prebuilt binaries for the GitHub release are downloaded automatically:
|
|
65
|
+
|
|
66
|
+
- Linux x64
|
|
67
|
+
- Linux arm64
|
|
68
|
+
- Linux riscv64
|
|
69
|
+
- macOS x64 / arm64
|
|
70
|
+
- Windows x64
|
|
71
|
+
|
|
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
|
|
75
|
+
shipped as prebuilts. Unsupported platforms, checksum failures, and glibc
|
|
76
|
+
compatibility problems still fail with a clear error pointing you at
|
|
77
|
+
`cargo install helpofai-cli helpofai-tui --locked` and the full
|
|
78
|
+
[docs/INSTALL.md](https://github.com/helpofai/HelpOfAi-Cli/blob/main/docs/INSTALL.md)
|
|
79
|
+
build-from-source guide.
|
|
80
|
+
|
|
81
|
+
## Wrapper configuration
|
|
82
|
+
|
|
83
|
+
| Setting | What it does |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| `helpofaiBinaryVersion` in `package.json` | Default native binary version. `deepseekBinaryVersion` is still read as a backward-compat fallback. |
|
|
86
|
+
| `HELPOFAI_RELEASE_BASE_URL` | Canonical override: use an internal or mirrored release-asset directory when GitHub Releases is unavailable. The directory must contain `helpofai-artifacts-sha256.txt` and the platform binaries. `DEEPSEEK_TUI_RELEASE_BASE_URL` and `DEEPSEEK_RELEASE_BASE_URL` are the implemented legacy fallbacks. |
|
|
87
|
+
| `HELPOFAI_USE_CNB_MIRROR=1` | Download release assets from the CNB (China-friendly) mirror instead of GitHub. |
|
|
88
|
+
| `DEEPSEEK_TUI_VERSION` or `DEEPSEEK_VERSION` | Override the GitHub release version to download. |
|
|
89
|
+
| `DEEPSEEK_TUI_GITHUB_REPO` or `DEEPSEEK_GITHUB_REPO` | Override the source repo. Defaults to `helpofai/HelpOfAi-Cli`. |
|
|
90
|
+
| `DEEPSEEK_TUI_FORCE_DOWNLOAD=1` | Force download even when the cached binary is already present. |
|
|
91
|
+
| `DEEPSEEK_TUI_DISABLE_INSTALL=1` | Skip install-time download. |
|
|
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
|
+
`HELPOFAI_RELEASE_BASE_URL` at a local mirror.
|
|
101
|
+
|
|
102
|
+
## Release integrity
|
|
103
|
+
|
|
104
|
+
- `npm publish` runs a release-asset check to ensure all required binary assets
|
|
105
|
+
exist for the target GitHub release before publishing.
|
|
106
|
+
- Install-time downloads are verified against the release checksum manifest before
|
|
107
|
+
the wrapper marks them executable.
|
|
108
|
+
|
|
109
|
+
## Links
|
|
110
|
+
|
|
111
|
+
- Repository: <https://github.com/helpofai/HelpOfAi-Cli>
|
|
112
|
+
- Website: <https://helpofai.net/>
|
|
113
|
+
- Provider registry: [docs/PROVIDERS.md](https://github.com/helpofai/HelpOfAi-Cli/blob/main/docs/PROVIDERS.md)
|
|
114
|
+
- Changelog: [CHANGELOG.md](https://github.com/helpofai/HelpOfAi-Cli/blob/main/CHANGELOG.md)
|
package/bin/helpofai.js
ADDED
package/bin/hoa.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "helpofai",
|
|
3
|
+
"version": "0.8.62",
|
|
4
|
+
"helpofaiBinaryVersion": "0.8.62",
|
|
5
|
+
"description": "Install and run HelpOfAi, the agentic terminal for open-source and open-weight coding models, from GitHub release artifacts.",
|
|
6
|
+
"author": "helpofai",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": [
|
|
9
|
+
{
|
|
10
|
+
"type": "github",
|
|
11
|
+
"url": "https://github.com/sponsors/helpofai"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "buymeacoffee",
|
|
15
|
+
"url": "https://www.buymeacoffee.com/helpofai"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://github.com/helpofai/HelpOfAi-Cli",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/helpofai/HelpOfAi-Cli.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/helpofai/HelpOfAi-Cli/issues"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"helpofai",
|
|
28
|
+
"deepseek",
|
|
29
|
+
"cli",
|
|
30
|
+
"tui",
|
|
31
|
+
"rust",
|
|
32
|
+
"binary",
|
|
33
|
+
"terminal"
|
|
34
|
+
],
|
|
35
|
+
"type": "commonjs",
|
|
36
|
+
"bin": {
|
|
37
|
+
"helpofai": "bin/helpofai.js",
|
|
38
|
+
"hoa": "bin/hoa.js",
|
|
39
|
+
"helpofai-tui": "bin/helpofai-tui.js"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"release:check": "node scripts/verify-release-assets.js",
|
|
43
|
+
"postinstall": "node scripts/install.js --optional",
|
|
44
|
+
"prepublishOnly": "node scripts/verify-release-assets.js",
|
|
45
|
+
"prepack": "node scripts/install.js",
|
|
46
|
+
"test": "node --test test/*.test.js"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"preferGlobal": true,
|
|
55
|
+
"files": [
|
|
56
|
+
"bin/*.js",
|
|
57
|
+
"scripts/*.js",
|
|
58
|
+
"test/*.js",
|
|
59
|
+
"README.md",
|
|
60
|
+
"package.json"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const os = require("os");
|
|
3
|
+
|
|
4
|
+
const CHECKSUM_MANIFEST = "helpofai-artifacts-sha256.txt";
|
|
5
|
+
|
|
6
|
+
const ASSET_MATRIX = {
|
|
7
|
+
linux: {
|
|
8
|
+
x64: ["helpofai-linux-x64", "helpofai-tui-linux-x64"],
|
|
9
|
+
arm64: ["helpofai-linux-arm64", "helpofai-tui-linux-arm64"],
|
|
10
|
+
riscv64: ["helpofai-linux-riscv64", "helpofai-tui-linux-riscv64"],
|
|
11
|
+
},
|
|
12
|
+
darwin: {
|
|
13
|
+
x64: ["helpofai-macos-x64", "helpofai-tui-macos-x64"],
|
|
14
|
+
arm64: ["helpofai-macos-arm64", "helpofai-tui-macos-arm64"],
|
|
15
|
+
},
|
|
16
|
+
win32: {
|
|
17
|
+
x64: ["helpofai-windows-x64.exe", "helpofai-tui-windows-x64.exe", "helpofai.bat"],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// HarmonyPC (openharmony) is an x86_64 Linux-compatible environment; map it to
|
|
22
|
+
// the linux binary family so npm install succeeds without a separate build target.
|
|
23
|
+
const PLATFORM_ALIASES = {
|
|
24
|
+
openharmony: "linux",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function detectBinaryNames() {
|
|
28
|
+
const rawPlatform = os.platform();
|
|
29
|
+
const platform = PLATFORM_ALIASES[rawPlatform] || rawPlatform;
|
|
30
|
+
const arch = os.arch();
|
|
31
|
+
const defaults = ASSET_MATRIX[platform];
|
|
32
|
+
if (!defaults) {
|
|
33
|
+
const supported = Object.keys(ASSET_MATRIX).map(p => `'${p}'`).join(', ');
|
|
34
|
+
throw new Error(
|
|
35
|
+
`Unsupported platform: ${rawPlatform}. Supported platforms: ${supported}.\n\n` +
|
|
36
|
+
unsupportedBuildHint(),
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
const pair = defaults[arch];
|
|
40
|
+
if (!pair) {
|
|
41
|
+
const supported = Object.keys(defaults).map(a => `'${a}'`).join(', ');
|
|
42
|
+
throw new Error(
|
|
43
|
+
`Unsupported architecture: ${arch} on platform ${platform}. ` +
|
|
44
|
+
`Supported architectures: ${supported}.\n\n` +
|
|
45
|
+
unsupportedBuildHint(),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
platform,
|
|
50
|
+
arch,
|
|
51
|
+
helpofai: pair[0],
|
|
52
|
+
tui: pair[1],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function unsupportedBuildHint() {
|
|
57
|
+
return [
|
|
58
|
+
"No prebuilt binary is available for this platform/architecture combo.",
|
|
59
|
+
"You can still run helpofai by building from source with Cargo:",
|
|
60
|
+
"",
|
|
61
|
+
" # Requires Rust 1.88+ (https://rustup.rs)",
|
|
62
|
+
" cargo install helpofai-cli --locked # provides `helpofai`",
|
|
63
|
+
" cargo install helpofai-tui --locked # provides `helpofai-tui`",
|
|
64
|
+
"",
|
|
65
|
+
"Or build from a checkout:",
|
|
66
|
+
"",
|
|
67
|
+
" git clone https://github.com/helpofai/HelpOfAi-Cli.git",
|
|
68
|
+
" cd HelpOfAi",
|
|
69
|
+
" cargo install --path crates/cli --locked",
|
|
70
|
+
" cargo install --path crates/tui --locked",
|
|
71
|
+
"",
|
|
72
|
+
"See https://github.com/helpofai/HelpOfAi-Cli/blob/main/docs/INSTALL.md",
|
|
73
|
+
"for cross-compilation, mirror, and Linux ARM64 specifics.",
|
|
74
|
+
].join("\n");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function executableName(base, platform) {
|
|
78
|
+
return platform === "win32" ? `${base}.exe` : base;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function releaseBaseUrl(version, repo = "helpofai/HelpOfAi-Cli") {
|
|
82
|
+
// HELPOFAI_RELEASE_BASE_URL is the canonical override.
|
|
83
|
+
// DEEPSEEK_TUI_RELEASE_BASE_URL / DEEPSEEK_RELEASE_BASE_URL are legacy aliases.
|
|
84
|
+
const override =
|
|
85
|
+
process.env.HELPOFAI_RELEASE_BASE_URL ||
|
|
86
|
+
process.env.DEEPSEEK_TUI_RELEASE_BASE_URL ||
|
|
87
|
+
process.env.DEEPSEEK_RELEASE_BASE_URL;
|
|
88
|
+
if (override) {
|
|
89
|
+
const trimmed = String(override).trim();
|
|
90
|
+
return trimmed.endsWith("/") ? trimmed : `${trimmed}/`;
|
|
91
|
+
}
|
|
92
|
+
// When HELPOFAI_USE_CNB_MIRROR is set, use the CNB (China-friendly)
|
|
93
|
+
// mirror that already builds and publishes binary release assets.
|
|
94
|
+
if (process.env.HELPOFAI_USE_CNB_MIRROR) {
|
|
95
|
+
return `https://cnb.cool/helpofai/HelpOfAi-Cli/-/releases/v${version}/`;
|
|
96
|
+
}
|
|
97
|
+
return `https://github.com/${repo}/releases/download/v${version}/`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function releaseAssetUrl(baseName, version, repo = "helpofai/HelpOfAi-Cli") {
|
|
101
|
+
return new URL(baseName, releaseBaseUrl(version, repo)).toString();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function checksumManifestUrl(version, repo = "helpofai/HelpOfAi-Cli") {
|
|
105
|
+
return releaseAssetUrl(CHECKSUM_MANIFEST, version, repo);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function releaseBinaryDirectory() {
|
|
109
|
+
return path.join(__dirname, "..", "bin", "downloads");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function allAssetNames() {
|
|
113
|
+
const names = [];
|
|
114
|
+
for (const platformAssets of Object.values(ASSET_MATRIX)) {
|
|
115
|
+
for (const assets of Object.values(platformAssets)) {
|
|
116
|
+
names.push(...assets);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return Array.from(new Set(names));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function allReleaseAssetNames() {
|
|
123
|
+
return [...allAssetNames(), CHECKSUM_MANIFEST];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
module.exports = {
|
|
127
|
+
allAssetNames,
|
|
128
|
+
allReleaseAssetNames,
|
|
129
|
+
CHECKSUM_MANIFEST,
|
|
130
|
+
checksumManifestUrl,
|
|
131
|
+
detectBinaryNames,
|
|
132
|
+
executableName,
|
|
133
|
+
releaseAssetUrl,
|
|
134
|
+
releaseBaseUrl,
|
|
135
|
+
releaseBinaryDirectory,
|
|
136
|
+
};
|