Skip to main content

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!

Metadata

Release files for chatgptcode 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chatgptcode 0.1.0
File Size Uploaded
chatgptcode-0.1.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chatgptcode 0.1.0
File Interpreter ABI Platform
chatgptcode-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / chatgptcode-0.1.0.tar.gz

Download URL chatgptcode-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4dc1e4559139e379978362cce7acaf304565eecfa514d01b5dfdd2c927c2d670
BLAKE2b-256 checksum
How to use checksums
e2ba374d25d310ed64305e5475bcf0659a24541aed67490a2c44f2b130bd03dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.7 Linux/5.19.0-29-generic

Release files / chatgptcode-0.1.0-py3-none-any.whl

Download URL chatgptcode-0.1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6026196e784c597993e1d60ef19bc40c7dd5865ba247548d2a9a278100889ef4
BLAKE2b-256 checksum
How to use checksums
9c980d345d8da20c813b57cc259e30524efbc131768e1f2c632a24c1a57c8700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.7 Linux/5.19.0-29-generic

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page