This document covers what npm run setup actually does, per-OS notes, and troubleshooting. For the one-line quickstart, see the root README.md.
npx --yes git+ssh://[email protected]/amplimind/AImplimind.gitThis clones the repo, runs npm install, then runs the same npm run setup wizard described below — it doesn't reimplement any of it. See the README's "Internal one-command bootstrap" section for the full option list (--target, --repo, --branch, --mode, --skip-setup, --start, --yes, --check-only) and the SSH/private-repo prerequisites.
The rest of this document assumes you already have the repo locally (either via the bootstrap above or a manual git clone) and are running npm run setup directly.
In order:
- Base tools — Node.js version, npm, Git. Informational only; if you got far enough to run
npm run setup, Node is already there. - Project dependencies — checks
node_modules. If missing, asks to runnpm install(auto-confirmed under--yes). - Local app data — ensures
data/,data/local-ai-workbench/,data/local-ai-workbench/opencode/, andlogs/exist. Never deletes or overwrites existing files; re-running is a no-op once they exist. - Ollama — checks the CLI and whether the API (
http://localhost:11434) is reachable. If the CLI is missing, shows the OS-specific install command and asks before running it. If the API isn't reachable, attempts to start it and polls for up to 15 seconds. - Recommended models — offers starter models based on the setup mode (see below). Always asks before pulling, and shows the approximate download size first.
- OpenCode — checks the CLI. In
basicmode this is just a status line (OpenCode is optional there). Incoding/fullmode, offers to install it vianpm install -g opencode-aiand asks before running it. - Summary — prints the exact commands to start the app and where the log file is.
Nothing external runs without you seeing the exact command first and confirming it. --yes only auto-confirms safe, project-local, fully reversible steps (creating folders, npm install) — it never silently installs Ollama, OpenCode, or pulls a model.
| Mode | Project deps + app data | Ollama | Starter models offered | OpenCode |
|---|---|---|---|---|
basic (default) |
yes | check/install/start | qwen3:8b (chat) |
status only |
coding |
yes | check/install/start | + qwen2.5-coder:7b |
check/install offered |
full |
yes | check/install/start | + qwen2.5-coder:14b, nomic-embed-text |
check/install offered |
check-only |
no installs — report only | report only | not offered | report only |
Already-installed models are detected by base name (e.g. qwen3:8b matches an existing qwen3:latest) and skipped.
- Ollama: prefers
winget install --id Ollama.Ollama -e; falls back to a manual download link if winget isn't available. - The wizard does not assume admin rights and does not change your PowerShell execution policy. If running
setup.ps1directly is blocked by execution policy, either runnpm run setupinstead (goes through Node, not PowerShell scripting) or run PowerShell with-ExecutionPolicy Bypassfor that one invocation:powershell -ExecutionPolicy Bypass -File .\setup.ps1
- OpenCode: installed via
npm install -g opencode-ai, which dropsopencode.exeunder%APPDATA%\npm\node_modules\opencode-ai\bin.
- Ollama: prefers
brew install ollamaif Homebrew is set up; otherwise shows the official.dmg/app download link as a manual fallback. - OpenCode: same
npm install -g opencode-aipath as everywhere else.
- Ollama: uses the official install script (
curl -fsSL https://ollama.com/install.sh | sh) — only after you confirm it, per the no-silent-remote-scripts rule. If you'd rather inspect it first, decline the prompt and run it yourself, or checksystemctl status ollamaif you already have it as a service.
npm run setup -- --check-onlyPrints a status report (Node/npm/Git, project deps, app data, Ollama CLI+API, OpenCode) and exits. Installs nothing, prompts for nothing, modifies nothing. Use this to see what's missing before deciding which mode to run.
- "Ollama API unreachable" after install: the installer may need a moment, or the Ollama app/service may not have started automatically. Start it manually (open the Ollama app on Windows/macOS, or
ollama servefrom a terminal on Linux), then re-runnpm run setup -- --check-onlyto confirm. - Port 11434 already in use by something else: stop whatever's bound to that port, or note that Ollama itself may already be running — check
npm run setup -- --check-only. - Model pull is slow/stuck: model downloads can be several GB; this is expected on a slow connection. You can re-run
npm run setuplater — already-installed models are skipped automatically.
- "OpenCode CLI not found" after running the install command: the npm global bin directory may not be on your
PATHyet in the current shell. Open a new terminal and re-runnpm run setup -- --check-only. - OpenCode launches but a coding model gives poor results: pick a model tagged "coding" in the Models/OpenCode page in the app, or re-run setup with
--mode codingto pullqwen2.5-coder:7b. - See the in-app OpenCode page for install status, project picker, and launch — it uses the same detection logic as this wizard.
Everything lives under the repo, nothing leaves your machine:
data/local-ai-workbench.sqlite— chat sessions and messagesdata/local-ai-workbench/opencode/opencode.json— app-managed OpenCode config (only used when you pick "app-managed config" mode when launching OpenCode; "project-local config" writesopencode.jsoninto the target project instead)logs/setup.log— setup wizard log: timestamps, OS, mode, checks, commands run, success/failure. No secrets, no chat content, no source code are ever logged.
Inference runs through your local Ollama instance. Chat sessions, models, and OpenCode configuration stay on your machine. The setup wizard's only network activity is the install commands and model pulls you explicitly confirm, plus checking http://localhost:11434 (your own machine).
This task is scoped to one-command developer setup. Planning notes for a later, fuller product packaging effort:
- Desktop wrapper: Tauri is the leading candidate over Electron (smaller binary, no bundled Chromium-per-app overhead) for wrapping the existing Vite frontend + spawning/managing the NestJS API as a sidecar process.
- Windows installer: an MSI/NSIS installer that bundles Node (or a packaged binary via
pkg/Tauri's bundler) so end users don't need Node preinstalled — separate from this developer-facingnpm run setupflow. - Company-internal distribution: this setup wizard is structured (
installers.mjsreturns plan objects with acommand, not just runs things) so a company-internal mirror or proxy for the Ollama/OpenCode install commands and model registry can be swapped in later without touching the wizard's flow logic. - Signed binaries: relevant once there's an actual installer/binary to sign; not applicable to the current Node-script-based setup.
- Offline installer: would need a pre-downloaded Ollama installer + pre-pulled model blobs bundled together; out of scope for now since the default flow assumes internet access for the initial install.
None of this changes the current one-command developer setup — it's just where the seams already are for later work.