# AI Generated ZSH Completions I love zsh completions. Everyone hates generating them. AI is perfect for doing this for us. ## Installation ```shell zinit light iloveitaly/zsh-ai-completions ``` ## What Completions Are Included? Check out the [completions](completions) directory. ## How Well Does This Work? My main goal was replacing [zsh-completion-generator](https://github.com/RobSis/zsh-completion-generator) which is abandoned and does not work with usage information that is not generated by a specific python CLI library. I've checked the AI generated completions against this tool and it works quite well! I haven't yet found any errors in the generated completions. ## Development ### Additional Completions Just modify the `justfile`, run `just`, and test the output. Then, please submit a PR! To focus on building a single completion run `just completion aiautocommit` Set `ZSH_AI_CLI` to choose the generator (`grok` default, or `agy`). ### Custom prompts Generation always starts from the shared instructions in [`completion_prompt.md`](completion_prompt.md). For tool-specific guidance, add a file under [`prompts/`](prompts/) named after the command: ``` prompts/flowctl.md prompts/uv.md ``` If `prompts/.md` exists when you run `just completion `, its contents are appended to the default prompt before the model is called. Use this for quirks the help text alone doesn't capture (odd flag syntax, subcommand layout, things to ignore, etc.). ### Local Testing Want to test out a completion locally? ```shell fpath+=./completions autoload -Uz compinit && compinit ``` ## TODO - [ ] the company behind sqlc has a way to run code securely in the cloud, should try this for subcommands