Skip to content

thefux/gooseai.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2bee61a ยท Feb 15, 2025

History

1 Commit
Feb 15, 2025
Feb 15, 2025

Repository files navigation

๐Ÿฆข gooseai.nvim

A Neovim plugin for seamless integration with Goose AI Assistant

โœจ Features

  • ๐Ÿ“ Session management through Telescope
  • ๐Ÿ”„ Create and resume sessions with ease
  • ๐Ÿš€ Integration with tui_terminal.nvim
  • ๐ŸŽฏ Interactive session selection
  • ๐Ÿ› ๏ธ Configurable session paths and extensions

๐Ÿ“ฆ Installation

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
}

๐Ÿ”ง Configuration

Default configuration:

{
    -- Default session directory
    sessions_path = vim.fn.expand("~/.config/goose/sessions"),
    -- Default session extension
    session_ext = ".jsonl",
    -- Telescope integration
    use_telescope = true,
}

๐ŸŽฎ Usage

Basic Commands

  • :GooseCreateSession <name> - Create a new session
  • :GooseListSessions - List/manage sessions using Telescope
  • :GooseDeleteSession <name> - Delete a session

๐Ÿ–ฅ๏ธ TUI Terminal Integration

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",
                },
            },
        }
    }
})

๐Ÿ“ Session Management

  1. Open Goose with tui_terminal:

    :TuiTerminal goose
  2. 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
  3. Session Commands:

    • Existing session: goose session -r -n <session-name>
    • New session: goose session -n <session-name>

๐Ÿค Dependencies

๐ŸŽจ Customization

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",
})

๐Ÿš€ Contributing

Contributions are welcome! Feel free to:

  • Report issues
  • Suggest features
  • Submit pull requests

Made with AI and โค๏ธ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages