Command line interface tool for interacting with ChatGPT using terminal
Project description
ChatGPT - Command Line Interface
CLI tool for interacting with ChatGPT using terminal
Requirements
- Python >= 3.7.1
- OpenAI account and valid API key
Installation
Tool can be installed using python3 pip
command:
pip install chatgpt-cli-tool
Or you can install it directly form this project source:
python build.py
pip install dist/chatgpt-cli-tool-{version}.tar.gz
Configuration
In order to use ChatGPT cli you will first need to register and create an API key on the official OpenAI website.
Then you can configure the tool with your API key using any of the following options:
- Create an ~/.chatgpt-cli/.env file with variable OPENAI_API_KEY
- Create an .env file in the working directory with variable OPENAI_API_KEY
- Set it through environment variable OPENAI_API_KEY
- Pass it as the first argument when executing this script (e.g.
python main.py my_api_key
)
To see other configurable options for ChatGPT check out .env.example file.
Running the CLI
If you installed the tool using pip, then simply start the cli using command:
chatgpt-cli [api_key] [org_id] [model]
If you are using source code, then first install the Python requirements:
pip install -r requirements.txt
Then, sse the following command to run this script:
python main.py [api_key] [org_id] [model]
All arguments are optional and if provided will override those defined using environment variables or .env file.
License
ChatGPT-cli is MIT licensed.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file chatgpt-cli-tool-1.1.0.tar.gz
.
File metadata
- Download URL: chatgpt-cli-tool-1.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee9b4f4ac01be1d6c411109f59fb6cb693da96f7fd482da5059e48a9a38761b |
|
MD5 | a1b0e19fd163340604892b181c700334 |
|
BLAKE2b-256 | caa9f27b919e54c369c2f8438477dfaa760017e8ce6cfc0bcdae9d7aefa3d9c0 |
File details
Details for the file chatgpt_cli_tool-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: chatgpt_cli_tool-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 455b47f5e1023d5617476708c6338c000e24758eb4df704c9a204c500b1328b1 |
|
MD5 | b0804261591e737b431cec77a7ba3a0b |
|
BLAKE2b-256 | 1a127cddccbdae081997b8a01ffbadab9497c87ecb8ef715135aab8ca5e60ee5 |