fnm
$ fnm Community Low RiskLightweight Rust alternative to nvm that switches Node.js versions automatically from .nvmrc or .node-version. Particularly useful for agents via fnm exec --using=<version> to run commands under a specific Node runtime without modifying interactive shell profiles.
brew install fnm Local Node.js toolchain switcher used directly in shell environments and CI scripts.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
fnm exec avoids shell-hook pitfalls in non-TTY subshells and supports --log-level quiet, though fnm lacks --json output.
fnm execruns commands withoutfnm envshell integrationfnm listoutputs plain text only
Zero credentials required; isolates downloaded Node.js versions cleanly inside FNM_DIR.
- No project file mutations during version switching
Single Rust binary across macOS, Linux, and Windows (including PowerShell/cmd/zsh/bash).
- Cross-platform static binary via Homebrew, Cargo, winget, and releases
Sub-millisecond Rust startup compared to slow bash-based nvm, scoped strictly to Node.js.
- Instant
.nvmrc/.node-versionresolution
Popular community project (Schniz/fnm) under GPL-3.0.
- Active
Schniz/fnmrepository
Concise README and clear --help across all subcommands.
- Well-organized CLI flags and shell setup docs
Security, Auth & Guardrails
No authentication required; downloads official Node.js release tarballs into local FNM_DIR.
GPL-3.0-only open-source CLI; completely free.
# fnm Agent Rules - Prefer `fnm exec --using=<ver> <cmd>` in non-interactive shells because `fnm use` fails unless `eval "$(fnm env)"` was initialized. - Check `fnm list` before calling `fnm install` in offline environments.
Agent-Ready Command Recipes
Safe Read-Only Queries
fnm list
Shows all installed Node.js versions and aliases in FNM_DIR.
fnm exec --using-file-or-default node -v
Executes node -v using .nvmrc/.node-version without requiring fnm env shell hooks.
Controlled Writes & Previews
fnm install --log-level quiet
Downloads and installs the repository's pinned Node.js version cleanly with quiet logging.
Strengths for Agents
- +
fnm execlets agents target.nvmrc/.node-versionin stateless subshells withoutfnm envhooks. - + Single fast Rust binary supporting macOS, Linux, and Windows.
Caveats & Pitfalls
- !
fnm useerrors out in non-interactive shells that haven't runeval "$(fnm env)". - ! No
--jsonoutput mode forfnm listorfnm list-remote.