iOfficeAI/OfficeCLI · error · OfficeCliError
officecli install failed. Run manually: curl -fsSL ${INS
Error message
officecli install failed. Run manually:
curl -fsSL ${INSTALL_SH_MIRROR} | bash What it means
Thrown by install() on macOS/Linux when the bash-driven install (install.sh via `(curl mirror || curl github) | bash`) exits non-zero. It surfaces the failure and points the user at the manual curl | bash invocation. This is the Unix counterpart of error 10.
Source
Thrown at sdk/node/index.js:637
const ps = `$s = try { irm '${INSTALL_PS1_MIRROR}' } catch { irm '${INSTALL_PS1_GITHUB}' }; $s | iex`;
const r = spawnSync('powershell', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', ps], {
stdio: 'inherit',
});
if (r.status !== 0) {
throw new OfficeCliError(
r.status == null ? -1 : r.status,
`officecli install failed. Run manually:\n irm ${INSTALL_PS1_MIRROR} | iex`
);
}
return;
}
process.stderr.write(`Installing officecli via ${INSTALL_SH_MIRROR} (github fallback) ...\n`);
// (curl mirror || curl github) | bash — the subshell emits whichever script
// fetch succeeds; the group keeps the pipe bound to the whole fallback.
const sh = `(curl -fsSL ${INSTALL_SH_MIRROR} 2>/dev/null || curl -fsSL ${INSTALL_SH_GITHUB}) | bash`;
const r = spawnSync('bash', ['-c', sh], { stdio: 'inherit' });
if (r.status !== 0) {
throw new OfficeCliError(
r.status == null ? -1 : r.status,
`officecli install failed. Run manually:\n curl -fsSL ${INSTALL_SH_MIRROR} | bash`
);
}
}
module.exports = { open, create, install, Document, OfficeCliError, pipePaths };
View on GitHub (pinned to 1ced45e900)
Solutions
- Run the manual command: `curl -fsSL https://d.officecli.ai/install.sh | bash` and read its output.
- If curl is missing, install it (apt-get/yum install curl) or substitute wget.
- For proxy/TLS issues, set HTTPS_PROXY or bypass the inspector for d.officecli.ai.
- Ensure HOME and ~/.local/bin are writable; add ~/.local/bin to PATH after install.
Example fix
# before: install() -> officecli install failed. Run manually: curl -fsSL ... | bash # after: run the installer directly with proxy set HTTPS_PROXY=http://proxy:8080 curl -fsSL https://d.officecli.ai/install.sh | bash export PATH="$HOME/.local/bin:$PATH"
Defensive patterns
Strategy: fallback
Try / catch
// Fall back to the documented manual curl|bash command
try { require('@officecli/sdk').install(); }
catch (e) {
if (/install failed/i.test(e.message)) {
require('child_process').execSync('bash -c "curl -fsSL https://d.officecli.ai/install.sh | bash"', { stdio: 'inherit' });
} else throw e;
} Prevention
- Bake the install.sh step into your Dockerfile so runtime never depends on it.
- Ensure curl and bash are present and ~/.local/bin is writable + on PATH.
- Set HTTPS_PROXY in proxied environments.
When it happens
Trigger: curl is absent or blocked; no network egress to the mirror and GitHub; bash is missing/unusual; the script errors partway (cannot write ~/.local/bin); a corporate TLS inspector rewrites the script; curl returns non-zero because both URLs 404.
Common situations: Minimal containers without curl; air-gapped Linux; a proxy that strips/modifies the downloaded script; read-only HOME.
Related errors
- officecli install failed (exit {r.returncode}). Run manually
- Checksum mismatch for ${asset} (expected ${expected}, got ${
- Could not download OfficeCLI binary (${asset} @ ${TAG}). Las
- officecli install failed. Run manually: irm ${INSTALL_PS
- officecli install failed (exit {r.returncode}). Run manually
AI-assisted analysis of iOfficeAI/OfficeCLI@1ced45e900 (2026-08-13).
Data as JSON: /api/errors/aa38183eeb66483d.
Report an issue: GitHub.