{"record":{"id":"69a1b249163bb87a","repo":"rohitg00/agentmemory","slug":"curl-or-sh-not-found-install-manually-iiicon","errorCode":null,"errorMessage":"curl or sh not found. Install manually:\n  ${iiiConsoleInstallHint()}","messagePattern":"curl or sh not found\\. Install manually:\n  (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/cli.ts","lineNumber":1313,"sourceCode":"  if (!process.stdin.isTTY || process.env[\"CI\"]) return state;\n  const prefs = readPrefs();\n  if (prefs.skipConsoleInstall) return state;\n\n  const answer = await p.confirm({\n    message:\n      \"iii console gives engine-level visibility (workers, functions, queues, traces). Install now?\",\n    initialValue: true,\n  });\n  if (p.isCancel(answer)) return state;\n  if (answer === false) {\n    writePrefs({ skipConsoleInstall: true });\n    return state;\n  }\n\n  const shBin = whichBinary(\"sh\");\n  const curlBin = whichBinary(\"curl\");\n  if (!shBin || !curlBin) {\n    p.log.warn(\n      `curl or sh not found. Install manually:\\n  ${iiiConsoleInstallHint()}`,\n    );\n    return state;\n  }\n  const ok = runCommand(shBin, [\"-c\", III_CONSOLE_INSTALL_CMD], {\n    label: \"Installing iii console\",\n  });\n  if (!ok) {\n    p.log.warn(\n      `iii console install failed. Re-run manually:\\n  ${iiiConsoleInstallHint()}`,\n    );\n    return state;\n  }\n  // Re-detect rather than trust install-script output paths.\n  return detectIiiConsole();\n}\n\nfunction adoptRunningEngine(): void {","sourceCodeStart":1295,"sourceCodeEnd":1331,"githubUrl":"https://github.com/rohitg00/agentmemory/blob/e04ba88819c365c9acf9d6661ea802143e728bd6/src/cli.ts#L1295-L1331","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install curl and ensure a POSIX sh exists (`apk add curl`, `apt-get install -y curl`).","On Windows, run from WSL or Git Bash where sh and curl are available.","Perform the manual install using the command printed by the hint (iiiConsoleInstallHint) instead of auto-install.","Fix PATH so /bin and /usr/bin are included in the environment running the CLI."],"exampleFix":"// before: no curl in container\n$ agentmemory start  # curl or sh not found\n// after\n$ apt-get update && apt-get install -y curl && agentmemory start","handlingStrategy":"fallback","validationCode":"import { execFileSync } from \"node:child_process\";\nconst missing = [\"sh\", \"curl\"].filter((b) => {\n  try { execFileSync(IS_WINDOWS ? \"where\" : \"which\", [b], { stdio: \"ignore\" }); return false; }\n  catch { return true; }\n});\nif (missing.length) console.error(`Install missing tools first: ${missing.join(\", \")}`);","typeGuard":null,"tryCatchPattern":"try {\n  ensureIiiConsole();\n} catch {\n  console.error(\"Auto-install unavailable; follow the manual hint printed by the CLI.\");\n}","preventionTips":["Base container images on ones including curl (e.g. add curl/tar to Dockerfile).","On Windows use WSL or Git Bash for POSIX tooling.","Keep /bin and /usr/bin on PATH in sandboxes.","Install console manually once to avoid repeated auto-install attempts."],"tags":["environment","path","curl","shell","installation"],"backgroundTag":"required-tooling-missing","analyzedSha":"e04ba88819c365c9acf9d6661ea802143e728bd6","analyzedAt":"2026-08-30T01:07:40.754Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}