Crates.io | gptask |
lib.rs | gptask |
version | 0.2.0 |
source | src |
created_at | 2023-03-04 00:52:56.702472 |
updated_at | 2023-03-05 01:41:42.047778 |
description | simple chatGPT CLI |
homepage | |
repository | https://github.com/mcdallas/gptask |
max_upload_size | |
id | 800248 |
size | 35,235 |
a CLI tool to interact with chatGPT
cargo install gptask
export OPENAI_API_KEY=sk-WEz... # from https://platform.openai.com/account/api-keys
You will need an OpenAI API key, and to set the environment variable OPENAI_API_KEY
.
>>> gptask Who won the world series of poker in 1989?
The winner of the World Series of Poker in 1989 was Phil Hellmuth.
>>> gptask and who did he play against?
In the final heads-up match of the 1989 World Series of Poker Main
Event, Phil Hellmuth played against the legendary poker player
Johnny Chan. The two players battled for several hours before Phil
Hellmuth was able to defeat Chan to win the championship.
The context of the conversation will be remembered for 15 minutes, so you can continue an existing chat. Set the environment variable GPTASK_TTL_SECONDS
to 0 to disable this.
Combine with mdcat to format markdown and code snippets:
ask() { gptask "$@" | mdcat }