A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/muePatrick/zsh-ai-commands below:

muePatrick/zsh-ai-commands: Zsh plugin to convert natural language prompts to terminal commands with GPT-4

This plugin works by asking GPT (gpt-4o) for terminal commands that achieve the described target action.

To use it just type what you want to do (e.g. list all files in this directory) and hit the configured hotkey (default: Ctrl+o). When GPT responds with its suggestions just select the one from the list you want to use.

Clone the repository to you oh-my-zsh custom plugins folder:

git clone https://github.com/muePatrick/zsh-ai-commands ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-ai-commands

Enable it in your .zshrc by adding it to your plugin list:

plugins=(... zsh-ai-commands ...)

Set the API key in your by setting:

ZSH_AI_COMMANDS_OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Replace the placeholder with your own key. The config can be set e.g in your .zshrc in this case be careful to not leak the key should you be sharing your config files.

Variable Default Description ZSH_AI_COMMANDS_OPENAI_API_KEY -/- (not set) OpenAI API key ZSH_AI_COMMANDS_HOTKEY '^o' (Ctrl+o) Hotkey to trigger the request ZSH_AI_COMMANDS_LLM_NAME gpt-4o LLM name ZSH_AI_COMMANDS_N_GENERATIONS 5 Number of completions to ask for ZSH_AI_COMMANDS_EXPLAINER true If true, GPT will comment the command ZSH_AI_COMMANDS_HISTORY false If true, save the natural language prompt to the shell history (and atuin if installed)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4