https://github.com/tcapelle/termgpt
A simple wrapper to call openAI's chatGPT on the terminal written in Python
https://github.com/tcapelle/termgpt
Last synced: about 2 months ago
JSON representation
A simple wrapper to call openAI's chatGPT on the terminal written in Python
- Host: GitHub
- URL: https://github.com/tcapelle/termgpt
- Owner: tcapelle
- Created: 2023-03-03T15:49:21.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-17T15:19:38.000Z (3 months ago)
- Last Synced: 2025-03-29T00:05:17.766Z (2 months ago)
- Language: Python
- Size: 534 KB
- Stars: 80
- Watchers: 4
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ChatGPT-repositories - termGPT - A simple wrapper to call openAI's chatGPT on the terminal written in Python (CLIs)
README
[](https://badge.fury.io/py/termgpt)
# termGPT: Chatbot in the Terminal
TermGPT v1.0.0 introduces exciting new features including improved conversation history management and experimental function-calling support for executing Linux commands from your terminal. This program uses Gemini Flash by default, but any [LiteLLM model](https://docs.litellm.ai/docs/providers) is supported.
## Now you can use the `llm` command (Like Simon's tool)
In this version, these have been consolidated into a single entry point:
```bash
$ llm "list all files in this folder with sizes"
```If you want to chat with Claude, you can use the `-m` flag:
```bash
$ llm -m claude-3-5-sonnet-20240620
```## Install
You will need an GEMINI API key, which should be available as an environment variable named `GEMINI_API_KEY`.```bash
$ pip install termgpt
```## Usage
**Interactive Chat:**
```bash
$ llm
> let's check git status
To check the git status, use the command `git status`. This command will show you the current status of your git repository, including any modified, staged, or untracked files.
```**Run Terminal Commands:**
You can execute commands by passing them as a quoted argument:
```bash
$ llm "list all files in this folder with sizes"
Use `ls -l` to list all files in the current directory, along with their sizes, modification dates, and permissions.
Execute this command (press return to run):
$ ls -l
-rw-r--r-- 1 user staff 2.4K Mar 6 09:43 README.md
...
```Happy chatting!