Skip to main content
The 0x0.nvim plugin spawns the 0x0 TUI in a Neovim terminal and bridges editor context (files, selections, diagnostics) to the agent via HTTP. It reacts to SSE events for file reloads, permission dialogs, and notifications. Commands, agents, and skills are defined in your config.yaml and .zeroxzero/ directory — the plugin fetches them from the server at runtime.

Requirements

  • Neovim >= 0.10
  • curl in PATH
  • 0x0 CLI installed

Installation

lazy.nvim

{
  "anonymous-dev-org/0x0",
  opts = {},
}

packer.nvim

use {
  "anonymous-dev-org/0x0",
  config = function()
    require("zeroxzero").setup()
  end,
}

Configuration

All options and their defaults:
require("zeroxzero").setup({
  cmd = "0x0",                    -- Path to 0x0 binary
  args = {},                      -- Extra CLI arguments
  port = 0,                       -- 0 = random port
  hostname = "127.0.0.1",
  auto_start = true,              -- Auto-start on first command
  terminal = {
    position = "vsplit",          -- "vsplit" | "split" | "float" | "tab"
    size = 80,
    float_opts = {
      width = 0.8,
      height = 0.8,
      border = "rounded",
    },
  },
  keymaps = {
    toggle = "<leader>0",
    ask = "<leader>0a",
    add_file = "<leader>0f",
    add_selection = "<leader>0s",
    session_list = "<leader>0l",
    session_new = "<leader>0n",
    session_interrupt = "<leader>0i",
    model_list = "<leader>0m",
    command_picker = "<leader>0c",
    agent_picker = "<leader>0g",
  },
  auth = nil,                     -- Optional {username = "...", password = "..."}
})

Keymaps

All keymaps are configurable via the keymaps table. Set any key to "" (empty string) to disable it.
KeymapModeAction
<leader>0nToggle terminal
<leader>0an, vAsk (with selection context in visual mode)
<leader>0fnAdd current file to prompt
<leader>0svAdd selection to prompt
<leader>0lnList sessions
<leader>0nnNew session
<leader>0inInterrupt session
<leader>0mnList models
<leader>0cn, vCommand picker
<leader>0gnAgent picker

Commands

CommandDescription
:ZeroOpenOpen 0x0 terminal
:ZeroToggleToggle terminal visibility
:ZeroCloseHide terminal
:ZeroAsk [prompt]Ask a question (optional inline prompt)
:ZeroAddFileAdd current file to prompt
:ZeroAddSelectionAdd visual selection to prompt
:ZeroSessionListPick a session
:ZeroSessionNewNew session
:ZeroSessionInterruptInterrupt current session
:ZeroModelListOpen model picker
:ZeroCommandPickerPick from available commands
:ZeroAgentPickerPick from available agents

Statusline

Integrate with lualine or any statusline plugin:
-- lualine example
sections = {
  lualine_x = {
    { function() return require("zeroxzero").statusline() end },
  },
}

How it works

The plugin communicates with the 0x0 HTTP server using the same routes as the VS Code extension:
  1. Spawn — Opens 0x0 --port <random> in a Neovim terminal buffer
  2. Poll — Waits for the server to be ready via GET /app
  3. Inject — Sends file references and prompts via POST /tui/append-prompt and POST /tui/submit-prompt
  4. React — Listens to GET /app/event SSE stream for file changes, permissions, and notifications
  5. Manage — Sessions, models, commands, and agents are fetched from the server (GET /session, GET /command, GET /agent)
The plugin sets ZEROXZERO_CALLER=neovim when spawning the process. Buffers auto-reload when the agent edits files via SSE file-watcher events. The process is gracefully stopped on VimLeavePre.

Health check

Run the built-in health check to verify your setup:
:checkhealth zeroxzero
This checks Neovim version, curl availability, 0x0 binary presence, and server connectivity.

See also

  • ACP — IDE integration via Agent Client Protocol
  • Server — headless HTTP server mode
  • Network — hostname, port, and CORS options
  • CLI Reference — full command reference