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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chatgptcode-0.1.0.tar.gz | 4.1 kB | Without provenance | Details for chatgptcode-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chatgptcode-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for chatgptcode-0.1.0-py3-none-any.whl |
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
|
Security for chatgptcode 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.