Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

fnm

$ fnm Community Low Risk
Schniz · Code & DevOps · GPL-3.0-only · macos / linux / windows

Lightweight 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.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install fnm
CLI vs MCP Decision CLI Only

Local Node.js toolchain switcher used directly in shell environments and CI scripts.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

fnm exec avoids shell-hook pitfalls in non-TTY subshells and supports --log-level quiet, though fnm lacks --json output.

  • fnm exec runs commands without fnm env shell integration
  • fnm list outputs plain text only
Trust & Safety 21 / 25

Zero credentials required; isolates downloaded Node.js versions cleanly inside FNM_DIR.

  • No project file mutations during version switching
Setup & Portability 14 / 15

Single Rust binary across macOS, Linux, and Windows (including PowerShell/cmd/zsh/bash).

  • Cross-platform static binary via Homebrew, Cargo, winget, and releases
Utility & Efficiency 12 / 15

Sub-millisecond Rust startup compared to slow bash-based nvm, scoped strictly to Node.js.

  • Instant .nvmrc/.node-version resolution
Maintenance & Lineage 8 / 10

Popular community project (Schniz/fnm) under GPL-3.0.

  • Active Schniz/fnm repository
Docs & Verifiability 8 / 10

Concise README and clear --help across all subcommands.

  • Well-organized CLI flags and shell setup docs

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No authentication required; downloads official Node.js release tarballs into local FNM_DIR.

Side Effects
Read-Only Local Write
Cost & Quotas

GPL-3.0-only open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List locally installed Node.js versions
fnm list

Shows all installed Node.js versions and aliases in FNM_DIR.

Run a command under the project's pinned Node version
fnm exec --using-file-or-default node -v

Executes node -v using .nvmrc/.node-version without requiring fnm env shell hooks.

Controlled Writes & Previews

Install the Node.js version specified in .nvmrc
fnm install --log-level quiet

Downloads and installs the repository's pinned Node.js version cleanly with quiet logging.

Strengths for Agents

  • + fnm exec lets agents target .nvmrc/.node-version in stateless subshells without fnm env hooks.
  • + Single fast Rust binary supporting macOS, Linux, and Windows.

Caveats & Pitfalls

  • ! fnm use errors out in non-interactive shells that haven't run eval "$(fnm env)".
  • ! No --json output mode for fnm list or fnm list-remote.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI