Skip to main content

ChatGPT command line interface

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.7.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chatgpt-cli-tool-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 ddb5c2d2a8f70949bce22a30767460dce9a9d55ca2aa236c574140a968cababa
MD5 adf74b93e817086462fc161dc69ef767
BLAKE2b-256 079a9d31606d1e361709ae0eb8abf51542ff5b10b138fbbe451af576ee191910

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chatgpt_cli_tool-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 907039491649e0d8cdad0711afc728b477174bcbfa89cb81b86cd0f8593ef76a
MD5 0d8facef4fa2905b02824992823d5d9f
BLAKE2b-256 e4231a7bde3533b600f41053bbb7b0bc73de5f958e6c90945da1717234e6ff99

See more details on using hashes here.

Supported by

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