aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Vitale <nivit@FreeBSD.org>2023-04-18 13:26:23 +0000
committerNicola Vitale <nivit@FreeBSD.org>2023-04-18 13:29:11 +0000
commitf746aec404d534d2255b094f74993d526a5ed20d (patch)
tree7d65d68ed091bb931c05dd7a29cbc49ce5a629c8
parent5bae4e5038d18b66a74dda03fa0dffad964d4e89 (diff)
downloadports-f746aec404d534d2255b094f74993d526a5ed20d.tar.gz
ports-f746aec404d534d2255b094f74993d526a5ed20d.zip
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
-rw-r--r--misc/Makefile1
-rw-r--r--misc/chatgpt-shell-cli/Makefile35
-rw-r--r--misc/chatgpt-shell-cli/distinfo3
-rw-r--r--misc/chatgpt-shell-cli/pkg-descr7
4 files changed, 46 insertions, 0 deletions
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.