Skip to content
Minnow
21
Download

Command reference

Every npm script, the headless CLI, smoke/maintenance scripts, and environment variables. Source of truth: package.json. Setup from source: setup-from-source.md. System map: architecture.md and ../context.md.

For UI key bindings (composer, editor, file tree, terminal), see Keyboard shortcuts.

Running & building

CommandDescription
npm startRecommended. node server.js → Vite + tool server + ~/.minnow APIs + Electron desktop shell.
npm run devVite only (UI/HMR). Most server features unavailable.
npm run desktopAlias for electron:dev.
npm run electron:devconcurrently Vite (HMR, MINNOW_ELECTRON=1) + Electron via scripts/electron-dev.mjs.
npm run electron:buildCompile the Electron main/preload (electron/tsconfig.json) + rename preload + write electron/dist/package.json version stub.
node scripts/verify-github-update-feed.mjsCompare GitHub latest*.yml sizes to attached installers (v<package.json version> or pass a tag).
npm run electron:prodFull build + Electron build, then run the packaged main against dist/.
npm run buildtsc && vite builddist/. prebuild regenerates src/skills/builtin-manifest.json.
npm run previewvite preview of the production build (no tool API).
npm run packageBuild + Electron build + electron-builder installer → release/pkg (Windows NSIS, macOS dmg/zip, plus latest.yml auto-update feed metadata; never uploads — see releasing).
npm run package:win / package:mac / package:linuxPackage a single platform. On Windows/macOS, AppImage needs Docker — use npm run package:linux:docker. package:win / package:linux run sandbox:ensure-helper first (Linux ELF for Landlock; WSL build on Windows).
npm run package:dirSame, unpacked directory (--dir).
npm run package:cleanClean the release/ output.
npx tsc --noEmitTypecheck only.

Generated artifacts

prebuild runs these automatically before npm run build; run them by hand when you change a source of truth and want the generated file refreshed without a full build.

CommandRegenerates
npm run wiki:generateserver/product-wiki/catalog.json from documentation/run after editing any wiki page
npm run test:product-wikiCatalog sync + manual copy gates (also CI job product wiki; not part of npm test)
npm run wiki:stageStages the GitHub Wiki tree (see wiki-publishing)
npm run settings-registry:generateserver/settings/registry-manifest.json from the settings catalog
npm run skills-library:indexSkills Library index
npm run check:iconsFails when an icon reference has no asset

Headless CLI (minnow run)

Drives one agent turn without the SPA. Requires the tool server (npm start) or pass --start-server. Entry: bin/minnow.mjssrc/headless/cli-main.ts.

minnow run --workspace . --agent builder --mode build \
  --prompt "Summarize README.md" --json-out run.json

# or via npm
npm run minnow:run -- --prompt "Reply OK" --json

Flags (minnow run --help for the authoritative list):

