Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tearingItUp786/chatgpt-tui
A chatgpt terminal ui
https://github.com/tearingItUp786/chatgpt-tui
Last synced: 21 days ago
JSON representation
A chatgpt terminal ui
- Host: GitHub
- URL: https://github.com/tearingItUp786/chatgpt-tui
- Owner: tearingItUp786
- License: mit
- Created: 2023-11-20T02:00:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-20T19:06:22.000Z (9 months ago)
- Last Synced: 2024-12-20T23:13:27.299Z (30 days ago)
- Language: Go
- Homepage:
- Size: 10.6 MB
- Stars: 34
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- charm-in-the-wild - chatgpt-tui - A TUI for ChatGPT with SQLite sessions. (_built with Bubble Tea_) (Applications / AI)
README
# ChatGPT tui README
My first ever terminal UI! Everything is stored locally on sqlite and written in Go!
## Technologies
- Go
- [bubbletea](https://github.com/charmbracelet/bubbletea): A Go framework for
terminal user interfaces. It's a great framework that makes it easy to create
TUIs in Go.
- [openai](https://platform.openai.com/docs/api-reference): OpenAI's REST Api
- [sqlite](https://www.sqlite.org/): A C library that provides a lightweight
disk-based database that doesn't require a separate server process (perfect
for terminal apps, in my opinion).
- [lipgloss](https://github.com/charmbracelet/lipgloss): Style definitions for
nice terminal layouts!
- [bubbles](https://github.com/charmbracelet/bubbles): Some general use
components for Bubble Tea apps!## Installation
Please make sure that you expose a `OPENAI_API_KEY` inside of your environment; we require it to make api calls!
Set up your [api key](https://platform.openai.com/api-keys)
```bash
export OPENAI_API_KEY="some-key" # you would want to export this in your .zshrc
brew tap tearingitup786/tearingitup786
brew install chatgpt-tui
chatgpt-tui
```To get access to the release candidates, install command:
```bash
brew install rc-chatgpt-tui
rc-chatgpt-tui
```## Config
We provide a `config.json` file within your directory for easy access to essential settings.
On most Macs, the path is `~/.chatgpt-tui/config.json`.
This file includes the URL used for network calls to the TUI,
specified as `chatGPTApiUrl: "https://api.openai.com/v1/chat/completions"`.
Additionally, the `systemMessage` field is available for customizing system prompt messages.## Demo
![tui demo](./tui-demo.gif)
## Global Keybindings
- `Tab`: \*Change focus between panes. The currently focused pane will be highlighted with a pink border.
- You can only change focus if Prompt Pane is not in `insert mode`
- `Ctrl+o`: Toggles zen mode
- `Ctrl+c`: Exit the program## Prompt Pane
- `i`: Enters insert mode (you can now safely paste messages into the tui)
- `esc`: Exit insert mode for the prompt## Chat Messages Pane
- `y`: Copies the last message from ChatGPT into your clipboard.
- `Y`: Copies all messages from the ChatGPT session into your clipboard.## Settings Pane
- `m`: Opens an input dialog to change the model.
- `f`: Opens an input dialog to change the frequency of updates.
- `t`: Opens an input dialog to set the maximum number of tokens per message.## Sessions Pane
- `Ctrl+N`: Creates a new session.
- `d`: Deletes the currently selected session from the list.
- `Enter`: Switches to the session that is currently selected.Please refer to this guide as you navigate the TUI. Happy exploring!
### Dev notes
The SQL db is stored in you `your/home/directory/.chatgpt-tui`, as well as the debug log. To enable `debug` mode, `export DEBUG=1` before running the program.
## Contributors
Taranveer (Taran) Bains
📖 🚧 👀 💻
TJ Miller
📖 💻