tgpt is a free, open source ai interaction & interfaces project written in Go and released under GPL-3.0. It has 3,287 GitHub stars, 351 forks and 12 open issues, and was last pushed 4 days ago. On this registry it ranks #85 of 156 tracked projects in AI Interaction & Interfaces, with 5 head-to-head comparisons available. It gained 18 stars over the last 30 tracked days.

What is tgpt?

tgpt is a cross-platform command-line interface that puts AI chatbots in the terminal, aimed at developers, system administrators and shell-centric users who want model access without leaving the command line.

What it is

tgpt is an open-source CLI tool written in Go and released under the GPL-3.0 licence. It runs on GNU/Linux, macOS, Windows and FreeBSD, and it gives the user a terminal front end to conversational AI providers rather than a graphical application. The project ships binaries through its GitHub releases page and is additionally distributed through Arch Linux's pacman, Homebrew, Scoop, Chocolatey and the FreeBSD ports tree as www/tgpt. Its provider coverage is documented separately in md/providers.md, and its command reference lives in md/usage.md. The tagline describes it as "AI Chatbots in terminal for free".

The concrete problem it solves is context switching. Without a tool of this kind, talking to a hosted chatbot means opening a browser, authenticating to a web interface and copying text back and forth into the shell. tgpt collapses that into a single executable that is invoked from the prompt, which matters most when the user is already inside an SSH session, a remote server, a container host or a terminal multiplexer where a browser is unavailable or impractical. Rather than replacing a specific named product, it replaces the general practice of leaving the terminal to reach a chat model, and it does so for multiple providers behind one interface.

Key capabilities

  • Multi-provider support documented in md/providers.md, so one binary fronts several chat backends.
  • Model families referenced by the project's topics include gpt4, llama and mixtral.
  • Proxy support through the http_proxy or HTTP_PROXY environment variable, accepting http://ip:port, http://user:pass@ip:port, socks5://ip:port and socks5://user:pass@ip:port.
  • Proxy configuration through a file at either ./proxy.txt or ~/.config/tgpt/proxy.txt.
  • Self-update for script installations via tgpt -u, with package-manager installs updated through their own commands.
  • Configuration stored in ~/.config/tgpt on GNU/Linux and in Library/Application Support/tgpt on macOS.
  • Installation across ecosystems: pacman -S tgpt, brew install tgpt, choco install tgpt, Scoop, the FreeBSD port and package, and go install github.com/aandrew-me/tgpt/v2@latest.

Who uses it and how

  • Linux and macOS users who install from the shell script into /usr/local/bin and update in place with tgpt -u.
  • Arch Linux and FreeBSD users who prefer to track the tool through pacman -Syu tgpt or the ports tree rather than a vendor script.
  • Windows users deploying through the PowerShell install script, Scoop or Chocolatey, including scripted uninstallation via the same script with the -Uninstall flag.
  • Operators on restricted or proxied networks who route traffic through HTTP_PROXY or a proxy.txt file.
  • Developers automating or scripting shell work who want the model reachable as a normal executable on PATH.

Getting started

Install with the shell script curl -sSL https://raw.githubusercontent.com/aandrew-me/tgpt/main/install | bash -s /usr/local/bin, or use a package manager such as brew install tgpt, pacman -S tgpt or go install github.com/aandrew-me/tgpt/v2@latest. The provider list and flag reference are in md/providers.md and md/usage.md.

How it compares

The provided facts name no paid products that tgpt replaces and no comparable tools in the same category. On the evidence available, tgpt stands alone in this registry.

When to use it — and when not to

There is nothing to operate: no database, no object storage and no mail server, because tgpt is a single binary that calls remote providers, so the trade-off is a dependency on network access and on whichever providers are reachable from the machine. Users who need a graphical interface, guaranteed vendor support or a documented provider-level service agreement should look elsewhere. The main weakness visible here is thin documentation at the top level: the README excerpt covers installation, updating, proxying and uninstallation in detail, but usage and provider behaviour are pushed into md/usage.md and md/providers.md, so the entry point alone does not show what commands actually do.

project readme (upstream, from github) — read inline
tgpt logo

tgpt 🤖

GitHub go.mod Go version GitHub release (latest by date) Arch Linux package Chocolatey Version Homebrew Formula Version

tgpt is a Cross-platform Command-Line Interface (CLI) tool that allows you to use AI in your Terminal.

Demo

Currently available providers

Installation ⏬

Download for GNU/Linux 🐧 or MacOS 🍎

The default download location is /usr/local/bin, but you can change it in the command to use a different location. However, make sure the location is added to your PATH environment variable for easy accessibility.

You can download it with the following command:

curl -sSL https://raw.githubusercontent.com/aandrew-me/tgpt/main/install | bash -s /usr/local/bin

If you are using Arch Linux, you can install with pacman:

pacman -S tgpt
Install with Homebrew
brew install tgpt

FreeBSD 😈

To install the port:

cd /usr/ports/www/tgpt/ && make install clean

To install the package, run one of these commands:

pkg install www/tgpt
pkg install tgpt

Install with Go

You need to add the Go install directory to your system's shell path.

go install github.com/aandrew-me/tgpt/v2@latest

Windows 🪟

  • Installation Script

    Open Powershell, copy and paste the command and press Enter to install.

    irm https://raw.githubusercontent.com/aandrew-me/tgpt/refs/heads/main/install-win.ps1 | iex
    

    Uninstall with

    & ([scriptblock]::Create((irm https://raw.githubusercontent.com/aandrew-me/tgpt/refs/heads/main/install-win.ps1))) -Uninstall
    
  • Scoop: Package installation with Scoop can be done using the following command:

    scoop install https://raw.githubusercontent.com/aandrew-me/tgpt/main/tgpt.json
    
  • Chocolatey

    choco install tgpt
    

From Release

You can download the executable for your operating system, rename it to tgpt (or any other desired name), and then execute it by typing ./tgpt while in that directory. Alternatively, you can add it to your PATH environmental variable and then execute it by simply typing tgpt.

Updating ⬆️

If you installed the program with the installation script (GNU/Linux, macOS, or Windows), you may update it with:

tgpt -u

(On GNU/Linux and macOS, it may require admin privileges depending on the install location.)

If you installed using a package manager (Homebrew, Pacman, Scoop, Chocolatey, Go), please update using your package manager's update command (e.g. brew upgrade tgpt, pacman -Syu tgpt, scoop update tgpt, choco upgrade tgpt, or go install github.com/aandrew-me/tgpt/v2@latest).

Usage

Proxy

Support:

1. Environment variable

http_proxy or HTTP_PROXY with following available formats:

  • Http Proxy [ http://ip:port ]
  • Http Auth [ http://user:pass@ip:port ]
  • Socks5 Proxy [ socks5://ip:port ]
  • Socks5 Auth [ socks5://user:pass@ip:port ]

2. Configuration file

Supported file locations:

  • ./proxy.txt (in the same directory from where you are executing)
  • ~/.config/tgpt/proxy.txt

Example:

http://127.0.0.1:8080

Uninstalling

If you installed with the install script, you can execute the following command to remove the tgpt executable

sudo rm $(which tgpt)

Configuration file is usually located in ~/.config/tgpt on GNU/Linux Systems and in "Library/Application Support/tgpt" on MacOS

Frequently asked questions

Is tgpt free to use?

tgpt is open source under the GPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does tgpt do?

AI Chatbots in terminal for free

What is tgpt written in?

tgpt is primarily written in Go. Its source is publicly available at https://github.com/aandrew-me/tgpt, and it has 3,287 GitHub stars.