Getting Started#
This guide will assist you in beginning your journey with gptme.
Installation#
To install gptme, we recommend using pipx:
pipx install gptme
If pipx is not installed, you can install it using pip:
pip install --user pipx
Note
Windows is not directly supported, but you can run gptme using WSL or Docker.
Usage#
To initiate a new chat or select an existing one, execute:
gptme
This will show you a list of past chats, allowing you to select one or start a new one.
Writing a file
You can then interact with the assistant. Lets start by asking it to write code.
User |
create a new file named life.py implementing the game of life |
Assistant |
Certainly! I'll create a new file named `life.py` implementing Conway's Game of Life. This implementation will use NumPy for efficient array operations and Matplotlib for visualization. Here's the code: |
System |
Saved to life.py |
The assistant will prompt for your confirmation and save the file, as requested.
Making changes
We can also start chats and request changes directly from the command line. The contents of any mentioned text files will be included as context, and the assistant will generate patches to apply the requested changes:
gptme 'make improvements to life.py so that dead cells fade out over time'
User |
make improvements to life.py so that dead cells fade out over time |
Assistant |
To make alive cells green and dead cells black in the Game of Life simulation, we need to modify the colormap and how we represent the cell states. Here's the updated `life.py` script with these changes: |
System |
Patch applied |
Note
With the Browser extras installed, the assistant can also process URLs included in the prompt.
More tools#
You can read about all the other tools on the Tools page.
Including Shell, Python, how to set up Browser, and use Vision.
Interfaces#
There are several ways to interact with gptme:
Support#
For any issues, please visit our issue tracker.