Neovim
$ nvim Community Med RiskNeovim (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.
brew install neovim Batch Lua/Tree-sitter transforms and headless plugin syncs run directly via nvim --headless without MCP overhead.
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
--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
--headlessand-lLua execution modes - Bare
nvimenters interactive editor; no global--jsonflag
--clean isolates execution from user init.lua scripts, while full Lua/Vimscript execution (-c, -l) can read/write files or run vim.system commands.
--cleanskips untrusted local config and swap files- Embedded Lua/shell APIs carry general scripting risk
Available via Homebrew, apt, dnf, Winget, Scoop, and official releases across macOS, Linux, and Windows.
- First-class binaries on all three major OSes
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
Flagship Apache-2.0 open-source editor (neovim/neovim) with massive contributor base and disciplined releases.
- Highly active core team and stable release cycle
Comprehensive :help documentation mirrored online at neovim.io/doc/user/.
- Detailed CLI,
--headless, and Lua API docs
Security, Auth & Guardrails
None required for core editing; config lives in ~/.config/nvim/ and plugin state in ~/.local/share/nvim/.
100% free, offline, and open-source (Apache-2.0).
# 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
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.
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
nvim --headless "+Lazy! sync" +qa
Synchronizes plugins non-interactively and exits cleanly via +qa.
Strengths for Agents
- +
--headless,--clean, and-lLua 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
--headlessand+qa(or-l) drops into a blocking interactive terminal editor. - ! In
--headlessmode, Luaprint()emits to stderr rather than stdout (io.writeuses stdout).