No project description provided
Project description
cli-chat
cli-chat is a command-line tool that allows you to have a conversation with ChatGPT from your terminal.
Follow the simple steps below to install and use this tool.
Installation
You can easily install cli-chat by typing the following command in your terminal:
pip install cli-chat
Alternatively, you can clone the repository and install the dependencies using poetry. Follow the steps below:
- Clone the repository.
- Run
poetry install.
Usage
To start a conversation, simply type the following command in your terminal:
cli-chat
Alternatively, start the script using poetry by typing the following command in your terminal:
poetry run cli-chat
Here are a few things to keep in mind when using cli-chat:
- Before using the tool, you must obtain an API key from here.
- The API key will be saved in a file named
.keyin your current directory. To change the key or stop using the tool, simply delete this file. - You can use arrow keys to navigate through your conversation history.
- To end the conversation, type "thanks", "thx", or a similar phrase.
- Common key-bindings and auto-suggestions are supported, thanks to prompt_toolkit.
Control Sequences
You can use special control sequences to modify the behavior of the tool. A sequence is always placed at the beginning
of your question string and starts with a backslash \.
The following control sequences are available:
| Sequence | Description |
|---|---|
\no-render |
Do not render the answer's markdown. |
\load-file |
Load a file and use its contents as the remaining of the question. |
\long |
Accept multi-line inputs starting from now on. Use Meta+Enter or ESC followed by Enter to finish. |
\save |
Save the last answer to a file. |
\hide-answer |
Do not show the answer. Danger: If you want to save the answer later, always check it." |
You can use multiple control sequences at once by separating them with commas. For example, \no-render,load-file will
load a file and not render its contents as markdown.
Example
Here are a couple of examples of what a conversation with cli-chat might look like:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cli_chat-0.1.3.tar.gz.
File metadata
- Download URL: cli_chat-0.1.3.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ca4a49ca91d1f497967bf9d4c4fe37bf6f449e3cb77ad3bf897fe156630132b
|
|
| MD5 |
c3eb21567d82dfbcaf3584631c4aa9d1
|
|
| BLAKE2b-256 |
a27993fa2cc1a86d9fe9fd497dbc5eee8214d39d1f400b12bf55e71e06eec8e6
|
File details
Details for the file cli_chat-0.1.3-py3-none-any.whl.
File metadata
- Download URL: cli_chat-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43fef236cb5792b2306b3fc4a21dbf15ab44a763ebafcab86ebbb61506d67b97
|
|
| MD5 |
ad153b89106aabc3b596ac4025149fa4
|
|
| BLAKE2b-256 |
7355f627565530463955b23daecb2f5c6ec62da1bffe5940287d2cc1b600a825
|