FlagPurpose
--prompt <text> / --stdinThe user message (or read from stdin).
--workspace <dir>Workspace root for file/git tools.
--agent <id>Work agent to use.
--mode <id>general / build / plan / orchestrate / debug.
--model <id> / --provider <id>Override model / provider.
--profile <id>Prompt profile / setup bundle.
--base-url <url>Server origin (default detected; e.g. http://127.0.0.1:9473).
--start-serverStart a tool server for the run.
--server-timeout <ms>Server readiness timeout.
--json / --json-out <file>Machine-readable result to stdout / file.
--max-tool-turns <n>Cap tool-call iterations.
--no-approval / --auto-reject-questionsNon-interactive tool/question handling.
--persist-chat / --chat-id <id> / --chat-name <name>Save the transcript into ~/.minnow/sessions.
--scheduler-runMarks a scheduler-originated run.
--minnow-home <dir>Override ~/.minnow.
--quietSuppress progress logs.

UI-only tools (e.g. ask_question) fail with a clear error in headless mode unless you opt into unsafe automation (MINNOW_I_UNDERSTAND_UNSAFE_AUTOMATION).

Tests

npm test runs the full suite via test/run-all.mjs — it discovers every test/**/*.test.{js,mjs,mts,ts} file and runs the correct runner/loader per path (see test/test-config.mjs). New test files are included automatically; npm run test:check-coverage fails CI when a file would be orphaned. Worker parallelism defaults to min(16, availableParallelism()); override with MINNOW_TEST_CONCURRENCY.

Memory: every runner preloads test/assert-dom-safe.mjs. Without it a failing assert.equal(document.querySelector('.x'), null) hands a happy-dom node to node:assert, which inspects it at depth: 1000 and Myers-diffs the result — synchronous, unbounded typed-array allocation that --max-old-space-size cannot cap, and enough to freeze a 64 GB workstation from a single test process (measured: one child at 49 GB and still climbing). The guard compares DOM operands itself and reports a short descriptor (<section.board-root>) instead. Do not remove the preload, and prefer assert.ok(!el) over comparing elements when adding assertions.

CI (MIN-383): .github/workflows/ci.yml runs on pull requests and pushes to main: npm citest:check-coveragenpx tsc --noEmitnpm test on windows-latest, ubuntu-latest, and macos-latest (includes test/headless/). Require the ci status check on main before merge (.github/BRANCH_PROTECTION.md).

Scoped suites (each delegates to node test/run-all.mjs --suite <name>):

CommandArea
npm run test:memoryMemory store + API
npm run test:brainBrain wiki / CORTEX
npm run test:engineRetrieval engine
npm run test:lspLSP integration
npm run test:mcpMCP servers
npm run test:browserCDP / browser preview tools
npm run test:skillsSkills loader + clients
npm run test:impeccable / test:skills-impeccableImpeccable skill + /impeccable
npm run test:attachmentsWorkspace refs + document readers
npm run test:researchDeep research
npm run test:benchmarkBenchmark app
npm run test:evalsEval harness
npm run test:webhooksOutgoing webhooks
npm run test:notificationsNotification inbox
npm run test:serversManaged server processes
npm run test:pluginsTool plugin scan/loader
npm run test:terminal-ptyTerminal PTY session (live server)
npm run test:ui-designerUI Designer agent
npm run test:settingsSettings registry
npm run test:orchestrator / test:boardOrchestrator V2 journal suite — see orchestrate-board-testing.md
npm run test:check-coverageOrphan test detection (also in CI)

Most TS/UI suites run under tsx with --import ./test/test-loader.mjs (stubs .css + xterm); some use --experimental-test-module-mocks.

Skill maintenance

CommandDescription
npm run impeccable:syncRe-vendor Impeccable into src/skills/impeccable/.
npm run impeccable:updateUpdate upstream Impeccable, then re-sync.
npm run impeccable:detectAnti-pattern scan of src/ + index.html (exit 2 = issues found).
npm run caveman:syncRefresh the upstream Caveman SKILL.md.
npm run matt-pocock-skills:syncRe-vendor the Matt Pocock skill pack.
node scripts/build-benchmark-packs.mjsRebuild benchmark task packs into public/benchmark-packs/ (no npm alias).
npm run report:bundle-sizePrint production chunk sizes from dist/assets (run after npm run build).
npm run report:bundle-size:ciSame as above; exits non-zero when entry chunk exceeds 1500 KB or data packs ship as JS.

Orchestrate board dev tools

CommandDescription
npm run test:orchestrator / test:boardV2 journal suite (test/orchestrator/ + scenario catalog). See orchestrate-board-testing.md.
npm run board:scenario-contractValidate the Settings board-testing catalog (PR gate).
npm run fake-modelLocal OpenAI-v1 stub for manual board runs. npm run fake-model -- --register adds provider fake-board.
npm run check:board-logRetired (exit 1). V1 JSONL invariants were deleted in MIN-713. V2 history is the journal under ~/.minnow/boards/.

Smoke scripts

Run with the server up (default port 9473 — substitute yours). API calls need the per-boot session token from ~/.minnow/session-token:

npx tsx scripts/sa16-smoke.mjs http://localhost:9473       # general/sub-agent smoke
node test/terminal-stream.test.mjs http://localhost:9473   # terminal stream API
npx tsx scripts/step16-memory-smoke.mjs http://localhost:9473

Other scripts/*.mjs cover stepwise feature smokes, Electron launch, token/CSS generation, and migrations — see the scripts/ folder.

Environment variables

VariableEffect
PORTServer/Vite port (default 9473, falls back to next free). 5173 is ignored and coerced to 9473 — it’s reserved for dev servers in your workspace.
MINNOW_HOMEOverride the ~/.minnow data directory.
MINNOW_BROWSER=1Open a system browser tab instead of the Electron shell.
MINNOW_HEADLESS=1 / BROWSER=noneDon’t auto-open any window.
MINNOW_ELECTRON=1Internal flag set when running under Electron.
TOOLS_ALLOW_ALL_PATHS=1Let file/git tools resolve outside the workspace root (use with care).
MINNOW_OAUTH_REDIRECT_BASEOverride the OAuth redirect base URL.
MINNOW_NETWORKlocal (default) or lan — bind dev server to loopback vs all interfaces. Overrides config.jsonserver.networkAccess. Restart after changing Settings. On Windows, allow inbound TCP on the dev port in Firewall if LAN clients cannot connect. See lan-companion.md.
MINNOW_DEBUGVerbose server logging; enables Settings → Advanced → Board testing and /api/orchestrate/board-testing/* (with MINNOW_TEST=1 for CI harnesses).
MINNOW_I_UNDERSTAND_UNSAFE_AUTOMATIONAllow UI-only tools in headless runs.
MINNOW_PLUGIN_UNSAFEAllow unsigned/unsafe tool plugins.
MINNOW_TTS_USE_COMPILEOpt into compiled TTS path.
MINNOW_TESTSet during test runs.
---