Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2023 13:29:53 GMT
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f746aec404d5 - main - misc/chatgpt-shell-cli: Add new port
Message-ID:  <202304181329.33IDTrLR013878@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nivit:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f746aec404d534d2255b094f74993d526a5ed20d

commit f746aec404d534d2255b094f74993d526a5ed20d
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2023-04-18 13:26:23 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2023-04-18 13:29:11 +0000

    misc/chatgpt-shell-cli: Add new port
    
    A simple, lightweight shell script to use OpenAI's chatGPT and DALL-E from the
    terminal without installing python or node.js. The script uses the official
    ChatGPT model gpt-3.5-turbo with the OpenAI API endpoint /chat/completions.
    You can also use the new gpt-4 model, if you have access.
    
    The script supports the use of all other OpenAI models with the completions
    endpoint and the images/generations endpoint for generating images.
    
    https://github.com/0xacx/chatGPT-shell-cli
---
 misc/Makefile                    |  1 +
 misc/chatgpt-shell-cli/Makefile  | 35 +++++++++++++++++++++++++++++++++++
 misc/chatgpt-shell-cli/distinfo  |  3 +++
 misc/chatgpt-shell-cli/pkg-descr |  7 +++++++
 4 files changed, 46 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 5b46911114b6..a095bd368e54 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -38,6 +38,7 @@
     SUBDIR += bsod
     SUBDIR += buffer
     SUBDIR += caffe
+    SUBDIR += chatgpt-shell-cli
     SUBDIR += cheat
     SUBDIR += chef
     SUBDIR += chmlib
diff --git a/misc/chatgpt-shell-cli/Makefile b/misc/chatgpt-shell-cli/Makefile
new file mode 100644
index 000000000000..618ba85c1fd7
--- /dev/null
+++ b/misc/chatgpt-shell-cli/Makefile
@@ -0,0 +1,35 @@
+PORTNAME=	chatgpt-shell-cli
+DISTVERSION=	g20230411
+CATEGORIES=	misc
+
+MAINTAINER=	nivit@FreeBSD.org
+COMMENT=	Shell script to use OpenAI's ChatGPT and DALL-E from the terminal
+WWW=		https://github.com/0xacx/chatGPT-shell-cli
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	bash:shells/bash \
+		curl:ftp/curl \
+		jq:textproc/jq \
+		xdg-open:devel/xdg-utils
+
+USES=		magick:run
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	0xacx
+GH_PROJECT=	chatGPT-shell-cli
+GH_TAGNAME=	42d82b9
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+PLIST_FILES=	chatgpt
+
+post-patch:
+		  ${REINPLACE_CMD} 's/open \("$${image_url}"\)/xdg-open \1/g' ${WRKSRC}/chatgpt.sh
+
+do-install:
+		${INSTALL_SCRIPT} ${WRKSRC}/chatgpt.sh ${PREFIX}/bin/chatgpt
+
+.include <bsd.port.mk>
diff --git a/misc/chatgpt-shell-cli/distinfo b/misc/chatgpt-shell-cli/distinfo
new file mode 100644
index 000000000000..8148a66cc088
--- /dev/null
+++ b/misc/chatgpt-shell-cli/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1681823063
+SHA256 (0xacx-chatGPT-shell-cli-g20230411-42d82b9_GH0.tar.gz) = b4c2b7d9b5226598be4f2f6d6cc44cc4d340d58d1d9f8e791cd5e90e88679f97
+SIZE (0xacx-chatGPT-shell-cli-g20230411-42d82b9_GH0.tar.gz) = 9312
diff --git a/misc/chatgpt-shell-cli/pkg-descr b/misc/chatgpt-shell-cli/pkg-descr
new file mode 100644
index 000000000000..6c43f0a0e034
--- /dev/null
+++ b/misc/chatgpt-shell-cli/pkg-descr
@@ -0,0 +1,7 @@
+A simple, lightweight shell script to use OpenAI's chatGPT and DALL-E from the
+terminal without installing python or node.js. The script uses the official
+ChatGPT model gpt-3.5-turbo with the OpenAI API endpoint /chat/completions.
+You can also use the new gpt-4 model, if you have access.
+
+The script supports the use of all other OpenAI models with the completions
+endpoint and the images/generations endpoint for generating images.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304181329.33IDTrLR013878>