*slopcode.txt*
                                 For NVIM v0.12.3    Last change: 2026 June 11

==============================================================================
Table of Contents                                 *slopcode-table-of-contents*

  - why                                                         |slopcode-why|
  - how                                                         |slopcode-how|
  - keybindings                                         |slopcode-keybindings|
  - configuration                                     |slopcode-configuration|
  - standalone                                           |slopcode-standalone|
  - i have a problem                               |slopcode-i-have-a-problem|
  - license                                                 |slopcode-license|

streaming AI chat with tool use, inside neovim. talks to any OpenAI-compatible
API. reads files, edits code, runs commands - the usual slop pipeline. inspired
by pi.dev <https://pi.dev/>, this thing will happily run whatever the model
tells it to. use at your own risk (or use script like this
<scripts/sandbox.sh>)



WHY                                                             *slopcode-why*

- **game-like main loop** - push events, drain on a 16ms tick. feels like a game engine for chat, because why not
- **hash-anchored edits** - stateless line hashing so the edit calls reference stable hashes instead of repeating code
- **minimal** - ~4k lines of Lua. roughly 10× smaller than other AI slop generators. no bloat, no opinions about your workflow. just a loop and some tools
- **native** - understands neovim documentation and commands, use prompt buffer for input, folds for output, winbar for status, busy indicator, treesitter for visuals
- **history** - sessions are automatically stored per project and can be recalled in conversation by asking about them
- **memory compaction** - auto-summarizes old messages at 75% context window so long sessions don’t explode
- **model catalog** - fetches models from models.dev <https://models.dev> + bunch of extra in filters </lua/slopcode/filters/>
- **extensible** - tool registry (but no MCP <https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/>), agents.md <https://agents.md/> and skills.sh <https://skills.sh/> support, plug in whatever you need


HOW                                                             *slopcode-how*

needs neovim 0.12.3+, curl, lynx, ripgrep and ast-grep.

>lua
    vim.pack.add({
      'https://github.com/lewis6991/async.nvim', -- pls merge async to core already thx
      'https://github.com/deathbeam/slopcode.nvim'
    })
<

then just `:Slop <prompt>?` and away you go.


KEYBINDINGS                                             *slopcode-keybindings*

- `<C-c>` to abort
- `<Tab>` to switch model

use `@<path_or_buffer>` to reference files, `/<skill_name>` to manually
activate skills


CONFIGURATION                                         *slopcode-configuration*

>lua
    local config = require('slopcode.config')
    
    config.model = 'ollama-cloud/glm-5.1' -- default model
    config.window.layout = 'vertical'     -- 'vertical' | 'horizontal' | 'float' | 'replace'
<

you can also pass window opts directly to `open()` or `toggle()`:

>lua
    require('slopcode').open({ layout = 'float', width = 0.8, height = 0.6 })
    require('slopcode').toggle({ layout = 'replace' })
<

- environment variables for API keys: `OPENAI_API_KEY`, `OLLAMA_API_KEY`, etc, see models.dev <https://models.dev>
- for copilot, copilot.vim <https://github.com/github/copilot.vim> or similar is needed for generating auth
- full config is here <lua/slopcode/config.lua>


STANDALONE                                               *slopcode-standalone*

you can make alias like this:

>bash
    alias slop="nvim -c 'lua require(\"slopcode\").open({layout=\"replace\"})'"
<

or if you put sandbox.sh <scripts/sandbox.sh> in your path:

>bash
    alias slop="sandbox.sh nvim -c 'lua require(\"slopcode\").open({layout=\"replace\"})'"
<


I HAVE A PROBLEM                                   *slopcode-i-have-a-problem*

- |slopcode.txt|
- `:checkhealth slopcode`


LICENSE                                                     *slopcode-license*

MIT

Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

vim:tw=78:ts=8:noet:ft=help:norl:
