https://github.com/Licheam/zsh-ask
A lightweight Zsh plugin serves as a ChatGPT API frontend, enabling you to interact with ChatGPT directly from Zsh.
https://github.com/Licheam/zsh-ask
Last synced: 8 months ago
JSON representation
A lightweight Zsh plugin serves as a ChatGPT API frontend, enabling you to interact with ChatGPT directly from Zsh.
- Host: GitHub
- URL: https://github.com/Licheam/zsh-ask
- Owner: Licheam
- License: mit
- Created: 2023-03-14T05:52:29.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-12T07:47:44.000Z (over 1 year ago)
- Last Synced: 2024-11-06T06:40:40.230Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 69
- Watchers: 3
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - ask - Serves as a ChatGPT API frontend, enabling you to interact with ChatGPT directly from the ZSH shell using only `cURL` and `jq`. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - ask - Serves as a ChatGPT API frontend, enabling you to interact with ChatGPT directly from the ZSH shell using only `cURL` and `jq`. (Plugins / ZSH on Windows)
README
# zsh-ask
A lightweight Zsh plugin serves as a ChatGPT API frontend, enabling you to interact with ChatGPT directly from the `Zsh` shell using only `cURL` and `jq`.
## Installation
See [INSTALL.md](INSTALL.md) or run `source zsh-ask.zsh` for a quick start.
## Preliminaries
Make sure you have [`cURL`](https://curl.se/) and [`jq`](https://stedolan.github.io/jq/) installed.
If you would like to have markdown rendering with option `-m`, [`glow`](https://github.com/charmbracelet/glow) is required (Recommend).
## Usage
Fill your OpenAI api key as `ZSH_ASK_API_KEY` (see [INSTALL.md](INSTALL.md) for detail information), then just run
```
ask who are you
```
Use `-c` for dialogue format communication.
```
ask -c chat with me
```
Use `-m` for markdown rendering (`glow` required)
```
ask -m how to code quick sort in python
```
Use `-s` for streaming display (doesn't work with `-m` yet)
```
ask -s write a poem for me
```
Use `-i` to inherits history from last chat (which is recorded in ZSH_ASK_HISTORY).
```
ask -i tell me more about it
```
Use `-h` for more information.
```
ask -h
```
Have fun!
## License
This project is licensed under [MIT license](http://opensource.org/licenses/MIT). For the full text of the license, see the [LICENSE](LICENSE) file.