AI in the command line.
https://github.com/KukumavMozolo/zsh_starcodex
You just need to write a comment or variable name and the AI will write the corresponding code.
This is a ZSH plugin that enables you to use codelama in the command line. No internet connection required. Tested with linux only though.
-
Install https://github.com/ggerganov/llama.cpp download codelama, e.g. https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GGUF model.
-
Download the ZSH plugin.
git clone https://github.com/KukumavMozolo/zsh_starcodex.git ~/.oh-my-zsh/custom/plugins/zsh_starcodex
- Add the following to your
.zshrc
file.
Using oh-my-zsh:
plugins=(zsh_starcodex)
bindkey '^X' create_completion
Without oh-my-zsh:
# in your/custom/path you need to have a "plugins" folder and in there you clone the repository as zsh_starcodex
export ZSH_CUSTOM="your/custom/path"
source "$ZSH_CUSTOM/plugins/zsh_starcodex/zsh_starcodex.plugin.zsh"
bindkey '^X' create_completion
-
Edit the config.json in
~/.oh-my-zsh/custom/plugins/zsh_starcodex/
so thatpath_to_starcoder_cpp_main
points to your starcoder.cpp directory -
Run
zsh
, start typing and complete it using^X
([Ctrl] + X)! and use Tap select an option