CLI tool
aandrew-me/tgpt avatar
aandrew-me/tgpt

tgpt: AI Chatbots in the Terminal, and How It Handles Providers

AI Chatbots in terminal for free

3,260 stars344 forksGoGPL-3.0

At a glance

What is it?
tgpt is a Go CLI that puts several AI providers behind one command. It installs in one line, ships in distro repositories, and is still receiving releases, but its provider list is the part you should read before adopting it.
Who is it for?
Adopt tgpt if you want a terminal-native AI client without writing your own HTTP layer, and if the providers listed in md/providers.md cover the models you already pay for or use for free. Do not adopt it if you need a guarantee that a specific provider stays reachable, since the README does not document per-provider availability or rollback.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What tgpt Solves, and Who It Is Actually For

Every AI provider ships its own web interface, its own API shape, and its own authentication. If you work in a terminal, switching between them means leaving the shell, opening a browser, and pasting context back and forth. tgpt collapses that into one binary. The README describes it as a cross-platform command-line interface tool that lets you use AI in the terminal, and the repository topics list chatgpt, gpt4, llama and mixtral alongside linux, macos and windows.

The audience is narrower than the tagline suggests. This is not a tool for building an application on top of a model. There is no documented library API in the README, and the module is a command, not a framework. It is for people who already live in a shell and want a single command to answer questions, and for people on machines where installing a browser-based client is impractical. The FreeBSD port packaging and the Arch, Homebrew, Scoop and Chocolatey packages point at the same person: someone who installs software through a package manager and expects it to stay there.

How tgpt Talks to Multiple Providers

The provider abstraction is the core design decision, and it shows up in the dependency list before it shows up in the README. The module requires charm.land/bubbletea/v2 and charm.land/bubbles/v2 for the terminal interface, github.com/bogdanfinn/tls-client and github.com/bogdanfinn/fhttp for HTTP with a custom TLS fingerprint, github.com/JohannesKaufmann/html-to-markdown/v2 for converting provider responses into terminal-friendly Markdown, and github.com/mark3labs/mcp-go for Model Context Protocol support.

That combination tells you what the data flow looks like. A request goes out through a TLS client that can impersonate a browser rather than a plain Go HTTP client. The response comes back, and if a provider returns HTML, the html-to-markdown package converts it before display. The bubbletea dependency means the interactive mode is a full terminal UI, not a readline loop, which is why the tool can render a chat session rather than printing one answer and exiting.

There is a real trade-off here. Vendor-specific TLS impersonation is what lets tgpt reach providers that block generic clients, but it also means the tool is coupled to how those providers fingerprint connections. When a provider changes its edge configuration, that coupling is the thing that breaks, not the Go code around it. The README does not describe a fallback path for that case.

Installing tgpt and Running a First Prompt

The install script is the shortest path on GNU/Linux and macOS. It takes the install directory as an argument, defaulting to /usr/local/bin, and the README notes that the location must be on your PATH.

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

If you prefer a package manager, the README lists several. On Arch Linux, pacman installs the packaged build. On macOS and Linux with Homebrew, brew install tgpt does the same. The Go route is available if you already have a Go toolchain and the Go install directory on your shell path.

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

Windows users have three options: a PowerShell install script invoked with irm and iex, a Scoop manifest URL, or choco install tgpt. The PowerShell script also supports uninstalling, by re-fetching the script and passing -Uninstall.

Once installed, the binary is invoked as tgpt. The README points to md/usage.md for the full flag list, so the exact prompt syntax is not reproduced here. What the README does document in detail is proxy configuration, which matters if your network blocks direct egress. Set http_proxy or HTTP_PROXY with one of four accepted formats: http://ip:port, http://user:pass@ip:port, socks5://ip:port, or socks5://user:pass@ip:port. Alternatively, create a proxy.txt file either in the directory you run the command from or at ~/.config/tgpt/proxy.txt, containing a single line such as:

bash
http://127.0.0.1:8080

If the proxy is misconfigured, the symptom is a failed request rather than a clear configuration error, so test the proxy line with a simple prompt before relying on it.

What the Documentation Does Not Cover

The README is unusually thin on the two things that decide whether a CLI AI client survives daily use: what happens when a provider changes, and what happens when a provider is removed. There is a link to md/providers.md, described as the currently available providers, which is the right place to look, but the README itself gives no statement about provider stability, deprecation notices, or how quickly a broken provider is fixed.

