MCPcopy
hub / github.com/aandrew-me/tgpt

github.com/aandrew-me/tgpt @v2.11.1 sqlite

repository ↗ · DeepWiki ↗ · release v2.11.1 ↗
132 symbols 364 edges 23 files 32 documented · 24%
README

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 iex "& { $(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:

    bash scoop install https://raw.githubusercontent.com/aandrew-me/tgpt/main/tgpt.json - Chocolatey bash 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, you may update it with

tgpt -u

It may require admin privileges.

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

Core symbols most depended-on inside this repo

PrintError
called by 27
src/utils/utils.go
LogToFile
called by 13
src/utils/utils.go
GetData
called by 8
src/helper/helper.go
MakeRequestAndGetData
called by 7
src/helper/helper.go
RandomString
called by 6
src/utils/utils.go
ExecuteCommandWithCapture
called by 6
src/helper/helper.go
GenerateRandomNumber
called by 5
src/utils/utils.go
GetMainText
called by 4
src/providers/providers.go

Shape

Function 89
Struct 39
Method 3
TypeAlias 1

Languages

Go100%

Modules by API surface

src/helper/helper.go26 symbols
src/search/search.go24 symbols
src/imagegen/arta/arta.go11 symbols
src/structs/structs.go8 symbols
src/providers/kimi/kimi.go8 symbols
src/bubbletea/bubbletea.go8 symbols
src/utils/utils.go5 symbols
src/providers/isou/isou.go5 symbols
src/providers/duckduckgo/duckduckgo.go5 symbols
src/providers/sky/sky.go3 symbols
src/providers/pollinations/pollinations.go3 symbols
src/providers/openai/openai.go3 symbols

Dependencies from manifests, versioned

github.com/andybalholm/brotliv1.1.1 · 1×
github.com/andybalholm/cascadiav1.3.3 · 1×
github.com/antchfx/htmlqueryv1.3.4 · 1×
github.com/antchfx/xmlqueryv1.4.4 · 1×
github.com/antchfx/xpathv1.3.3 · 1×
github.com/araddon/dateparsev0.0.0-2021042916200 · 1×
github.com/atotto/clipboardv0.1.4 · 1×
github.com/aymanbagabas/go-osc52/v2v2.0.1 · 1×
github.com/bits-and-blooms/bitsetv1.22.0 · 1×
github.com/bogdanfinn/fhttpv0.5.32 · 1×
github.com/bogdanfinn/tls-clientv1.7.11 · 1×

For agents

$ claude mcp add tgpt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact