Metadata-Version: 2.1
Name: chatgdb
Version: 1.0.2
Summary: Harness the power of ChatGPT directly inside the GDB debugger!
Home-page: https://github.com/pgosar/chatgdb
License: MIT
Keywords: gdb,debugger,chatgpt
Author: Pranay Gosar
Author-email: gosarpranay@gmail.com
Requires-Python: >=3.3,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Project-URL: Bug Tracker, https://github.com/pgosar/chatgdb/issues
Project-URL: Repository, https://github.com/pgosar/chatgdb
Description-Content-Type: text/markdown

# ChatGDB
Harness the power of ChatGPT inside the GDB debugger!
![Image](https://lh5.googleusercontent.com/xZMLwWWxavqYjC3fyCIZJ0m-s-f-XEoiOeWGbxRrw3dWoukUoWzJJ4iiBkVO2Vtiyr4K6o0WkTs7B40TapeBPIYwgVRVhDXGVjB4tFYoKH3_nK847nYXl3pISB6dEP6Wp_o0uPlfJOjCrLspm0_VNw)

### Installation instructions
First, make sure you install [pip](https://pip.pypa.io/en/stable/installation/)

To install, run the command ```pip3 install chatgdb```. It will create an executable called
```chatgdb``` that you will have to use to set your api key. To do that, run the command

```chatgdb -k <API KEY> ```

Without the API key, you won't be able to make requests to OpenAI. The API key is stored in
text in the same directory as the installed script, which is currently in your python site packages
folder along with the main script. You can easily find this location by running the following in your terminal:

``` python -m site --user-site```

Optionally, you can also download the compressed files in the releases page to get the scripts directly.
If you do this, you will need to instead invoke the cli tool with 

```python path/to/cli.py -k <API KEY>```.


### How to use
I first recommend editing your ```$HOME/.gdbinit``` to source the main script automatically on startup. Run the following command:

```echo "source $(python -m site --user-site)/chatgdb/core.py" > $HOME/.gdbinit```

While inside GDB the command chat appended by your query, for example ```chat list all breakpoints that I created```. There is also a command called ```explain``` that you can use with no arguments to explain the previously run command, and optionally, with a query to just ask GPT a question. For example, running ```explain``` directly after running ```break 7``` would prompt the tool to explain how breakpoints work. Running ```explain how input formatting works in gdb``` would prompt it to explain input formatting (see the image at the top).

Run chat help to print out a short tutorial on how to use the tool.


