Skip to main content

Command line interface tool for interacting with ChatGPT using your favorite terminal

Project description

ChatGPT - Command Line Interface

CLI tool for interacting with ChatGPT using your favorite 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:

  1. Set it through environment variable OPENAI_API_KEY
  2. Create an .env file in the working directory with variable OPENAI_API_KEY
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chatgpt-cli-tool-1.0.8.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chatgpt_cli_tool-1.0.8-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file chatgpt-cli-tool-1.0.8.tar.gz.

File metadata

  • Download URL: chatgpt-cli-tool-1.0.8.tar.gz
  • Upload date:
  • Size: 3.9 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

Hashes for chatgpt-cli-tool-1.0.8.tar.gz
Algorithm Hash digest
SHA256 325c19a53657b26cd745b01dd8f43910818eb9edebda909460e00812049a7d72
MD5 5157f5dae2bcd9ba7b146d966ef97210
BLAKE2b-256 68e63bf728847e0a97885a04830e32faf478b5b933f2f33bd23c72c0fa1bf2a1

See more details on using hashes here.

File details

Details for the file chatgpt_cli_tool-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: chatgpt_cli_tool-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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

Hashes for chatgpt_cli_tool-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d519f83a76680ac179e0e3b1cae9fba82d50f10976df8198a20231b301c9e1f2
MD5 deab3caeeacbbfe976b4515ab94eaa1a
BLAKE2b-256 3ce393935436a2822090b51b8383c1f4990489706259c750b15dfe61035afbad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page