krims-code-cli 1.5.5__tar.gz → 1.5.7__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.
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/PKG-INFO +5 -3
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/krims_code_cli.egg-info/PKG-INFO +5 -3
- krims_code_cli-1.5.7/krims_code_cli.egg-info/SOURCES.txt +11 -0
- krims_code_cli-1.5.7/krims_code_cli.egg-info/requires.txt +1 -0
- krims_code_cli-1.5.7/krims_pip/cli.py +215 -0
- krims_code_cli-1.5.7/setup.py +28 -0
- krims_code_cli-1.5.5/krims_code_cli.egg-info/SOURCES.txt +0 -45
- krims_code_cli-1.5.5/krims_pip/cli.py +0 -50
- krims_code_cli-1.5.5/krims_pip/node_project/bin/krims-code.js +0 -10
- krims_code_cli-1.5.5/krims_pip/node_project/package-lock.json +0 -793
- krims_code_cli-1.5.5/krims_pip/node_project/package.json +0 -46
- krims_code_cli-1.5.5/krims_pip/node_project/src/agent.js +0 -415
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/fallback.js +0 -239
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/google.js +0 -87
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/providers.js +0 -203
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/router.js +0 -146
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/search.js +0 -94
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/telemetry.js +0 -125
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/tokens.js +0 -101
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/universal.js +0 -507
- krims_code_cli-1.5.5/krims_pip/node_project/src/ai/xai.js +0 -50
- krims_code_cli-1.5.5/krims_pip/node_project/src/chat.js +0 -2543
- krims_code_cli-1.5.5/krims_pip/node_project/src/cli.js +0 -632
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/commit.js +0 -157
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/dashboard.js +0 -59
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/github.js +0 -349
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/index.js +0 -67
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/status.js +0 -66
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/teamwork-preview.js +0 -326
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/theme.js +0 -42
- krims_code_cli-1.5.5/krims_pip/node_project/src/commands/themes.js +0 -30
- krims_code_cli-1.5.5/krims_pip/node_project/src/config.js +0 -400
- krims_code_cli-1.5.5/krims_pip/node_project/src/dashboard.js +0 -112
- krims_code_cli-1.5.5/krims_pip/node_project/src/file-parser.js +0 -164
- krims_code_cli-1.5.5/krims_pip/node_project/src/git.js +0 -41
- krims_code_cli-1.5.5/krims_pip/node_project/src/mic.js +0 -220
- krims_code_cli-1.5.5/krims_pip/node_project/src/modes.js +0 -92
- krims_code_cli-1.5.5/krims_pip/node_project/src/telemetry-server.js +0 -855
- krims_code_cli-1.5.5/krims_pip/node_project/src/ui/banner.js +0 -204
- krims_code_cli-1.5.5/krims_pip/node_project/src/ui/dashboard.html +0 -834
- krims_code_cli-1.5.5/krims_pip/node_project/src/ui/spinner.js +0 -43
- krims_code_cli-1.5.5/krims_pip/node_project/src/ui/theme.js +0 -624
- krims_code_cli-1.5.5/krims_pip/node_project/src/updater.js +0 -196
- krims_code_cli-1.5.5/setup.py +0 -62
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/LICENSE +0 -0
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/README.md +0 -0
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/krims_code_cli.egg-info/dependency_links.txt +0 -0
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/krims_code_cli.egg-info/entry_points.txt +0 -0
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/krims_code_cli.egg-info/top_level.txt +0 -0
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/krims_pip/__init__.py +0 -0
- {krims_code_cli-1.5.5 → krims_code_cli-1.5.7}/setup.cfg +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: krims-code-cli
|
|
3
|
-
Version: 1.5.
|
|
4
|
-
Summary: Krims Code AI — Universal AI Gateway CLI (Python
|
|
3
|
+
Version: 1.5.7
|
|
4
|
+
Summary: Krims Code AI — Universal AI Gateway CLI (Native Python Edition)
|
|
5
5
|
Home-page: https://github.com/Krylo-60/krims-code-cli
|
|
6
6
|
Author: Krishiv PB
|
|
7
7
|
Author-email: krylobloxyt@gmail.com
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.7
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: krims-code-sdk>=0.1.0
|
|
14
15
|
Dynamic: author
|
|
15
16
|
Dynamic: author-email
|
|
16
17
|
Dynamic: classifier
|
|
@@ -18,6 +19,7 @@ Dynamic: description
|
|
|
18
19
|
Dynamic: description-content-type
|
|
19
20
|
Dynamic: home-page
|
|
20
21
|
Dynamic: license-file
|
|
22
|
+
Dynamic: requires-dist
|
|
21
23
|
Dynamic: requires-python
|
|
22
24
|
Dynamic: summary
|
|
23
25
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: krims-code-cli
|
|
3
|
-
Version: 1.5.
|
|
4
|
-
Summary: Krims Code AI — Universal AI Gateway CLI (Python
|
|
3
|
+
Version: 1.5.7
|
|
4
|
+
Summary: Krims Code AI — Universal AI Gateway CLI (Native Python Edition)
|
|
5
5
|
Home-page: https://github.com/Krylo-60/krims-code-cli
|
|
6
6
|
Author: Krishiv PB
|
|
7
7
|
Author-email: krylobloxyt@gmail.com
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.7
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: krims-code-sdk>=0.1.0
|
|
14
15
|
Dynamic: author
|
|
15
16
|
Dynamic: author-email
|
|
16
17
|
Dynamic: classifier
|
|
@@ -18,6 +19,7 @@ Dynamic: description
|
|
|
18
19
|
Dynamic: description-content-type
|
|
19
20
|
Dynamic: home-page
|
|
20
21
|
Dynamic: license-file
|
|
22
|
+
Dynamic: requires-dist
|
|
21
23
|
Dynamic: requires-python
|
|
22
24
|
Dynamic: summary
|
|
23
25
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
setup.py
|
|
4
|
+
krims_code_cli.egg-info/PKG-INFO
|
|
5
|
+
krims_code_cli.egg-info/SOURCES.txt
|
|
6
|
+
krims_code_cli.egg-info/dependency_links.txt
|
|
7
|
+
krims_code_cli.egg-info/entry_points.txt
|
|
8
|
+
krims_code_cli.egg-info/requires.txt
|
|
9
|
+
krims_code_cli.egg-info/top_level.txt
|
|
10
|
+
krims_pip/__init__.py
|
|
11
|
+
krims_pip/cli.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
krims-code-sdk>=0.1.0
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
import json
|
|
4
|
+
import getpass
|
|
5
|
+
from krims_code_sdk import KrimsClient, PROVIDERS
|
|
6
|
+
|
|
7
|
+
# ANSI color helper matching chalk
|
|
8
|
+
class Colors:
|
|
9
|
+
RED = "\033[31m"
|
|
10
|
+
CYAN = "\033[36m"
|
|
11
|
+
GREEN = "\033[32m"
|
|
12
|
+
YELLOW = "\033[33m"
|
|
13
|
+
BLUE = "\033[34m"
|
|
14
|
+
MAGENTA = "\033[35m"
|
|
15
|
+
WHITE = "\033[37m"
|
|
16
|
+
RESET = "\033[0m"
|
|
17
|
+
BOLD = "\033[1m"
|
|
18
|
+
DIM = "\033[2m"
|
|
19
|
+
|
|
20
|
+
@staticmethod
|
|
21
|
+
def hex(code):
|
|
22
|
+
h = code.lstrip('#')
|
|
23
|
+
r, g, b = tuple(int(h[i:i+2], 16) for i in (0, 2, 4))
|
|
24
|
+
return f"\033[38;2;{r};{g};{b}m"
|
|
25
|
+
|
|
26
|
+
# Config Path Resolver
|
|
27
|
+
def get_config_path():
|
|
28
|
+
home = os.path.expanduser("~")
|
|
29
|
+
return os.path.join(home, ".aether", "config.json")
|
|
30
|
+
|
|
31
|
+
def load_config():
|
|
32
|
+
config_path = get_config_path()
|
|
33
|
+
if os.path.exists(config_path):
|
|
34
|
+
try:
|
|
35
|
+
with open(config_path, "r", encoding="utf-8") as f:
|
|
36
|
+
return json.load(f)
|
|
37
|
+
except Exception:
|
|
38
|
+
pass
|
|
39
|
+
return {}
|
|
40
|
+
|
|
41
|
+
def save_config(config):
|
|
42
|
+
config_path = get_config_path()
|
|
43
|
+
os.makedirs(os.path.dirname(config_path), exist_ok=True)
|
|
44
|
+
with open(config_path, "w", encoding="utf-8") as f:
|
|
45
|
+
json.dump(config, f, indent=2)
|
|
46
|
+
|
|
47
|
+
def print_banner(config, current_mode="titan"):
|
|
48
|
+
c1 = Colors.hex('#FF3E3E') # Red-Orange
|
|
49
|
+
c2 = Colors.hex('#FF8500') # Orange
|
|
50
|
+
c3 = Colors.hex('#FFD000') # Yellow
|
|
51
|
+
c4 = Colors.hex('#00F2FF') # Cyan
|
|
52
|
+
c5 = Colors.hex('#0085FF') # Blue
|
|
53
|
+
c6 = Colors.hex('#7000FF') # Violet
|
|
54
|
+
c7 = Colors.hex('#B000FF') # Purple
|
|
55
|
+
dim = Colors.DIM
|
|
56
|
+
reset = Colors.RESET
|
|
57
|
+
|
|
58
|
+
username = getpass.getuser() or "Explorer"
|
|
59
|
+
cwd = os.getcwd()
|
|
60
|
+
home = os.path.expanduser("~")
|
|
61
|
+
display_cwd = cwd
|
|
62
|
+
if cwd.startswith(home):
|
|
63
|
+
display_cwd = "~" + cwd[len(home):]
|
|
64
|
+
|
|
65
|
+
# Resolve active providers
|
|
66
|
+
active_providers = []
|
|
67
|
+
for k, p in PROVIDERS.items():
|
|
68
|
+
env_key = p.get('envKey')
|
|
69
|
+
if env_key and os.environ.get(env_key):
|
|
70
|
+
active_providers.append(k)
|
|
71
|
+
elif env_key and config.get(env_key):
|
|
72
|
+
active_providers.append(k)
|
|
73
|
+
|
|
74
|
+
if active_providers:
|
|
75
|
+
active_names = ", ".join(set(active_providers))
|
|
76
|
+
mesh_status = f"{Colors.GREEN}● Online ({len(active_providers)} active node(s)){reset}"
|
|
77
|
+
else:
|
|
78
|
+
active_names = "Local math & offline logic only"
|
|
79
|
+
mesh_status = f"{Colors.YELLOW}○ Offline (Local fallbacks active){reset}"
|
|
80
|
+
|
|
81
|
+
# Truncate values to fit screen
|
|
82
|
+
max_val_width = 46
|
|
83
|
+
if len(display_cwd) > max_val_width:
|
|
84
|
+
display_cwd = "..." + display_cwd[-(max_val_width - 3):]
|
|
85
|
+
if len(active_names) > max_val_width:
|
|
86
|
+
active_names = active_names[:max_val_width - 3] + "..."
|
|
87
|
+
|
|
88
|
+
logo = [
|
|
89
|
+
c1(" █▄ ▄█"),
|
|
90
|
+
c2(" ██ ██ "),
|
|
91
|
+
c3(" ██ ▄█ "),
|
|
92
|
+
c4(" ███▀ "),
|
|
93
|
+
c5(" ██ ▀█ "),
|
|
94
|
+
c6(" ██ ██ "),
|
|
95
|
+
c7(" █▀ ▀█")
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
info = [
|
|
99
|
+
f" ⚡ {c4}KRIMS CODE COMMAND STATION v1.5.7{reset} • Welcome back, {c4}{username}{reset}",
|
|
100
|
+
dim(" " + "─" * 58),
|
|
101
|
+
f" {dim}Workspace{reset} : {display_cwd}",
|
|
102
|
+
f" {dim}Mode{reset} : {c4}{current_mode.upper()}{reset} {dim}— Ultimate reasoning fusion of Codex & Claude Code.{reset}",
|
|
103
|
+
f" {dim}Network{reset} : {mesh_status}",
|
|
104
|
+
f" {dim}Engine{reset} : {active_names}",
|
|
105
|
+
f" {dim}Packager{reset} : pip (krims-code-cli)"
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
print("")
|
|
109
|
+
for i in range(7):
|
|
110
|
+
print(logo[i] + info[i] + reset)
|
|
111
|
+
print("")
|
|
112
|
+
|
|
113
|
+
def run_chat(config, model=None, provider=None):
|
|
114
|
+
# Resolve default provider
|
|
115
|
+
prov_key = provider or config.get("DEFAULT_PROVIDER") or "google"
|
|
116
|
+
model_name = model or config.get("DEFAULT_MODEL") or ""
|
|
117
|
+
|
|
118
|
+
# Resolve key
|
|
119
|
+
prov_config = PROVIDERS.get(prov_key.lower(), {})
|
|
120
|
+
env_key = prov_config.get("envKey", "")
|
|
121
|
+
api_key = config.get(env_key) or os.environ.get(env_key) or ""
|
|
122
|
+
|
|
123
|
+
client = KrimsClient(provider=prov_key, model=model_name, api_key=api_key)
|
|
124
|
+
session = client.create_session()
|
|
125
|
+
|
|
126
|
+
print_banner(config)
|
|
127
|
+
print(f"{Colors.DIM}Type 'exit' or 'quit' to terminate session. Ctrl+C to abort.{Colors.RESET}\n")
|
|
128
|
+
|
|
129
|
+
while True:
|
|
130
|
+
try:
|
|
131
|
+
prompt = input(f"{Colors.hex('#00F2FF')}you > {Colors.RESET}")
|
|
132
|
+
if not prompt.strip():
|
|
133
|
+
continue
|
|
134
|
+
if prompt.strip().lower() in ['exit', 'quit']:
|
|
135
|
+
break
|
|
136
|
+
|
|
137
|
+
print(f"{Colors.DIM}krims is composing response...{Colors.RESET}")
|
|
138
|
+
res = session.ask(prompt)
|
|
139
|
+
print(f"\n{Colors.hex('#7000FF')}krims > {Colors.RESET}{res['text']}\n")
|
|
140
|
+
except KeyboardInterrupt:
|
|
141
|
+
print("\nSession terminated.")
|
|
142
|
+
break
|
|
143
|
+
except Exception as e:
|
|
144
|
+
print(f"\n{Colors.RED}Error: {e}{Colors.RESET}\n")
|
|
145
|
+
|
|
146
|
+
def run_ask(prompt, config):
|
|
147
|
+
prov_key = config.get("DEFAULT_PROVIDER") or "google"
|
|
148
|
+
model_name = config.get("DEFAULT_MODEL") or ""
|
|
149
|
+
prov_config = PROVIDERS.get(prov_key.lower(), {})
|
|
150
|
+
env_key = prov_config.get("envKey", "")
|
|
151
|
+
api_key = config.get(env_key) or os.environ.get(env_key) or ""
|
|
152
|
+
|
|
153
|
+
client = KrimsClient(provider=prov_key, model=model_name, api_key=api_key)
|
|
154
|
+
try:
|
|
155
|
+
res = client.ask(prompt)
|
|
156
|
+
print(res['text'])
|
|
157
|
+
except Exception as e:
|
|
158
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
159
|
+
sys.exit(1)
|
|
160
|
+
|
|
161
|
+
def handle_config(args, config):
|
|
162
|
+
if len(args) == 0:
|
|
163
|
+
print("Usage: krims-pip config <get/set/list/delete> [key] [value]")
|
|
164
|
+
return
|
|
165
|
+
|
|
166
|
+
action = args[0].lower()
|
|
167
|
+
if action == "list":
|
|
168
|
+
for k, v in config.items():
|
|
169
|
+
print(f"{k}={v}")
|
|
170
|
+
elif action == "get" and len(args) >= 2:
|
|
171
|
+
print(config.get(args[1], ""))
|
|
172
|
+
elif action == "set" and len(args) >= 3:
|
|
173
|
+
config[args[1]] = args[2]
|
|
174
|
+
save_config(config)
|
|
175
|
+
print(f"Set {args[1]}={args[2]}")
|
|
176
|
+
elif action == "delete" and len(args) >= 2:
|
|
177
|
+
if args[1] in config:
|
|
178
|
+
del config[args[1]]
|
|
179
|
+
save_config(config)
|
|
180
|
+
print(f"Deleted {args[1]}")
|
|
181
|
+
else:
|
|
182
|
+
print(f"Key {args[1]} not found")
|
|
183
|
+
else:
|
|
184
|
+
print("Invalid config arguments.")
|
|
185
|
+
|
|
186
|
+
def main():
|
|
187
|
+
config = load_config()
|
|
188
|
+
args = sys.argv[1:]
|
|
189
|
+
|
|
190
|
+
if not args:
|
|
191
|
+
run_chat(config)
|
|
192
|
+
return
|
|
193
|
+
|
|
194
|
+
cmd = args[0].lower()
|
|
195
|
+
if cmd == "chat":
|
|
196
|
+
run_chat(config)
|
|
197
|
+
elif cmd == "ask" and len(args) >= 2:
|
|
198
|
+
run_ask(args[1], config)
|
|
199
|
+
elif cmd == "config":
|
|
200
|
+
handle_config(args[1:], config)
|
|
201
|
+
elif cmd in ["version", "-v", "--version"]:
|
|
202
|
+
print("Krims Code CLI v1.5.7 (Native Python Edition)")
|
|
203
|
+
elif cmd in ["help", "-h", "--help"]:
|
|
204
|
+
print("Krims Code CLI — Native Python Edition")
|
|
205
|
+
print("\nCommands:")
|
|
206
|
+
print(" chat Start stateful chat loop (default)")
|
|
207
|
+
print(" ask <prompt> Get single answer for prompt")
|
|
208
|
+
print(" config <get/set/list> Get or set keys")
|
|
209
|
+
print(" version Display version info")
|
|
210
|
+
else:
|
|
211
|
+
# Fallback to ask if they just write a prompt directly
|
|
212
|
+
run_ask(" ".join(args), config)
|
|
213
|
+
|
|
214
|
+
if __name__ == "__main__":
|
|
215
|
+
main()
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
setup(
|
|
5
|
+
name="krims-code-cli",
|
|
6
|
+
version="1.5.7",
|
|
7
|
+
author="Krishiv PB",
|
|
8
|
+
author_email="krylobloxyt@gmail.com",
|
|
9
|
+
description="Krims Code AI — Universal AI Gateway CLI (Native Python Edition)",
|
|
10
|
+
long_description=open("README.md", "r", encoding="utf-8").read() if os.path.exists("README.md") else "",
|
|
11
|
+
long_description_content_type="text/markdown",
|
|
12
|
+
url="https://github.com/Krylo-60/krims-code-cli",
|
|
13
|
+
packages=find_packages(),
|
|
14
|
+
install_requires=[
|
|
15
|
+
"krims-code-sdk>=0.1.0"
|
|
16
|
+
],
|
|
17
|
+
entry_points={
|
|
18
|
+
"console_scripts": [
|
|
19
|
+
"krims-pip=krims_pip.cli:main",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
classifiers=[
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"License :: OSI Approved :: MIT License",
|
|
25
|
+
"Operating System :: OS Independent",
|
|
26
|
+
],
|
|
27
|
+
python_requires=">=3.7",
|
|
28
|
+
)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
README.md
|
|
3
|
-
setup.py
|
|
4
|
-
krims_code_cli.egg-info/PKG-INFO
|
|
5
|
-
krims_code_cli.egg-info/SOURCES.txt
|
|
6
|
-
krims_code_cli.egg-info/dependency_links.txt
|
|
7
|
-
krims_code_cli.egg-info/entry_points.txt
|
|
8
|
-
krims_code_cli.egg-info/top_level.txt
|
|
9
|
-
krims_pip/__init__.py
|
|
10
|
-
krims_pip/cli.py
|
|
11
|
-
krims_pip/node_project/package-lock.json
|
|
12
|
-
krims_pip/node_project/package.json
|
|
13
|
-
krims_pip/node_project/bin/krims-code.js
|
|
14
|
-
krims_pip/node_project/src/agent.js
|
|
15
|
-
krims_pip/node_project/src/chat.js
|
|
16
|
-
krims_pip/node_project/src/cli.js
|
|
17
|
-
krims_pip/node_project/src/config.js
|
|
18
|
-
krims_pip/node_project/src/dashboard.js
|
|
19
|
-
krims_pip/node_project/src/file-parser.js
|
|
20
|
-
krims_pip/node_project/src/git.js
|
|
21
|
-
krims_pip/node_project/src/mic.js
|
|
22
|
-
krims_pip/node_project/src/modes.js
|
|
23
|
-
krims_pip/node_project/src/telemetry-server.js
|
|
24
|
-
krims_pip/node_project/src/updater.js
|
|
25
|
-
krims_pip/node_project/src/ai/fallback.js
|
|
26
|
-
krims_pip/node_project/src/ai/google.js
|
|
27
|
-
krims_pip/node_project/src/ai/providers.js
|
|
28
|
-
krims_pip/node_project/src/ai/router.js
|
|
29
|
-
krims_pip/node_project/src/ai/search.js
|
|
30
|
-
krims_pip/node_project/src/ai/telemetry.js
|
|
31
|
-
krims_pip/node_project/src/ai/tokens.js
|
|
32
|
-
krims_pip/node_project/src/ai/universal.js
|
|
33
|
-
krims_pip/node_project/src/ai/xai.js
|
|
34
|
-
krims_pip/node_project/src/commands/commit.js
|
|
35
|
-
krims_pip/node_project/src/commands/dashboard.js
|
|
36
|
-
krims_pip/node_project/src/commands/github.js
|
|
37
|
-
krims_pip/node_project/src/commands/index.js
|
|
38
|
-
krims_pip/node_project/src/commands/status.js
|
|
39
|
-
krims_pip/node_project/src/commands/teamwork-preview.js
|
|
40
|
-
krims_pip/node_project/src/commands/theme.js
|
|
41
|
-
krims_pip/node_project/src/commands/themes.js
|
|
42
|
-
krims_pip/node_project/src/ui/banner.js
|
|
43
|
-
krims_pip/node_project/src/ui/dashboard.html
|
|
44
|
-
krims_pip/node_project/src/ui/spinner.js
|
|
45
|
-
krims_pip/node_project/src/ui/theme.js
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
import os
|
|
3
|
-
import subprocess
|
|
4
|
-
import shutil
|
|
5
|
-
|
|
6
|
-
def main():
|
|
7
|
-
# Find the Node.js entry point absolute path inside KRIMS CODE_pip/node_project
|
|
8
|
-
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
9
|
-
node_project_dir = os.path.join(script_dir, "node_project")
|
|
10
|
-
krims_code_js = os.path.join(node_project_dir, "bin", "krims-code.js")
|
|
11
|
-
|
|
12
|
-
# If not found globally, check dev layout relative to current working directory
|
|
13
|
-
if not os.path.exists(krims_code_js):
|
|
14
|
-
krims_code_js = os.path.join(os.getcwd(), "bin", "krims-code.js")
|
|
15
|
-
node_project_dir = os.getcwd()
|
|
16
|
-
|
|
17
|
-
if not shutil.which("node"):
|
|
18
|
-
print("Error: Node.js is required to run Krims Code CLI.", file=sys.stderr)
|
|
19
|
-
print("Please install Node.js (https://nodejs.org) and try again.", file=sys.stderr)
|
|
20
|
-
sys.exit(1)
|
|
21
|
-
|
|
22
|
-
# Check if node_modules exists in the node_project directory.
|
|
23
|
-
# If not, automatically run npm install inside that directory!
|
|
24
|
-
node_modules_dir = os.path.join(node_project_dir, "node_modules")
|
|
25
|
-
if not os.path.exists(node_modules_dir):
|
|
26
|
-
print("First-time launch check: Installing node dependencies via npm...")
|
|
27
|
-
npm_cmd = shutil.which("npm")
|
|
28
|
-
if not npm_cmd:
|
|
29
|
-
print("Error: npm is required to install Node dependencies.", file=sys.stderr)
|
|
30
|
-
print("Please install Node.js/npm and try again.", file=sys.stderr)
|
|
31
|
-
sys.exit(1)
|
|
32
|
-
|
|
33
|
-
# On Windows, run npm using shell=True to handle cmd/bat resolution
|
|
34
|
-
subprocess.run([npm_cmd, "install", "--no-audit", "--no-fund"], cwd=node_project_dir, shell=(os.name == "nt"))
|
|
35
|
-
|
|
36
|
-
try:
|
|
37
|
-
# Run node krims-code.js passing all command line arguments
|
|
38
|
-
os.environ["KRIMS_PACKAGER"] = "pip"
|
|
39
|
-
cmd = ["node", krims_code_js] + sys.argv[1:]
|
|
40
|
-
result = subprocess.run(cmd, check=False)
|
|
41
|
-
sys.exit(result.returncode)
|
|
42
|
-
except KeyboardInterrupt:
|
|
43
|
-
print("\nSession terminated by user.")
|
|
44
|
-
sys.exit(0)
|
|
45
|
-
except Exception as e:
|
|
46
|
-
print(f"Error running Krims Code: {e}", file=sys.stderr)
|
|
47
|
-
sys.exit(1)
|
|
48
|
-
|
|
49
|
-
if __name__ == "__main__":
|
|
50
|
-
main()
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// ═══════════════════════════════════════════════════════════
|
|
4
|
-
// KRIMS CODE AI CLI — Entry Point
|
|
5
|
-
// Universal AI Gateway — 13+ Providers, Free & Paid
|
|
6
|
-
// ═══════════════════════════════════════════════════════════
|
|
7
|
-
|
|
8
|
-
import { createCLI } from "../src/cli.js";
|
|
9
|
-
|
|
10
|
-
createCLI(process.argv);
|