SkillAgentSearch skills...

Yarepl.nvim

Versatile REPL/CLI manager. Multiple sending modes with parallel sessions, buffer attachments, and cross-language support. AI CLI integration for Aider and OpenAI Codex. Picker support, project-level configs, code cell text objects, and native dot-repeat.

Install / Use

/learn @milanglacier/Yarepl.nvim
About this skill

Quality Score

0/100

Supported Platforms

OpenAI Codex

README

Breaking change: the old REPL* commands and <Plug>(REPL*) maps are now named under Yarepl. Use commands like :Yarepl start, :Yarepl attach_buffer, :Yarepl send_visual, and :Yarepl exec. The matching plug maps are named like <Plug>(Yarepl-start) and <Plug>(Yarepl-send-visual). The command part uses snake style, while <Plug> names use kebab style.

The legacy commands and keymaps still function for now, but they will be removed on 2026-06-01.

If you previously used REPLStart, REPLSendVisual, or <Plug>(REPLStart-ipython), the replacement is the same idea with a different wrapper: :Yarepl start, :Yarepl send_visual, and <Plug>(Yarepl-start-ipython).

The unified Yarepl entry point keeps the plugin easier to extend and makes completion, counts, and future subcommands behave consistently instead of spreading the same actions across a growing list of top-level commands.

yarepl.nvim

Yet Another REPL is a flexible REPL / CLI App management tool that supports multiple paradigms for interacting with them. This plugin also works with project-level config and tmux, and includes native dot-repeat without requiring vim-repeat.

Flexibility and parallelism are core priorities. With yarepl.nvim, you can effortlessly interact with multiple CLI Apps through various paradigms:

  • Send text from multiple buffers (same or different file types) to a single REPL / CLI App.
  • Send text from a single buffer to multiple CLI Apps (same program or different)
  • Attach a buffer to a dedicated CLI Apps

The plugin features integration with aider.chat and OpenAI Codex CLI, and provides convenient code cell text object definitions. Choose your preferred fuzzy finder among telescope, fzf-lua, or Snacks.picker to preview active REPLs. These features are available as extensions.

Showcase

aider showcase

This image highlights an AI-driven coding assistant and REPL, aider.chat, managed by yarepl.

codex showcase

This example showcases the Codex CLI integration running side by side with a Neovim buffer, all managed through yarepl.

yarepl enables integration with the OpenAI's Codex CLI and Aider.chat. For more details, refer to the Extensions section.

Why yarepl.nvim?

With multiple projects at hand, I require the ability to send text from different files to REPLs with the same type (such as multiple ipython REPLs).

In instances where I'm performing time-consuming tasks, but need to conduct further experimentation on the current file, I also require the capability to send text from the same buffer to multiple REPLs.

Furthermore, when conducting mixed-language programming in a literate programming style in text format such as rmarkdown, quarto, or plain markdown, I need to send text in the buffer to different REPLs such as R and Python .

Additionally, yarepl.nvim features a source_syntax capability that allows sourcing large code chunks from temporary files instead of sending them directly to the REPL. This prevents cluttering your interaction history and provides better handling of substantial code content, especially useful on Windows where large stdin processing can be problematic. The plugin writes selected code regions/content to temporary files and provides convenient syntax definitions for how each REPL should source files.

As a CLI fnatic, to communicate with chatgpt, I prefer through a REPL aichat. Additionally, I require a set of global hotkeys and an isolated REPL environment to facilitate communication with aichat separately without any interference with other REPLs.

Unfortunately, currently available REPL plugins do not afford me such great flexibility in managing REPL in multiple ways. This is why yarepl.nvim was created.

Installation

nvim 0.9 is required. Although nvim 0.8 may also work, there are no plans to ensure backward compatibility with nvim 0.8 if there are any compatibility issues.

lazy.nvim:

{ 'milanglacier/yarepl.nvim', config = true }

rocks.nvim:

Yarepl is available on luarocks.org. Simply run Rocks install yarepl.nvim to install it like any other luarocks package.

yarepl.nvim does not require any dependencies but functions better with the following plugins:

  1. telescope.nvim or fzf-lua. yarepl.nvim provides extensions for REPL previewer.

  2. A UI frontend that provides an alternative frontend for vim.ui.select. Some options are dressing.nvim or telescope-ui-select.nvim (only one of them needs to be installed).

Configuration

Setup

-- below is the default configuration, there's no need to copy paste them if
-- you are satisfied with the default configuration, just calling
-- `require('yarepl').setup {}` is sufficient.
local yarepl = require 'yarepl'

yarepl.setup {
    -- see `:h buflisted`, whether the REPL buffer should be buflisted.
    buflisted = true,
    -- whether the REPL buffer should be a scratch buffer.
    scratch = true,
    -- the filetype of the REPL buffer created by `yarepl`
    ft = 'REPL',
    -- How yarepl open the REPL window, can be a string or a lua function.
    -- See below example for how to configure this option
    wincmd = 'belowright 15 split',
    -- The available REPL palattes that `yarepl` can create REPL based on.
    -- To disable a built-in meta, set its key to `false`, e.g., `metas = { R = false }`
    metas = {
        aichat = { cmd = 'aichat', formatter = 'bracketed_pasting', source_syntax = 'aichat' },
        radian = { cmd = 'radian', formatter = 'bracketed_pasting_no_final_new_line', source_syntax = 'R' },
        ipython = { cmd = 'ipython', formatter = 'bracketed_pasting', source_syntax = 'ipython' },
        python = { cmd = 'python', formatter = 'trim_empty_lines', source_syntax = 'python' },
        R = { cmd = 'R', formatter = 'trim_empty_lines', source_syntax = 'R' },
        bash = {
            cmd = 'bash',
            formatter = vim.fn.has 'linux' == 1 and 'bracketed_pasting' or 'trim_empty_lines',
            source_syntax = 'bash',
        },
        zsh = { cmd = 'zsh', formatter = 'bracketed_pasting', source_syntax = 'bash' },
    },
    -- when a REPL process exits, should the window associated with those REPLs closed?
    close_on_exit = true,
    -- whether automatically scroll to the bottom of the REPL window after sending
    -- text? This feature would be helpful if you want to ensure that your view
    -- stays updated with the latest REPL output.
    scroll_to_bottom_after_sending = true,
    -- Format REPL buffer names as #repl_name#n (e.g., #ipython#1) instead of using terminal defaults
    format_repl_buffers_names = true,
    -- Highlight the operated range when using send/source operators
    highlight_on_send_operator = { enabled = false, hl_group = 'IncSearch', timeout = 150 },
    os = {
        -- Some hacks for Windows. macOS and Linux users can simply ignore
        -- them. The default options are recommended for Windows user.
        windows = {
            -- Send a final `\r` to the REPL with delay,
            send_delayed_final_cr = true,
        },
    },
    -- Display the first line as virtual text to indicate the actual
    -- command sent to the REPL.
    source_command_hint = {
        enabled = false,
        hl_group = 'Comment',
    },
}

Commands

yarepl doesn't set any default keybindings. Instead, it offers a variety of commands that you can use to create your own keybindings. We'll also provide an example configuration for keybindings based on these commands. Additionally, yarepl provides a collection of <Plug> keymaps, which you can bind them to your favorite mappings.

Here is a list of available commands:

Yarepl start

Creates a REPL with id i from the list of available REPLs.

You can create a REPL with a specific id by provid

Related Skills

View on GitHub
GitHub Stars247
CategoryCustomer
Updated1h ago
Forks8

Languages

Lua

Security Score

100/100

Audited on Mar 30, 2026

No findings