A lightweight Neovim wrapper for Simon Willison's
llm CLI. Chat with LLMs, run agentic
workflows, and complete code without leaving your editor.
/new, /model, /add-file, etc.)1. Install the llm CLI:
brew install llm # macOS
pipx install llm # or pip install llm
2. Install a provider and set your API key:
llm install llm-openrouter && llm keys set openrouter
# or: llm install llm-anthropic && llm keys set anthropic
3. Install the plugin (lazy.nvim):
{
'mozanunal/sllm.nvim',
dependencies = {
'echasnovski/mini.notify', -- optional, nicer notifications
'echasnovski/mini.pick', -- optional, better picker UI
},
config = function()
require('sllm').setup()
end,
}
Press <leader>ss to start chatting.
Defaults use the <leader>s prefix (<leader>ss to ask). See doc/configure.md for the full list and how to override.
Templates configure the LLM's behavior. Defaults are described in doc/modes.md; switch with <leader>sM or /template.
Press <leader>sx to open the slash command picker, or see doc/slash_commands.md for the full list (e.g., /new, /model, /add-file).
require('sllm').setup({
default_model = 'claude-3-5-sonnet', -- or 'default' for llm's default
default_mode = 'sllm_chat', -- template to use on startup
window_type = 'float', -- 'vertical', 'horizontal', or 'float'
reset_ctx_each_prompt = false, -- keep context across turns
keymaps = {
ask = '<leader>a', -- customize keymaps
},
})
See doc/configure.md for all options.
Full guides in doc/:
Or in Neovim: :help sllm
Apache 2.0 — see LICENSE.