Package Details: chatgpt-cli-git 0.1.3+8.r41.20230204.1746661-3

Git Clone URL: (read-only, click to copy)
Package Base: chatgpt-cli-git
Description: A very minimal cli prompt for ChatGPT.
Upstream URL:
Keywords: chatgpt cli openai python
Licenses: MIT
Conflicts: chatgpt-cli, gpt-chatbot-cli
Provides: chatgpt-cli, gpt-chatbot-cli, gpt-chatbot-cli-git
Submitter: rukh-debug
Maintainer: rukh-debug
Last Packager: rukh-debug
Votes: 0
Popularity: 0.000000
First Submitted: 2023-01-13 20:53 (UTC)
Last Updated: 2024-05-04 11:26 (UTC)

Pinned Comments

rukh-debug commented on 2023-02-02 01:45 (UTC)

This package can now be installed with

$pip3 install gpt-chatbot-cli

Latest Comments

bl4n commented on 2024-05-03 19:58 (UTC)

Seems that python-tinydb and python-poetry are required dependencies.

jackstew9 commented on 2024-02-16 02:34 (UTC)

I found I could not install without first installing the python-setup tools dependency. Maybe that should be included?

tage commented on 2023-10-19 08:06 (UTC)

Please add python-tinydb as dependency.

dreieck commented on 2023-04-01 16:42 (UTC)

Somehow upstream changed the git tag versioning -- now

  • git describe --tags returns push-4-g9b38674,
  • git describe returns v0.2.1-8-g9b38674.

So I suggest to move from git describe --tags to git describe in pkgver() and closely monitor if upstream changes the version determination mechanism again.

Otherwise, $epoch needs an increment, because push < 0.1.3.


sekret commented on 2023-02-22 21:36 (UTC)

@dreieck, I had to uncomment python-setuptools. Without it the build fails.

@slithery0, if you take over dreieck's PKGBUILD, please make this change.

dreieck commented on 2023-02-14 23:19 (UTC)

Your PKGBUILD hat a lot of issues I do not want to list one by one.

So I have completely rewritten it.

↗ Here is the working PKGBUILD:

# Maintainer: dreieck (
# Contributor: slithery0 (

pkgdesc="A very minimal cli prompt for ChatGPT."
  # 'python-setuptools'

pkgver() {
  cd "${srcdir}/${_pkgname}"

  _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|\-g[0-9a-f]*$||' | tr '-' '+')"
  _rev="$(git rev-list --count HEAD)"
  _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
  _hash="$(git rev-parse --short HEAD)"

  if [ -z "${_ver}" ]; then
    error "Could not determine version."
    return 1
    printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"

prepare() {
  cd "${srcdir}/${_pkgname}"

  git log > "${srcdir}/git.log"

build() {
  cd "${srcdir}/${_pkgname}"

  python -m build --wheel --no-isolation

package() {
  cd "${srcdir}/${_pkgname}"

  python -m installer --destdir="${pkgdir}" dist/*.whl

  ln -svr "${pkgdir}/usr/bin/gpt-chatbot-cli"       "${pkgdir}/usr/bin/chatgpt-cli"

  install -D -v -m644 LICENCE                       "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  for _docfile in; do
    install -D -v -m644 "${_docfile}"               "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
  install -d -v -m755                               "${pkgdir}/usr/share/doc/${_pkgname}/wiki"
  install -D -v -m644 "${srcdir}/git.log"           "${pkgdir}/usr/share/doc/${_pkgname}/git.log"
  ln -svf "/usr/share/licenses/${pkgname}/LICENSE"  "${pkgdir}/usr/share/doc/${_pkgname}/LICENSE"

Please fix your PKGBUILD, either by jsut using mine or by fixing yours by yourself.

Regards!, and thanks for maintaining.

dreieck commented on 2023-02-14 23:03 (UTC)

Install fails with

==> Starting build()...
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

It seems that this PKGBUILD wants to write outside of ${srcdir}, which is not allowed in build(). (And in package() it may write into ${pkgdir}, but also not directly to the "main" file system.)

Please fix.

Thanks for maintaining!

rukh-debug commented on 2023-02-02 01:45 (UTC)

This package can now be installed with

$pip3 install gpt-chatbot-cli

rukh-debug commented on 2023-01-19 10:21 (UTC)

@NY152 Python should be fetching the env variable "OPENAI_API_KEY".

Make sure you didn't did any typo, and verify if it exist by doing "prntenv" or "env".

Also maybe try adding the variable in "/etc/environment" and restart.

NY152 commented on 2023-01-16 11:58 (UTC)


I put my API key in environment variable but chatgpt-cli keeps asking me for it.

Is there an ideal practice to follow? What is it ?