I recommend using pipx
for installation. Follow pipx's documentation to install it, then run pipx install chat-cli
.
Chat uses the poetry
build tool.
- Install poetry
- Clone the chat project repo
- Run
poetry build
in the project root - The wheel and sdist will be built in the
dist/
directory
chat [-h] [--apikey APIKEY] [--prompt PROMPT] [--save] [-f CONFIG] [-m MODEL] [--resume] [-s SEARCH]
show these options and exit
Specify the API key to use when connection to OpenAI
Change the prompt that is displayed for input. The sequences %t and %T can be used to display the current token and max token count for the model, respectively. Default prompt is '%t/%T > '
If specified with --apikey and/or --prompt, save them to the config file
Specify an alternate file to load the configuration from (Default: $XDG_CONFIG_HOME/Chat/chat.json)
Specify the model to use, refer to https://platform.openai.com/docs/models for list
Resumes last conversation
Search your chat history for a given regex
When chating, the following commands perform special actions
Regenerates the previous response. Removes the old response from the history
Copies the first code block in the previous response to the system clipboard. Print's whats been copied
Exits the application and saves the chat history. Same as encountering EOF
. Prints the chat log location.
Asks the model to summarize the conversation and starts a new conversation with the summary as the first message. Saves the conversation prior to the summary. Should be called before reaching the token limit to continue a conversation.