Last active
April 1, 2023 02:52
-
-
Save mate-h/26b49ec65897db1796bf2070930907fd to your computer and use it in GitHub Desktop.
Fish completions for gpt-cli: https://github.com/kharvd/gpt-cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gpt.fish - Fish shell completions for gpt.py | |
set -Ux OPENAI_API_KEY <API KEY> | |
fish_add_path ~/github/gpt-cli | |
alias gpt="gpt.py" | |
function __fish_gpt_no_subcommand -d "Test if gpt has been given no subcommand" | |
not set -q argv[1] | |
or string match -qr -- '^-' $argv[1] | |
end | |
complete -c gpt -f -n "__fish_gpt_no_subcommand" -a "dev" -d "Software development assistant with shorter responses" | |
complete -c gpt -f -n "__fish_gpt_no_subcommand" -a "general" -d "Generally helpful assistant (default)" | |
complete -c gpt -f -n "__fish_gpt_no_subcommand" -a "bash" -d "Bash scripting assistant" | |
complete -c gpt -s h -l help -d "Show this help message and exit" | |
complete -c gpt -l no_markdown -d "Disable markdown formatting in the chat session" | |
complete -c gpt -l model -d "The model to use for the chat session" -r | |
complete -c gpt -l temperature -d "The temperature to use for the chat session" -r | |
complete -c gpt -l top_p -d "The top_p to use for the chat session" -r | |
complete -c gpt -s p -l prompt -d "Print the response to standard output and exit" -r | |
complete -c gpt -s e -l execute -d "Edit and execute the produced shell command" -r | |
complete -c gpt -l no_stream -d "Do not stream the response to standard output" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install with:
Edit the file with vim and paste the API Key from https://platform.openai.com/account/api-keys.