⌨️ 🦾 Zsh Codex
AI in the command line.
You just need to write a comment or variable name and the AI will write the corresponding code.
What is it?
This is a ZSH plugin that enables you to use OpenAI's powerful Codex AI in the command line. OpenAI Codex is the AI that also powers GitHub Copilot. To use this plugin you need to get access to OpenAI's Codex API.
How do I install it?
Install the plugin with Fig by clicking the "Install" button above.
Install the OpenAI python package.
pip3 install openai
- Create a file called
~/.configwith your ORGANIZATIONID and SECRETKEY.
organization_id = ...
secret_key = ...
zsh, start typing and complete it using
Unhandled ZLE widget 'create_completion'
zsh-syntax-highlighting: unhandled ZLE widget 'create_completion'
zsh-syntax-highlighting: (This is sometimes caused by doing `bindkey <keys> create_completion` without creating the 'create_completion' widget with `zle -N` or `zle -C`.)
Add the line
zle -N create_completion
before you call
bindkey but after loading the plugin (
Already exists and is not an empty directory
fatal: destination path '~.oh-my-zsh/custom/plugins'
Try to download the ZSH plugin again.
git clone https://github.com/tom-doerr/zsh_codex.git ~/.oh-my-zsh/custom/plugins/zsh_codex
More examples of usage