aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2023-05-04 19:46:32 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2023-05-04 19:46:32 -0500
commitd02f9ded2a503683b57bcacece6a2cff5484fb81 (patch)
tree896521aa42194e5055b04cc7d5c6e93b56719f73
parenta74933b2d83efb5da4e0f1851d65ad575f04a65d (diff)
downloadgpt-chat-cli-d02f9ded2a503683b57bcacece6a2cff5484fb81.tar.xz
gpt-chat-cli-d02f9ded2a503683b57bcacece6a2cff5484fb81.zip
Add packaging info
-rw-r--r--LICENSE19
-rw-r--r--README.md1
-rw-r--r--pyproject.toml23
-rw-r--r--setup.py18
-rw-r--r--src/gpt_chat_cli/__init__.py0
-rw-r--r--src/gpt_chat_cli/argparsing.py (renamed from argparsing.py)0
-rw-r--r--src/gpt_chat_cli/color.py (renamed from color.py)0
-rw-r--r--src/gpt_chat_cli/gcli.py (renamed from gcli.py)8
-rw-r--r--src/gpt_chat_cli/openai_wrappers.py (renamed from openai_wrappers.py)0
9 files changed, 66 insertions, 3 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..09f9789
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2023 Flur01ne
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a7d5d9f
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+gpt-chat-cli
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..462d249
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,23 @@
+[build-system]
+requires = ["setuptools>=61.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "gpt-chat-cli"
+version = "0.0.1"
+authors = [
+ { name="Flu0r1ne", email="flu0r1ne@flu0r1ne.net" },
+]
+description = "A simple ChatGPT terminal CLI"
+readme = "README.md"
+requires-python = ">=3.7"
+classifiers = [
+ "Programming Language :: Python :: 3",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+]
+
+[project.urls]
+"Homepage" = "https://github.com/flu0r1ne/gpt-chat-cli"
+"Bug Tracker" = "https://github.com/flu0r1ne/gpt-chat-cli/issues"
+
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..0576ace
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,18 @@
+import setuptools
+
+setuptools.setup(
+ name='gpt-chat-cli',
+ version='0.0.1',
+ entry_points = {
+ 'console_scripts': ['gpt-chat-cli=gpt_chat_cli.gcli:main'],
+ },
+ author='Flu0r1ne',
+ description='A simple ChatGPT CLI',
+ packages=['gpt_chat_cli'],
+ package_dir={'': 'src'},
+ install_requires=[
+ 'setuptools',
+ 'openai >= 0.27.6',
+ ],
+ python_requires='>=3.7'
+)
diff --git a/src/gpt_chat_cli/__init__.py b/src/gpt_chat_cli/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/gpt_chat_cli/__init__.py
diff --git a/argparsing.py b/src/gpt_chat_cli/argparsing.py
index a7d3218..a7d3218 100644
--- a/argparsing.py
+++ b/src/gpt_chat_cli/argparsing.py
diff --git a/color.py b/src/gpt_chat_cli/color.py
index ce1b182..ce1b182 100644
--- a/color.py
+++ b/src/gpt_chat_cli/color.py
diff --git a/gcli.py b/src/gpt_chat_cli/gcli.py
index 957034b..ded6d6c 100644
--- a/gcli.py
+++ b/src/gpt_chat_cli/gcli.py
@@ -1,3 +1,5 @@
+#!/bin/env python3
+
import argparse
import sys
import openai
@@ -7,19 +9,19 @@ from collections import defaultdict
from dataclasses import dataclass
from typing import Tuple
-from openai_wrappers import (
+from .openai_wrappers import (
create_chat_completion,
OpenAIChatResponse,
OpenAIChatResponseStream,
FinishReason,
)
-from argparsing import (
+from .argparsing import (
parse_args,
AutoDetectedOption,
)
-from color import get_color_codes
+from .color import get_color_codes
###########################
#### SAVE / REPLAY ####
diff --git a/openai_wrappers.py b/src/gpt_chat_cli/openai_wrappers.py
index 784a9ce..784a9ce 100644
--- a/openai_wrappers.py
+++ b/src/gpt_chat_cli/openai_wrappers.py