hey-cli-python 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/PKG-INFO +2 -3
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/llm.py +28 -11
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli_python.egg-info/PKG-INFO +2 -3
- hey_cli_python-1.0.2/hey_cli_python.egg-info/requires.txt +1 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/pyproject.toml +2 -3
- hey_cli_python-1.0.1/hey_cli_python.egg-info/requires.txt +0 -2
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/LICENSE +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/README.md +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/__init__.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/cli.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/governance.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/history.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/models.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/runner.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli/skills.py +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli_python.egg-info/SOURCES.txt +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli_python.egg-info/dependency_links.txt +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli_python.egg-info/entry_points.txt +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/hey_cli_python.egg-info/top_level.txt +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/setup.cfg +0 -0
- {hey_cli_python-1.0.1 → hey_cli_python-1.0.2}/tests/test_cli.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hey-cli-python
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands.
|
|
5
|
-
Author: Mohit
|
|
5
|
+
Author: Mohit Singh Sinsniwal
|
|
6
6
|
Project-URL: Homepage, https://github.com/sinsniwal/hey-cli
|
|
7
7
|
Project-URL: Repository, https://github.com/sinsniwal/hey-cli
|
|
8
8
|
Project-URL: Issues, https://github.com/sinsniwal/hey-cli/issues
|
|
@@ -21,7 +21,6 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
21
21
|
Requires-Python: >=3.9
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: ollama>=0.1.0
|
|
25
24
|
Requires-Dist: rich>=13.0.0
|
|
26
25
|
Dynamic: license-file
|
|
27
26
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
3
|
import platform
|
|
4
|
-
import
|
|
4
|
+
import urllib.request
|
|
5
|
+
import urllib.error
|
|
5
6
|
from .models import CommandResponse, TroubleshootResponse
|
|
6
7
|
|
|
7
8
|
DEFAULT_MODEL = "gpt-oss:20b-cloud"
|
|
@@ -58,12 +59,20 @@ def generate_command(prompt: str, context: str = "", model_name: str = DEFAULT_M
|
|
|
58
59
|
|
|
59
60
|
for attempt in range(max_retries):
|
|
60
61
|
try:
|
|
61
|
-
|
|
62
|
-
model
|
|
63
|
-
messages
|
|
64
|
-
format
|
|
65
|
-
|
|
62
|
+
payload = {
|
|
63
|
+
"model": model_name,
|
|
64
|
+
"messages": msgs,
|
|
65
|
+
"format": "json",
|
|
66
|
+
"stream": False,
|
|
67
|
+
"options": {"temperature": 0.0}
|
|
68
|
+
}
|
|
69
|
+
req = urllib.request.Request(
|
|
70
|
+
"http://localhost:11434/api/chat",
|
|
71
|
+
data=json.dumps(payload).encode('utf-8'),
|
|
72
|
+
headers={"Content-Type": "application/json"}
|
|
66
73
|
)
|
|
74
|
+
with urllib.request.urlopen(req, timeout=30) as resp:
|
|
75
|
+
response = json.loads(resp.read().decode('utf-8'))
|
|
67
76
|
|
|
68
77
|
raw_val = response["message"]["content"]
|
|
69
78
|
content_str = raw_val
|
|
@@ -113,12 +122,20 @@ def generate_troubleshoot_step(objective: str, history: list, model_name: str =
|
|
|
113
122
|
|
|
114
123
|
for attempt in range(max_retries):
|
|
115
124
|
try:
|
|
116
|
-
|
|
117
|
-
model
|
|
118
|
-
messages
|
|
119
|
-
format
|
|
120
|
-
|
|
125
|
+
payload = {
|
|
126
|
+
"model": model_name,
|
|
127
|
+
"messages": msgs,
|
|
128
|
+
"format": "json",
|
|
129
|
+
"stream": False,
|
|
130
|
+
"options": {"temperature": 0.0}
|
|
131
|
+
}
|
|
132
|
+
req = urllib.request.Request(
|
|
133
|
+
"http://localhost:11434/api/chat",
|
|
134
|
+
data=json.dumps(payload).encode('utf-8'),
|
|
135
|
+
headers={"Content-Type": "application/json"}
|
|
121
136
|
)
|
|
137
|
+
with urllib.request.urlopen(req, timeout=30) as resp:
|
|
138
|
+
response = json.loads(resp.read().decode('utf-8'))
|
|
122
139
|
|
|
123
140
|
raw_val = response["message"]["content"].strip()
|
|
124
141
|
if not raw_val:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hey-cli-python
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands.
|
|
5
|
-
Author: Mohit
|
|
5
|
+
Author: Mohit Singh Sinsniwal
|
|
6
6
|
Project-URL: Homepage, https://github.com/sinsniwal/hey-cli
|
|
7
7
|
Project-URL: Repository, https://github.com/sinsniwal/hey-cli
|
|
8
8
|
Project-URL: Issues, https://github.com/sinsniwal/hey-cli/issues
|
|
@@ -21,7 +21,6 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
21
21
|
Requires-Python: >=3.9
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: ollama>=0.1.0
|
|
25
24
|
Requires-Dist: rich>=13.0.0
|
|
26
25
|
Dynamic: license-file
|
|
27
26
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rich>=13.0.0
|
|
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hey-cli-python"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
authors = [
|
|
12
|
-
{name = "Mohit
|
|
12
|
+
{name = "Mohit Singh Sinsniwal"}
|
|
13
13
|
]
|
|
14
14
|
keywords = ["cli", "llm", "bash", "terminal", "ollama", "sysadmin"]
|
|
15
15
|
classifiers = [
|
|
@@ -26,7 +26,6 @@ classifiers = [
|
|
|
26
26
|
"Programming Language :: Python :: 3.12",
|
|
27
27
|
]
|
|
28
28
|
dependencies = [
|
|
29
|
-
"ollama>=0.1.0",
|
|
30
29
|
"rich>=13.0.0"
|
|
31
30
|
]
|
|
32
31
|
urls.Homepage = "https://github.com/sinsniwal/hey-cli"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|