Installing Neo
Neo needs Node.js >= 22. There are three ways to install it; pick the one that matches how you want to use Neo.
| Path | Best for | Command |
|---|---|---|
| npm | Most users | npm install -g @nehoraihadad/neo-agent |
| One-line installer | A fresh machine, no npm experience needed | see below |
| Dev clone | Contributing, running from source | git clone + pnpm setup |
After any of these, run neo onboard (or just start neo — it offers onboarding automatically the first time it finds no provider credentials).
1. npm
npm install -g @nehoraihadad/neo-agent
neo onboardThis installs the neo (and neo-stats, neo-tg, neo-wa, neo-live-driver) binaries globally, per package.json's bin field. Re-running npm install -g @nehoraihadad/neo-agent later upgrades in place — this is also what neo update does for you (see Updating below).
2. One-line installer
The installer scripts (install/install.sh, install/install.ps1) check Node, run the npm install, add npm's global bin directory to your user PATH when needed, verify neo --version, and launch neo onboard if you're in an interactive terminal. A new terminal can therefore start Neo with just neo.
macOS / Linux (install/install.sh — POSIX sh, no dependencies beyond npm):
curl -fsSL https://raw.githubusercontent.com/NehoraiHadad/neo/main/install/install.sh | shPass flags through the pipe with sh -s --, e.g. a dry run that checks prerequisites and prints the plan without installing anything:
curl -fsSL https://raw.githubusercontent.com/NehoraiHadad/neo/main/install/install.sh | sh -s -- --dry-runWindows (PowerShell) (install/install.ps1):
irm https://raw.githubusercontent.com/NehoraiHadad/neo/main/install/install.ps1 | iexIf your execution policy blocks running scripts directly, iex (used above) does not go through the script execution policy, so the one-liner works as written. To run a downloaded copy of the script directly instead:
powershell -ExecutionPolicy Bypass -File install.ps1install.ps1 also checks for Git for Windows (Git Bash) on PATH — Neo's bash tool shells out to it. A missing install is a warning, not a fatal error (neo doctor re-flags it later); the suggested fix is:
winget install --id Git.Git -e --source wingetand for Node itself, if missing or too old:
winget install OpenJS.NodeJS.LTS-DryRun / --dry-run
Both installer scripts accept a dry-run flag that checks prerequisites (Node version, and Git on Windows) and prints the install plan without installing or changing anything — useful for CI or verifying a machine before committing to the real install.
3. Dev clone
For contributing to Neo, or running straight from source:
git clone https://github.com/NehoraiHadad/neo.git
cd neo
pnpm setuppnpm setup runs node scripts/setup.mjs, which (in order):
- Checks the Node version (
>=22). - Checks for
pnpmon PATH, runningcorepack enableif it's missing (corepack ships with Node >=22) — Neo pinspnpm@10.xvia package.json'spackageManagerfield. - Runs
pnpm install. - Verifies
better-sqlite3's native bindings load. If they don't (common on Windows, since pnpm blocks postinstall build scripts for native deps by default), it remediates automatically: first tryingpnpm approve-builds better-sqlite3(interactive TTY only), then falling back topnpm rebuild better-sqlite3(non-interactive-safe). You can run either of these yourself if setup didn't catch it — see Troubleshooting below. - On Windows, checks for Git Bash (warning only, not fatal — see the Windows section above).
- Runs
pnpm build. - Runs
pnpm link --global, adds pnpm's global bin directory to your user PATH when needed, and verifiesneo --version. This is automatic; pass--no-linkonly when you explicitly do not want a global dev command. - Runs
neo doctoras a final summary (its own warnings/failures don't fail setup — only a broken build does).
Useful flags: node scripts/setup.mjs --ci (CI mode: no global link), --no-link (explicitly opt out of installing the global dev command), --skip-build (skip pnpm build, e.g. when a prior CI step already built), --self-test (runs setup's own pure-function assertions and exits — no install/build/network).
Troubleshooting
EACCES / permission denied on npm install -g
npm's global prefix usually isn't writable by your user when it points at a system directory. Point it at your home directory instead of reaching for sudo:
mkdir -p ~/.npm-global && npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile && . ~/.profileOn Windows, the equivalent is to avoid an elevated (Administrator) PowerShell — that can leave files owned by a different account than the one you use day to day — and instead point npm's prefix at a folder you own:
npm config set prefix "$env:LOCALAPPDATA\npm"
[Environment]::SetEnvironmentVariable('Path', "$env:LOCALAPPDATA\npm;$env:Path", 'User')Then open a new shell and retry.
better-sqlite3 fails to load (dev clone)
If node -e "require('better-sqlite3')" fails after pnpm install, the native binding didn't build/download for your platform. pnpm setup handles this automatically (see step 4 above); to do it by hand:
pnpm approve-builds better-sqlite3 # interactive TTY checkbox picker
# or, non-interactively:
pnpm rebuild better-sqlite3If that still fails, install a C++ toolchain so node-gyp can compile from source (Windows: Visual Studio Build Tools with "Desktop development with C++"), and make sure nothing else (a running Neo daemon from this checkout) has the native .node file locked, then retry.
neo resolves to the wrong install (PATH-shadowing)
If you've installed Neo more than one way (e.g. both npm install -g and a linked dev clone), the shell may run a different neo than you expect. neo doctor includes a PATH-shadowing check that compares the neo your shell would resolve from PATH against the one actually running, and tells you exactly which two installs are in conflict. Fix by reordering PATH so the intended install comes first, or removing the stale one (npm rm -g @nehoraihadad/neo-agent, or unlinking the dev clone with pnpm unlink --global).
neo not found after install
The one-line installers and pnpm setup persist the relevant global bin directory in your user PATH and verify the command before completing. If you used bare npm install -g with a custom npm prefix, add that prefix manually or re-run the one-line installer; then open a new shell.
Updating
neo update # apply the latest release
neo update --check # report current vs. latest version only; don't change anythingneo update detects how the running build was installed (a .git directory next to its package root means a dev clone) and does the right thing either way:
- npm install → runs
npm i -g @nehoraihadad/neo-agent@latestfor you, with install output streamed live. - git clone → does not run anything; it prints the guidance instead:
git pull && pnpm install && pnpm build.
Neo also does a passive, opt-out check against the npm registry (registry.npmjs.org/@nehoraihadad%2Fneo-agent/latest, 5s timeout, cached ~24h) to power the TUI's update banner — no data is sent beyond that request. Disable it with NEO_UPDATE_CHECK=off. See docs/user/env-vars.md and docs/user/privacy.md.
Uninstalling
neo uninstall --dry-run # print the full plan; change nothing
neo uninstall # interactive: prompts before each destructive step
neo uninstall --yes # non-interactive: confirm every step up frontneo uninstall removes Neo's OS-level footprint — the daemon autostart service, configured channel logins, and OS-keychain secrets — then prints exactly what's left under ~/.neo (or $NEO_HOME) and the precise platform-appropriate command to delete it yourself.
neo uninstall never deletes ~/.neo. That decision, and the CLI package itself, are left to you:
- Remove the CLI:
npm uninstall -g @nehoraihadad/neo-agent(npm install), or just delete the cloned directory (dev clone —neo uninstalldetects and tells you which applies). - Remove your data: the command it prints, e.g.
rm -rf ~/.neo/Remove-Item -Recurse -Force ~/.neo.
Run neo export --all first if you want to keep a copy of your sessions/memory/config — see docs/user/uninstall.md for the full export/restore reference.
See also
- Quickstart — first run through onboarding, chat, and the daemon.
- Uninstalling & exporting your data — the full
neo uninstall/neo exportreference. - Environment variables —
NEO_HOME,BASH_PATH,NEO_UPDATE_CHECK, and friends. - Privacy — what stays on your machine and what doesn't.
- The Matrix Daemon — always-on mode, autostart, channel supervision.