A Neovim plugin for seamless integration with Goose AI Assistant
- ๐ Session management through Telescope
- ๐ Create and resume sessions with ease
- ๐ Integration with tui_terminal.nvim
- ๐ฏ Interactive session selection
- ๐ ๏ธ Configurable session paths and extensions
Using lazy.nvim:
{
'username/gooseai.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
},
config = function()
require('gooseai').setup({
-- Optional configuration
sessions_path = vim.fn.expand("~/.config/goose/sessions"),
session_ext = ".jsonl",
})
end
}
Default configuration:
{
-- Default session directory
sessions_path = vim.fn.expand("~/.config/goose/sessions"),
-- Default session extension
session_ext = ".jsonl",
-- Telescope integration
use_telescope = true,
}
:GooseCreateSession <name>
- Create a new session:GooseListSessions
- List/manage sessions using Telescope:GooseDeleteSession <name>
- Delete a session
This plugin works best with tui_terminal.nvim for a complete terminal UI experience. Configure Goose in your tui_terminal setup:
require('tui_terminal').setup({
tools = {
{
name = "goose",
cmd = "goose",
args = {}, -- Will be filled by session selection
quit_key = false,
detach = true,
pre_cmd_nvim = function(callback)
require('telescope').extensions.gooseai.select_session_for_command(callback)
end,
env = {
set = {
GOOSE_PROVIDER = "ollama",
GOOSE_MODEL = "llama2",
OLLAMA_HOST = "http://localhost:11434",
},
},
}
}
})
-
Open Goose with tui_terminal:
:TuiTerminal goose
-
Session Selection/Creation:
- Type to filter existing sessions
- Press Enter to select a session
- Type a new name and press Enter to create a session
-
Session Commands:
- Existing session:
goose session -r -n <session-name>
- New session:
goose session -n <session-name>
- Existing session:
You can customize the plugin behavior through the setup function:
require('gooseai').setup({
-- Custom sessions path
sessions_path = "~/my/custom/path/to/sessions",
-- Custom session extension
session_ext = ".custom",
})
Contributions are welcome! Feel free to:
- Report issues
- Suggest features
- Submit pull requests
Made with AI and โค๏ธ