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
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 chatgptcode-0.1.0.tar.gz
.
File metadata
- Download URL: chatgptcode-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.7 Linux/5.19.0-29-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc1e4559139e379978362cce7acaf304565eecfa514d01b5dfdd2c927c2d670 |
|
MD5 | db2f0c8582c2132b3b738c32388fdf07 |
|
BLAKE2b-256 | e2ba374d25d310ed64305e5475bcf0659a24541aed67490a2c44f2b130bd03dd |
File details
Details for the file chatgptcode-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: chatgptcode-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.7 Linux/5.19.0-29-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6026196e784c597993e1d60ef19bc40c7dd5865ba247548d2a9a278100889ef4 |
|
MD5 | 8249c7edca9f8f777428b2a29f9afa6e |
|
BLAKE2b-256 | 9c980d345d8da20c813b57cc259e30524efbc131768e1f2c632a24c1a57c8700 |