u/Cannon72001

▲ 36 r/neovim

Hey everyone! Following up on last week's Copilot CLI release — code-preview.nvim now also supports OpenAI Codex CLI as a backend.

For those unfamiliar — code-preview.nvim shows a diff preview in Neovim before your AI coding agent applies any file change, so you can review exactly what's changing before accepting.

Backends supported:

  • Claude Code
  • OpenCode
  • Github Copilot CLI
  • OpenAI Codex CLI (new)

Setup:

  1. Install the plugin
  2. Run :CodePreviewInstallCodexCliHooks in your project root
  3. Enable Codex hooks + on-request approvals in .codex/config.toml:
  4. Restart Codex CLI

​

approval_policy = "on-request"
sandbox_mode    = "read-only"

[features]
codex_hooks = true

:CodePreviewStatus and :checkhealth code-preview will tell you if the feature flag is missing.

GitHub: https://github.com/Cannon07/code-preview.nvim

Happy to help if anyone runs into issues!

u/Cannon72001 — 21 days ago