rohitg00/agentmemory · warning

curl or sh not found. Install manually: ${iiiConsoleInstal

Error message

curl or sh not found. Install manually:
  ${iiiConsoleInstallHint()}

What it means

agentmemory can auto-install the iii console web UI using a bundled shell command (III_CONSOLE_INSTALL_CMD) executed as `sh -c`. Before running it, the CLI verifies both `sh` and `curl` exist via whichBinary; if either is missing it prints this warning with the manual install hint (iiiConsoleInstallHint) and leaves console state unchanged.

Source

Thrown at src/cli.ts:1313

  if (!process.stdin.isTTY || process.env["CI"]) return state;
  const prefs = readPrefs();
  if (prefs.skipConsoleInstall) return state;

  const answer = await p.confirm({
    message:
      "iii console gives engine-level visibility (workers, functions, queues, traces). Install now?",
    initialValue: true,
  });
  if (p.isCancel(answer)) return state;
  if (answer === false) {
    writePrefs({ skipConsoleInstall: true });
    return state;
  }

  const shBin = whichBinary("sh");
  const curlBin = whichBinary("curl");
  if (!shBin || !curlBin) {
    p.log.warn(
      `curl or sh not found. Install manually:\n  ${iiiConsoleInstallHint()}`,
    );
    return state;
  }
  const ok = runCommand(shBin, ["-c", III_CONSOLE_INSTALL_CMD], {
    label: "Installing iii console",
  });
  if (!ok) {
    p.log.warn(
      `iii console install failed. Re-run manually:\n  ${iiiConsoleInstallHint()}`,
    );
    return state;
  }
  // Re-detect rather than trust install-script output paths.
  return detectIiiConsole();
}

function adoptRunningEngine(): void {

View on GitHub (pinned to e04ba88819)

Solutions

  1. Install curl and ensure a POSIX sh exists (`apk add curl`, `apt-get install -y curl`).
  2. On Windows, run from WSL or Git Bash where sh and curl are available.
  3. Perform the manual install using the command printed by the hint (iiiConsoleInstallHint) instead of auto-install.
  4. Fix PATH so /bin and /usr/bin are included in the environment running the CLI.

Example fix

// before: no curl in container
$ agentmemory start  # curl or sh not found
// after
$ apt-get update && apt-get install -y curl && agentmemory start
Defensive patterns

Strategy: fallback

Validate before calling

import { execFileSync } from "node:child_process";
const missing = ["sh", "curl"].filter((b) => {
  try { execFileSync(IS_WINDOWS ? "where" : "which", [b], { stdio: "ignore" }); return false; }
  catch { return true; }
});
if (missing.length) console.error(`Install missing tools first: ${missing.join(", ")}`);

Try / catch

try {
  ensureIiiConsole();
} catch {
  console.error("Auto-install unavailable; follow the manual hint printed by the CLI.");
}

Prevention

When it happens

Trigger: Console install/ensure path runs on a system where `which sh` or `which curl` returns nothing — e.g. minimal Windows environments without POSIX sh, or slim containers without curl.

Common situations: Windows without WSL/Git-Bash on PATH; alpine/distroless containers missing curl; CI images stripped of core utilities; PATH overrides in sandboxes dropping /usr/bin or /bin.

Related errors


AI-assisted analysis of rohitg00/agentmemory@e04ba88819 (2026-08-30). Data as JSON: /api/errors/69a1b249163bb87a. Report an issue: GitHub.