Level up z shell with GPT
Project description
zshgpt
Table of Contents
About
Heavily inspired by the abandoned project https://github.com/microsoft/Codex-CLI Made into a oh-my-zsh plugin.
In your zsh console, type a question, starting with comment sign #
, hit ctrl+g
and get an answer.
# Who edited README.MD last according to git history?
ChatGPT will then answer with e.g.:
git log -1 --format="%an" README.md
Hit enter
to execute or ctrl+c
to deny.
If asked a question that will not resolve in a command, GPT is instructed to use #
.
# Who was Norways first prime minister?
# Norway's first prime minister was Frederik Stang, serving from 1873 to 1880.
Prerequisite
- Python >= 3.7
- Valid Openai API-key
- make sure to save under
OPENAI_API_KEY
env. export OPENAI_API_KEY='sk-...'
- make sure to save under
Installation
pip install zshgpt
mkdir $ZSH_CUSTOM/plugins/zshgpt
curl https://raw.githubusercontent.com/AndersSteenNilsen/zshgpt/main/zsh_plugin/zsh_plugin.zsh -o $ZSH_CUSTOM/plugins/zshgpt/zshgpt.plugin.zsh
Then add zshgpt in your list of plugins in ~/.zshrc
plugins(
...
zshgpt
...
)
License
zshgpt
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zshgpt-0.1.1.tar.gz
(6.2 kB
view hashes)
Built Distribution
zshgpt-0.1.1-py3-none-any.whl
(5.4 kB
view hashes)