Skip to content

new package: tgpt #25199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

new package: tgpt #25199

wants to merge 1 commit into from

Conversation

kleo
Copy link
Contributor

@kleo kleo commented Jun 28, 2025

Why is it worth to add this package?

Accessible AI chatbot on terminal without API keys.

Home page URL

https://github.com/aandrew-me/tgpt

Source code URL

https://github.com/aandrew-me/tgpt

Packaging policy acknowledgement

  • The project is actively developed.
  • The project has existing packages and is "well known".
  • Licensed under an open source license.
  • Not available through a language package manager: pip, npm, cpan, cargo, etc.
  • Not taking up too much disk space (< 100MiB per architecture, exceptions can be made)
  • Not duplicating the functionality of existing packages.
  • Not serving hacking, malware, phishing, spamming, spying, ddos functionality.
  • I certify that I have read Termux Packaging Policy and understand that my request will be denied if it is found lacking.

Additional information

Just an attempt to add this package. I have read #17614. I'm not sure if it still violates the Termux Packaging Policy.

Build steps on build.sh are copied from the Arch Linux tgpt package PKGBUILD.

@kleo kleo requested review from Grimler91 and TomJo2000 as code owners June 28, 2025 21:10
@kleo kleo force-pushed the tgpt branch 2 times, most recently from 33c7c86 to 40ce2b2 Compare June 28, 2025 21:14
@robertkirkman
Copy link
Contributor

robertkirkman commented Jun 29, 2025

Hi @kleo thank you, I was wondering, could you explain a little what the difference is between this version and this other, more basic version? :

TERMUX_PKG_HOMEPAGE=https://github.com/aandrew-me/tgpt
TERMUX_PKG_DESCRIPTION="AI Chatbots in terminal without needing API keys"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.10.0"
TERMUX_PKG_SRCURL=https://github.com/aandrew-me/tgpt/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=0e312176908d581eeb7f0df8fcd0524a4aa4702029d50f553f0f75d6c15bc0d9
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true

termux_step_pre_configure() {
	termux_setup_golang
}

termux_step_make() {
	go build
}

termux_step_make_install() {
	install -Dm700 tgpt "$TERMUX_PREFIX"/bin/tgpt
}

I was wondering because, in this case, I think the extra-specific build arguments might not be necessary. For example, compare the Arch Linux package you copied with this AUR tgpt-git package, which doesn't really have any of them.

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tgpt-git

@robertkirkman
Copy link
Contributor

Also I can confirm it's working. It's a little bit scary to let it do something on my phone but this is probably enough.

~/termux-packages/output $ tgpt  hello
          
Hello! How can I assist you with your programming task today?

@kleo
Copy link
Contributor Author

kleo commented Jun 29, 2025

I don't know about the flags and options used from the PKGBUILD @twaik from the Arch Linux package.

Earlier I was looking into tgpt's https://github.com/aandrew-me/tgpt/blob/main/build.sh build options if I could use it here.

But I'll be going for the tgpt-git AUR suggestion instead.

Thanks @robertkirkman!

~ $ dpkg -i tgpt_2.10.0_aarch64.deb 
Selecting previously unselected package tgpt.
(Reading database ... 147807 files and directories currently installed.)
Preparing to unpack tgpt_2.10.0_aarch64.deb ...
Unpacking tgpt (2.10.0) ...
Setting up tgpt (2.10.0) ...
~ $ tgpt -i
Interactive mode started. Press Ctrl + C or type exit to quit.

╭─ You
╰─> test

╭─ Bot
Hello! I'm here to help you with any programming tasks or questions you might have. Is there something specific you'd like assistance with?

╭─ You
╰─> what llm model are you

╭─ Bot
I am an AI assistant created by Phind, designed to help programmers with coding tasks and technical inquiries. However, I don't have specific information about my underlying LLM (Large Language Model)
 architecture. My capabilities are focused on assisting with coding, debugging, and providing technical support within the context of a VSCode extension environment. If you need more details about my exact model,
 I recommend checking the official Phind documentation or contacting their support team directly.

@robertkirkman
Copy link
Contributor

robertkirkman commented Jun 30, 2025

The next thing to do is, the 5 commits should be squashed (combined into 1 single commit named "addpkg(main/tgpt): 2.10.0"). after that I think it will be ready.

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build script seems fine.
As mentioned please squash the commits and use a commit message that follows the commit message format as described in CONTRIBUTING.md
e.g addpkg(main/tgpt): 2.1.0

I will leave instructions for squashing your commits below.


(This is a pre-written, saved reply.)
Please make sure to keep your commits squashed by the way.
For adding to a single commit you can use git commit --amend.
Since you already have multiple commits on your branch though,
you'll need to squash those with git rebase -i HEAD~<n> first.
(Where <n> is the number of commits you want to modify.
Please make sure to only modify your commits.)

https://www.baeldung.com/ops/git-squash-commits#1-squash-the-last-x-commits

Since squashing or amending commits changes the git history you will need to force push any such changes.
e.g. git push --force,
or preferably git push --force-with-lease --force-if-includes
to make sure you aren't clobbering any refs you haven't fetched locally yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants