Skip to main content

A command line tool for interacting with ChatGPT to help with development

Project description

Chat GPT Code

This extension is for terminal based AI assisted programming. It takes advantage of the ChatGPT python package and has additional formatting to make it easier to use for developers.

Installation

I'll publish a pip package soon, but for now you can install it by cloning the repo and running the following from the project's root directory.

> git clone https://github.com/BrianKmdy/ChatGPTCode.git
> cd ChatGPTCode
> pip install poetry
> poetry install

Setup

Create a file called config.json in folder .gptcode in your home directory. The file should be formatted as follows, where session_token referers to the __Secure-next-auth.session-token to the browser cookie found on the chat GPT website (see terry3041's guide for additional info):

{
  "session_token": "eyJhbGciOiJkaXIiL...",
}

Usage

To run the app with poetry use the following command. In order for this to work you'll need to have chrome or chromium installed. A browser instance will pop up, connect to chat GPT, and then will automatically be hidden from view.

> poetry run python -m gptcode

You can then ask chat GPT questions and get a response in your terminal! With nicely formatted code and easy to read output.

Thanks so much to user acheong08 for the amazing ChatGPT Python package which this is based on!

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

chatgptcode-0.1.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

chatgptcode-0.1.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

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