| Cmd | Lua |
:Sidekick nes apply Apply active text edits |
```lua
---@return boolean applied
require("sidekick.nes").apply()
```
|
:Sidekick nes clear Clear all active edits |
```lua
require("sidekick.nes").clear()
```
|
:Sidekick nes disable |
```lua
require("sidekick.nes").disable()
```
|
:Sidekick nes enable |
```lua
---@param enable? boolean
require("sidekick.nes").enable(enable)
```
|
| Check if any edits are active in the current buffer |
```lua
require("sidekick.nes").have()
```
|
:Sidekick nes jump Jump to the start of the active edit |
```lua
---@return boolean jumped
require("sidekick.nes").jump()
```
|
:Sidekick nes toggle |
```lua
require("sidekick.nes").toggle()
```
|
:Sidekick nes update Request new edits from the LSP server (if any) |
```lua
require("sidekick.nes").update()
```
|
## 🤖 AI CLI Integration
Sidekick ships with a lightweight terminal wrapper so you can talk to local AI CLI
tools without leaving Neovim. Each tool runs in its own scratch terminal window and
shares helper prompts that bundle buffer context, the current cursor position, and
diagnostics when requested.
| Cmd | Lua |
:Sidekick cli close |
```lua
---@param opts? sidekick.cli.Hide
---@overload fun(name: string)
require("sidekick.cli").close(opts)
```
|
:Sidekick cli focus Toggle focus of the terminal window if it is already open |
```lua
---@param opts? sidekick.cli.Show
---@overload fun(name: string)
require("sidekick.cli").focus(opts)
```
|
:Sidekick cli hide |
```lua
---@param opts? sidekick.cli.Hide
---@overload fun(name: string)
require("sidekick.cli").hide(opts)
```
|
:Sidekick cli prompt Select a prompt to send |
```lua
---@param opts? sidekick.cli.Prompt|{cb:nil}
---@overload fun(cb:fun(msg?:string))
require("sidekick.cli").prompt(opts)
```
|
| Render a message template or prompt |
```lua
---@param opts? sidekick.cli.Message|string
require("sidekick.cli").render(opts)
```
|
:Sidekick cli select Start or attach to a CLI tool |
```lua
---@param opts? sidekick.cli.Select|{cb:nil}|{focus?:boolean}
---@overload fun(cb:fun(state?:sidekick.cli.State))
require("sidekick.cli").select(opts)
```
|
:Sidekick cli send Send a message or prompt to a CLI |
```lua
---@param opts? sidekick.cli.Send
---@overload fun(msg:string)
require("sidekick.cli").send(opts)
```
|
:Sidekick cli show |
```lua
---@param opts? sidekick.cli.Show
---@overload fun(name: string)
require("sidekick.cli").show(opts)
```
|
:Sidekick cli toggle |
```lua
---@param opts? sidekick.cli.Show
---@overload fun(name: string)
require("sidekick.cli").toggle(opts)
```
|
### Prompts & Context
Sidekick comes with a set of predefined prompts that you can use with your AI tools.
You can also use context variables in your prompts to include information about the
current file, selection, diagnostics, and more.