Chatgpt-cli

From wikinotes
Revision as of 15:27, 11 May 2024 by Will (talk | contribs) (Created page with "A golang interface for chatgpt. = Documentation = <blockquote> {| class="wikitable" |- | github || https://github.com/kardolus/chatgpt-cli?tab=readme-ov-file#installation |- |} </blockquote><!-- Documentation --> = Locations = <blockquote> {| class="wikitable" |- | <code>~/.chatgpt-cli/config.yaml</code> || config |- |} </blockquote><!-- Locations --> = Install = <blockquote> <syntaxhighlight lang="bash"> aur sync chatgpt-cli-git </syntaxhighlight> </blockquote><!-- I...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A golang interface for chatgpt.

Documentation

github https://github.com/kardolus/chatgpt-cli?tab=readme-ov-file#installation

Locations

~/.chatgpt-cli/config.yaml config

Install

aur sync chatgpt-cli-git

Configuration

Autocompletion

# dump somewhere on your $fpath
chatgpt --set-completions zsh > ~/.zsh/completion/_chatgpt

Usage

# adhoc questions
chatgpt ask a question

# contextual questions
cat foo.txt | chatgpt ask a question about foo.txt

# interactive sessions
chatgpt -i

They're recommending not putting your api-key in a config, and using the environment instead.
Maybe create an alias and retrieve the password from pass ?