The release cadence offers a partial answer. v2.12.0 shipped on 2026-07-26, v2.13.0 on 2026-08-09, and v2.14.0 on 2026-08-30, with the last push to the repository on 2026-09-14. Three releases in roughly five weeks is a fast enough loop that a provider break would likely be addressed, but that is an inference from dates, not a documented support commitment. If your workflow depends on one specific model, treat the provider list as the risk surface and check it after every upgrade.

A second gap is configuration. The README documents proxy.txt and the proxy environment variables, and it mentions a configuration file location for uninstall purposes (~/.config/tgpt on GNU/Linux, Library/Application Support/tgpt on macOS), but it does not enumerate the configuration keys. There is a config_test.go in the repository root, which suggests configuration is tested, but the README does not tell you what you can set.

tgpt Versus Calling a Provider API Directly

The obvious alternative is a short script against a provider's own HTTP API, or an official CLI if the provider ships one. The difference is where the maintenance sits. A direct API call gives you a stable contract that the provider documents and versions, and you control retries, timeouts and output formatting. It also gives you exactly one provider, and you write the streaming, Markdown rendering and terminal UI yourself.

tgpt inverts that. You get the terminal UI, the Markdown conversion and the multi-provider routing for free, and in exchange you inherit a dependency on how tgpt talks to each provider. The tls-client dependency exists precisely because some providers do not accept ordinary Go HTTP clients, which is a capability you would otherwise have to build. For a personal shell tool, that exchange is usually worth it. For anything that has to run unattended, the direct API is the more predictable choice, because you can pin a version and read the provider's own changelog instead of watching a third-party tool's release notes.

Upgrades, Licensing and Long-Term Cost

Upgrading depends entirely on how you installed it. If you used the install script on GNU/Linux, macOS or Windows, tgpt -u updates the binary, and the README warns that admin privileges may be required depending on the install location. If you used a package manager, the README is explicit that you should update through that package manager instead: brew upgrade tgpt, pacman -Syu tgpt, scoop update tgpt, choco upgrade tgpt, or go install github.com/aandrew-me/tgpt/v2@latest. Mixing the two paths means two copies of the binary and an unclear version at runtime.

Uninstalling is manual for script installs. The README gives sudo rm $(which tgpt), and notes that the configuration directory is usually ~/.config/tgpt on GNU/Linux and Library/Application Support/tgpt on macOS. That configuration directory is not removed by the uninstall command, so leftover proxy settings persist unless you delete them.

The licence is GPL-3.0. For individual terminal use this is unremarkable. If you plan to redistribute a modified tgpt inside a product, the copyleft terms apply to the distributed work, and that is a question for your own legal review rather than something the README resolves. The maintenance signal is favorable on the facts available: the repository is not archived, and the last push was on 2026-09-14.

Editorial conclusion

Adopt tgpt if you want a terminal-native AI client without writing your own HTTP layer, and if the providers listed in md/providers.md cover the models you already pay for or use for free. Do not adopt it if you need a guarantee that a specific provider stays reachable, since the README does not document per-provider availability or rollback. Verify two things first: that your chosen provider appears in the provider list for your installed version, and that your proxy configuration works, because tgpt reads http_proxy and proxy.txt rather than a per-provider setting.

Frequently asked questions

What is tgpt and what does it do?

tgpt is a cross-platform command-line tool that lets you use AI in your terminal. It is written in Go and routes requests to a set of providers listed in md/providers.md.

How do I install tgpt on Linux or macOS?

The README gives a curl command that pipes the install script to bash with an install directory argument, defaulting to /usr/local/bin. Package manager options include pacman -S tgpt on Arch Linux and brew install tgpt.

How do I update tgpt?

If you installed with the install script, run tgpt -u, which may need admin privileges depending on the install location. If you installed through Homebrew, Pacman, Scoop, Chocolatey or Go, the README says to update with that package manager's command instead.

Does tgpt support a proxy?

Yes. You can set the http_proxy or HTTP_PROXY environment variable using an http, http-with-auth, socks5 or socks5-with-auth URL. You can also put the proxy address in proxy.txt, either in the current directory or at ~/.config/tgpt/proxy.txt.

What licence is tgpt released under?

The repository is licensed GPL-3.0. The README does not discuss redistribution terms, so if you plan to ship a modified version you should review the licence yourself.

How do I uninstall tgpt?

For script installs, the README gives sudo rm $(which tgpt). The configuration directory, usually ~/.config/tgpt on GNU/Linux and Library/Application Support/tgpt on macOS, is separate and is not removed by that command.

Official sources

  1. aandrew-me/tgpt on GitHub
  2. Issues
  3. License: GPL-3.0
  4. README
  5. Releases
Community notes

Community notes