https://github.com/azorng/goose.nvim
seamless neovim integration with goose - work with a powerful AI agent without leaving your editor
https://github.com/azorng/goose.nvim
agent ai cursor goose nvim nvim-plugin plugin
Last synced: 2 months ago
JSON representation
seamless neovim integration with goose - work with a powerful AI agent without leaving your editor
- Host: GitHub
- URL: https://github.com/azorng/goose.nvim
- Owner: azorng
- License: apache-2.0
- Created: 2025-03-01T13:09:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-04-13T08:56:01.000Z (2 months ago)
- Last Synced: 2025-04-13T09:18:45.134Z (2 months ago)
- Topics: agent, ai, cursor, goose, nvim, nvim-plugin, plugin
- Language: Lua
- Homepage:
- Size: 52.7 KB
- Stars: 39
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim - azorng/goose.nvim - Seamless Neovim integration with [goose](https://block.github.io/goose) - work with a powerful AI agent without leaving your editor. (AI / (requires Neovim 0.5))
README
# 🪿 goose.nvim
> seamless neovim integration with goose - work with a powerful AI agent without leaving your editor

[](https://github.com/azorng/goose.nvim/stargazers)
## ✨ Description
This plugin provides a bridge between neovim and the [goose](https://github.com/block/goose) AI agent, creating a chat interface while capturing editor context (current file, selections) to enhance your prompts. It maintains persistent sessions tied to your workspace, allowing for continuous conversations with the AI assistant similar to what tools like Cursor AI offer.
![]()
## 📑 Table of Contents
- [Requirements](#-requirements)
- [Compatibility](#-compatibility)
- [Installation](#-installation)
- [Configuration](#️-configuration)
- [Usage](#-usage)
- [Setting Up Goose CLI](#-setting-up-goose-cli)## 📋 Requirements
- Goose CLI installed and available (see [Setting Up Goose CLI](#-setting-up-goose-cli) below)
## ⚡ Compatibility
This plugin is compatible with Goose CLI version **`1.0.17`**.
Future versions may work but are not guaranteed. If you encounter issues with newer Goose CLI versions, please report them in the issues section.## 🚀 Installation
Install the plugin with your favorite package manager. See the [Configuration](#-configuration) section below for customization options.
### With lazy.nvim
```lua
{
'azorng/goose.nvim',
branch = 'main',
config = function()
require('goose').setup({})
end,
dependencies = {
"nvim-lua/plenary.nvim",
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
anti_conceal = { enabled = false },
},
}
},
}
```## ⚙️ Configuration
```lua
-- Default configuration with all available options
require('goose').setup({
keymap = {
global = {
open_input = 'gi', -- Opens and focuses on input window. Loads current buffer context
open_input_new_session = 'gI', -- Opens and focuses on input window. Loads current buffer context. Creates a new session
open_output = 'go', -- Opens and focuses on output window. Loads current buffer context
close = 'gq', -- Close UI windows
toggle_fullscreen = 'gf', -- Toggle between normal and fullscreen mode
select_session = 'gs', -- Select and load a goose session
},
window = {
submit = '', -- Submit prompt
close = '', -- Close UI windows
stop = '', -- Stop a running job
next_message = ']]', -- Navigate to next message in the conversation
prev_message = '[[', -- Navigate to previous message in the conversation
}
},
ui = {
window_width = 0.35, -- Width as percentage of editor width
input_height = 0.15, -- Input height as percentage of window height
fullscreen = false -- Start in fullscreen mode (default: false)
}
})
```## 🧰 Usage
### Available Actions
The plugin provides the following actions that can be triggered via keymaps, commands, or the Lua API:
> **Note:** Buffer context is only set by calling the open actions
| Action | Default keymap | Command | API Function |
|-------------|--------|---------|---------|
| Open input window (current session) | `gi` | `:GooseOpenInput` | `require('goose.api').open_input()` |
| Open input window (new session) | `gI` | `:GooseOpenInputNewSession` | `require('goose.api').open_input_new_session()` |
| Open output window | `go` | `:GooseOpenOutput` | `require('goose.api').open_output()` |
| Close UI windows | `gq` | `:GooseClose` | `require('goose.api').close()` |
| Stop running job | `` (in window) | `:GooseStop` | `require('goose.api').stop()` |
| Toggle fullscreen mode | `gf` | `:GooseToggleFullscreen` | `require('goose.api').toggle_fullscreen()` |
| Select and load session | `gs` | `:GooseSelectSession` | `require('goose.api').select_session()` |
| Run prompt (continue session) | - | `:GooseRun ` | `require('goose.api').run("prompt")` |
| Run prompt (new session) | - | `:GooseRunNewSession ` | `require('goose.api').run_new_session("prompt")` |
| Navigate to next message | `]]` | - | - |
| Navigate to previous message | `[[` | - | - |## 🔧 Setting Up Goose CLI
If you're new to Goose CLI:
1. **What is Goose CLI?**
- Goose is an AI agent developed by Block (the company behind Square, Cash App...)
- It offers powerful AI assistance through a command-line interface2. **Installation:**
- Visit [Install Goose](https://block.github.io/goose/docs/getting-started/installation/) for installation instructions
- Ensure the `goose` command is available after installation3. **Configuration:**
- Run `goose configure` to set up your provider (**Claude 3.7 Sonnet is recommended**)