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

Neovim

$ nvim Community Med Risk
Neovim · Files & Search · Apache-2.0 · macos / linux / windows

Neovim (nvim) pairs a modal Vim editor with an embedded LuaJIT runtime, native LSP client, Tree-sitter syntax parsing, and RPC server. Passing --headless (plus -c ... -c qa or -l script.lua) runs Neovim scripts cleanly without a TTY, though user init.lua plugins can add startup noise unless --clean is used.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install neovim
CLI vs MCP Decision CLI Preferred vs MCP

Batch Lua/Tree-sitter transforms and headless plugin syncs run directly via nvim --headless without MCP overhead.

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 20 / 25

--headless, --clean, -l <script.lua>, and built-in vim.json enable deterministic non-TTY execution, though bare nvim blocks in a TUI and headless print() writes to stderr.

  • Dedicated --headless and -l Lua execution modes
  • Bare nvim enters interactive editor; no global --json flag
Trust & Safety 19 / 25

--clean isolates execution from user init.lua scripts, while full Lua/Vimscript execution (-c, -l) can read/write files or run vim.system commands.

  • --clean skips untrusted local config and swap files
  • Embedded Lua/shell APIs carry general scripting risk
Setup & Portability 14 / 15

Available via Homebrew, apt, dnf, Winget, Scoop, and official releases across macOS, Linux, and Windows.

  • First-class binaries on all three major OSes
Utility & Efficiency 14 / 15

Powerful headless Lua + Tree-sitter + LSP engine capable of scripted refactoring, vim.json, and plugin automation.

  • Built-in Tree-sitter, LSP, and LuaJIT standard library
Maintenance & Lineage 10 / 10

Flagship Apache-2.0 open-source editor (neovim/neovim) with massive contributor base and disciplined releases.

  • Highly active core team and stable release cycle
Docs & Verifiability 9 / 10

Comprehensive :help documentation mirrored online at neovim.io/doc/user/.

  • Detailed CLI, --headless, and Lua API docs

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

None required for core editing; config lives in ~/.config/nvim/ and plugin state in ~/.local/share/nvim/.

Side Effects
Read-Only Local Write Destructive
Cost & Quotas

100% free, offline, and open-source (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Neovim (nvim) Agent Rules
- ALWAYS pass `--headless` with `-c "qa"` (or `-l <script.lua>`) so `nvim` never opens a blocking terminal editor.
- Include `--clean` unless you intentionally need the user's `init.lua` and plugins, and note Lua `print()` writes to stderr in headless mode.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run a read-only Lua expression headlessly without user plugins
nvim --headless --clean -c "lua print(vim.json.encode({version=tostring(vim.version())}))" -c "qa"

Uses --headless --clean and -c qa to evaluate Lua and emit JSON cleanly without loading ~/.config/nvim or opening a TUI.

Execute a standalone Lua script via -l
nvim --clean -l ./scripts/inspect.lua

Runs Neovim as a standalone Lua interpreter (-l) with built-in vim.* APIs and exits automatically.

Controlled Writes & Previews

Run headless plugin updates with explicit exit
nvim --headless "+Lazy! sync" +qa

Synchronizes plugins non-interactively and exits cleanly via +qa.

Strengths for Agents

  • + --headless, --clean, and -l Lua runner provide a scriptable, plugin-isolated runtime.
  • + Built-in vim.json, Tree-sitter, and LSP APIs work natively across macOS, Linux, and Windows.

Caveats & Pitfalls

  • ! Omitting --headless and +qa (or -l) drops into a blocking interactive terminal editor.
  • ! In --headless mode, Lua print() emits to stderr rather than stdout (io.write uses stdout).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI