{"id":13456572,"url":"https://github.com/happyapplehorse/gptui","last_synced_at":"2026-01-14T09:51:07.929Z","repository":{"id":199930512,"uuid":"700448237","full_name":"happyapplehorse/gptui","owner":"happyapplehorse","description":"GPTUI is a GPT conversational TUI (Textual User Interface) tool that runs within the terminal. It has some distinctive features, such as multi-AI group chat, AI-initiated care, and other functionalities.","archived":false,"fork":false,"pushed_at":"2024-01-24T16:31:47.000Z","size":443,"stargazers_count":139,"open_issues_count":3,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-24T11:37:57.832Z","etag":null,"topics":["ai","ai-group-chat","cli","gpt","openai","python","terminal","tui"],"latest_commit_sha":null,"homepage":"https://happyapplehorse.github.io/gptui/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/happyapplehorse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":null},"created_at":"2023-10-04T16:03:55.000Z","updated_at":"2025-02-25T19:57:38.000Z","dependencies_parsed_at":"2023-10-14T15:24:24.189Z","dependency_job_id":"477c66dd-1d36-44e6-8d3d-652c9ccb5972","html_url":"https://github.com/happyapplehorse/gptui","commit_stats":null,"previous_names":["happyapplehorse/gptui"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/happyapplehorse/gptui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happyapplehorse%2Fgptui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happyapplehorse%2Fgptui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happyapplehorse%2Fgptui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happyapplehorse%2Fgptui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/happyapplehorse","download_url":"https://codeload.github.com/happyapplehorse/gptui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happyapplehorse%2Fgptui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-group-chat","cli","gpt","openai","python","terminal","tui"],"created_at":"2024-07-31T08:01:24.286Z","updated_at":"2026-01-14T09:51:07.912Z","avatar_url":"https://github.com/happyapplehorse.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# GPTUI\n![GitHub](https://img.shields.io/github/license/happyapplehorse/gptui)\n![PyPI - Version](https://img.shields.io/pypi/v/gptui)\n[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/happyapplehorse/gptui/static.yml?label=docs)](https://happyapplehorse.github.io/gptui/)\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/happyapplehorse/gptui/python-publish.yml?label=build)\n[![Static Badge](https://img.shields.io/badge/bilibili-twototoo222-pink)](https://space.bilibili.com/80170263)\n\n[English readme](README.md) • [简体中文 readme](README.zh.md)\n\n\u003cimg src=\"https://github.com/happyapplehorse/happyapplehorse-assets/blob/main/imgs/gptui_logo.png\" alt=\"gptui_logo\" align=\"left\" width=\"70px\" height=\"70px\"/\u003e\nGPTUI is a GPT conversational TUI (Textual User Interface) tool that runs within the terminal.\nUsing the Textual framework for its TUI interface and equipping the plugin framework provided by Semantic Kernel.\nGPTUI offers a lightweight \u003ca href=\"#gptui_kernel\"\u003eKernel\u003c/a\u003e to power AI applications.\nThe top-level TUI application is decoupled from the underlying Kernel, allowing you to easily replace the TUI interface or expand its functionalities.\nAt present, only the GPT model of OpenAI is supported, and other LLM interfaces will be added later.\n\n\u0026nbsp;\n![gptui_demo](https://github.com/happyapplehorse/happyapplehorse-assets/blob/main/imgs/gptui_demo.gif)\n\n## TUI Features\n- Create and manage conversations with GPT.\n- Display context tokens in real-time.\n- View and adjust GPT conversation parameters at any time, such as temperature, top_p, presence_penalty, etc.\n- A dedicated channel to display internal process calls.\n- Offers a file channel through which you can upload to or download from GPT.\n- Voice functionality.\n- Group talk functionality[^recommend_better_model][^token_cost].\n- AI-Care. Your AI can propactively care for you[^ai_care].\n- Optional built-in plugins (continuously evolving):\n  - Internet search[^google_key].\n  - Open interpreter[^open_interpreter][^token_cost][^recommend_better_model]. (Temporarily removed, waiting to be added back after it supports openai v1.x.)\n  - Reminders[^recommend_better_model].\n  - Recollecting memories from vectorized conversation history.\n- Support custom plugins.\n\n![gptui_img](https://github.com/happyapplehorse/happyapplehorse-assets/blob/main/imgs/gptui_img.jpg)\n\n[^open_interpreter]: This plugin utilizes [open-interpreter](https://github.com/KillianLucas/open-interpreter), you need to\nfirst follow the instructions provided by open-interpreter to properly set up the environment and API.\nThe open-interpreter has the permission to execute code, please ensure that you are already aware of the associated risk before\nenabling this feature.\n[^recommend_better_model]: It is recommended to use this under the GPT-4 model or a better one.\n[^token_cost]: Note: This feature may incur a significant token cost.\n[^ai_care]: Powered by [AI-Care](https://github.com/happyapplehorse/ai-care).\n[^google_key]: `GOOGLE_KEY` and `GOOGLE_CX` are required. Obtained free from [here](https://developers.google.com/custom-search/v1/introduction).\n\n## 🎬 Demo Videos\n- [AI-Care](https://www.youtube.com/watch?v=gPQ7XV-Q1r8)\n\n# Compatibility\nGPTUI runs in a command line environment and is compatible with Linux, macOS, Windows and Android[^compatibility].\nUsing the functionality provided by textual-web, you can also run GPTUI in the browser and share it with remote friends👍.\n\n[^compatibility]: I haven't tested it on the Windows platform yet, and some functionalities like code copying,\nvoice features, etc., still need drivers to be written. I will complete these features later.\nWhen running on Android, please use the [Termux](https://github.com/termux/termux-app) terminal tool.\nFor additional features like code copying and voice functionalities,\nyou need to install [Termux-API](https://github.com/termux/termux-api) and grant the necessary permissions.\n\n\u003ca name=\"gptui_kernel\"\u003e \u003c/a\u003e\n## ⚙️ GPTUI Kernel\n\nGPTUI offers a lightweight Kernel for building AI applications, allowing you to easily expand GPTUI's capabilities or construct your own AI application.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/happyapplehorse/happyapplehorse-assets/blob/main/imgs/gptui_framework.png\" alt=\"gptui-framework\" width=\"700\"/\u003e\u003c/p \u003e\n\nThe **kernel** relies on **jobs** and **handlers** to perform specific functions.\nTo achieve new functionalities, all you need to do is write or combine your own **jobs** and **handlers**.\nThe **manager** and **kernel** of GPTUI are entirely independent of the **client** application, enabling you to effortlessly relocate the **manager** or **kernel** for use elsewhere.\nThe application layer of GPTUI (**client**) employs the CVM architecture, where the model layer provides foundational, reusable modules for interaction with LLM, independent of specific views and controllers implementations.\nIf you wish to build your own AI application, you can start here, fully utilizing the **kernel**, **manager**, and models.\nTo alter or expand UI functionalities, typically, only modifications to the controllers and views are needed.\n\nSee Development Documentation for details. [Documentation](#documentation).\n\nIf you need to use certain functions or components of gptui, you can import and use gptui as a library.\n\n# Installation\n\nNormal use requires ensuring stable network connection to OpenAI.\nIf you encounter any issues, please refer to [troubleshooting](docs/troubleshooting.md).\n\n## Install with pip\n\n```\npip install gptui\n```\n\n[Config your API keys](#config-api-keys) before running.\n\nTo run：\n```\ngptui\n```\nSpecify config file：\n```\ngptui --config \u003cyour_config_file_path\u003e\n```\nThis program loads files through the following steps:\n1. Read the configuration file from --config. If not specified, proceed to the next step.\n2. Search for ~/.gptui/.config.yml in the user directory. If not found, move to the next step.\n3. Copy the default configuration file gptui/config.yml to ~/.gitui/.config.yml and use it.\n\n## Install from source\n\n```\ngit clone https://github.com/happyapplehorse/gptui.git\ncd gptui\npip install .\n```\nAPI configuration is required before running.\n\nTo run:\n\n```bash\ngptui\n# Or you can also use\n# python -m gptui\n```\n\nYou can also directly run the startup script (this allows you to modify the source code and run it immediately):\nFirst, install the dependencies:\n\n```\npip install -r requirements.txt\n```\nThen, run the startup script:\n```\npython main.py\n```\n\nWhen running the program with `python main.py` or `python -m gptui`, use `gptui/config.yml` as the configuration file.\n\nOn Linux or macOS systems, if you want to use voice functionalities, you'll need to install pyaudio separately.\n\n# Configuration\n\n## Config API keys\nConfigure the corresponding API Keys in `~/.gptui/.env_gptui`.\nRefer to the [.env_gptui.example](https://github.com/happyapplehorse/gptui/blob/main/.env_gptui.example) file.\nWhen using the \"WebServe\" plugin, `GOOGLE_KEY` and `GOOGLE_CX` need to be provided, which can be [obtained](https://developers.google.com/custom-search/v1/introduction) free of charge from Google.\n\n## Config File\nSee `./config.yml` for a config file example that lists all configurable options.\nDepending on the platform you are using, it is best to configure the following options:\n\n- os: system platform\n\nOtherwise, some features may not work properly, such as code copy and voice related functions.\n\n## Configuration Guide\nFor detailed configuration instructions, please refer to [here](./docs/configuration.md).\n\n# Quick Start\n\n## Interface Layout\n\n![gptui-layout](https://github.com/happyapplehorse/happyapplehorse-assets/blob/main/imgs/gptui_layout.jpg)\n\n- **chat area**: Display area for chat content.\n- **status area**： Program status display area, displaying response animations and notifications.\n- **input area**: Chat content input area.\n- **auxiliary area**: Auxiliary information area, displaying \"internal communication\" between the program and the LLM, including function call information, etc.\n- **control area**: The program's control area, where you can view and set the state of the program, such as change OpenAI chat parameters.\n- **chat tabs**: Conversation Tab Bar.\n- **conversation control**: Conversation control buttons. From top to bottom they are:\n  - `+`: **_New conversation_**\n  - `\u003e`: **_Save conversation_**\n  - `\u003c`: **_Load conversation_**\n  - `-`: **_Delete conversation_**\n  - `x`: **_Delete conversation file_**\n  - `n`: **_Disposable conversation_**\n  - `↥`: **_Upload file_**\n- **panel selector**: Panel selection area. From top to bottom they are：\n  - `C`: **_Conversation file records_**\n  - `D`: **_System file tree_**\n  - `A`: **_Auxiliary information panel_**\n  - `T`: **_File pipeline panel_**\n  - `P`: **_Plugin selection panel_**\n- **switches**：Direct control switches. From left to right they are：\n  - `R`: **_Program state auto save and restore switch_**\n  - `V`: **_Voice switch_**\n  - `S`: **_Read reply by voice_**\n  - `F`: **_Fold files in chat_**\n  - `|Exit|`: **_Exit program_**\n- **dashboard**：Context window size for chat.\n- **others**:\n  - `\u003c`: **_Previous chat_**\n  - `\u003e`: **_Next chat_**\n  - `1`: **_Number of chats_**\n  - `☌`: **_[Running status](#Running status)_**\n  - `↣`: **_Fold right non-chat area_**\n  - `?`: **_Help documentation_**\n\n## Running status\n\n\u003cspan style=\"color:green\"\u003e☌\u003c/span\u003e: Ready.  \n\u003cspan style=\"color:red\"\u003e☍\u003c/span\u003e: Task running.\n\n## Dynamic Commands\n\nSwitch to `S` in the control area, enter the command and press enter. Currently supports the following commands:\n- Set chat parameters\nCommand: **set_chat_parameters()**  \nParameters: OpenAI chat parameters in dictionary form, refer to [OpenAI Chat](https://platform.openai.com/docs/api-reference/chat/create).  \nExample: `set_chat_parameters({\"model\": \"gpt-4\", \"stream\": True})`\n- Set max sending tokens ratio\nCommand: **set_max_sending_tokens_ratio()**  \nParameters: The ratio of the number of sent tokens to the total token window, in float form. The remaining token count is used as the limit for the number of tokens GPT returns.  \nExample: `set_max_sending_tokens_ratio(0.5)`\n\n## Hotkeys\n\nGPTUI provides hotkeys for commonly used features, see [Help](https://github.com/happyapplehorse/gptui/blob/main/docs/help.md).\nIn addition, you can also press `ESC`, `ctrl+[`, or `ctrl+/` to bring up the hotkey menu (this mode offers more comprehensive hotkey functionalities, but they are not exactly the same as the direct hotkeys.).\n\n# Documentation\n\nFor detailed usage and development instructions, see [here](https://happyapplehorse.github.io/gptui/), for in-program help documentation see [here](src/gptui/help.md).\n\n# Contribution\n\nSome of GPTUI's plugin features rely on prompt, you can continue to help me improve these prompt.\nAnd I'd like to have appropriate animation cues during certain state changes.\nIf you have any creative ideas, I'd appreciate your help in implementing them.\nP.S.: Each contributor can leave a quote in the program.\n\n# Note\nThis project utilizes OpenAI's Text-to-Speech (TTS) services for generating voice outputs.\nPlease be aware that the voices you hear are not produced by human speakers, but are synthesized by AI technology.\n\n# License\n\nGPTUI is built upon a multitude of outstanding open-source components and adheres to the [MIT License](https://github.com/happyapplehorse/gptui/blob/main/LICENSE) open-source agreement.\nYou are free to use it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhappyapplehorse%2Fgptui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhappyapplehorse%2Fgptui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhappyapplehorse%2Fgptui/lists"}