Skip to content

Commit 9039fdf

Browse files
committed
improve cli deps
1 parent fb59f33 commit 9039fdf

File tree

2 files changed

+43
-9
lines changed

2 files changed

+43
-9
lines changed

agixt/cli.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import time
2424
import threading
2525
import urllib.error
26+
import urllib.parse
2627
import urllib.request
2728
import uuid
2829
from pathlib import Path
@@ -2801,10 +2802,15 @@ def _start_all(local: bool = False, env_updates: Optional[dict] = None) -> None:
28012802
print("\n" + "=" * 80)
28022803
print("All services started successfully!")
28032804
print("=" * 80)
2805+
local_ip = get_local_ip()
2806+
agixt_port = os.getenv("AGIXT_PORT", "7437")
2807+
app_port = os.getenv("AGIXT_INTERACTIVE_PORT", "3437")
2808+
api_url = os.getenv("AGIXT_URI", f"http://{local_ip}:{agixt_port}")
2809+
app_url = os.getenv("APP_URI", f"http://{local_ip}:{app_port}")
28042810
print("\nService URLs:")
2805-
print(f" AGiXT API: http://localhost:7437")
2806-
print(f" Web Interface: http://localhost:3437")
2807-
print(f" ezLocalai API: http://localhost:8091")
2811+
print(f" AGiXT API: {api_url}")
2812+
print(f" Web Interface: {app_url}")
2813+
print(f" ezLocalai API: http://{local_ip}:8091")
28082814
print("=" * 80)
28092815

28102816

@@ -3039,8 +3045,15 @@ def _start_local(env_updates: Optional[dict] = None) -> None:
30393045
except requests.RequestException:
30403046
response = requests.Response()
30413047
response.status_code = 500
3048+
local_ip = get_local_ip()
3049+
agixt_port = os.getenv("AGIXT_PORT", "7437")
3050+
app_port = os.getenv("AGIXT_INTERACTIVE_PORT", "3437")
3051+
api_url = os.getenv("AGIXT_URI", f"http://{local_ip}:{agixt_port}")
3052+
app_url = os.getenv("APP_URI", f"http://{local_ip}:{app_port}")
30423053
print(f"AGiXT started successfully!")
3043-
print(f"View logs at: {LOCAL_LOG_FILE}")
3054+
print(f" API: {api_url}")
3055+
print(f" App: {app_url}")
3056+
print(f" Logs: {LOCAL_LOG_FILE}")
30443057
cleanup_log_files()
30453058

30463059

@@ -3175,7 +3188,14 @@ def _start_docker(env_updates: Optional[dict] = None) -> None:
31753188
try:
31763189
command = f"docker compose -f {dockerfile} up -d"
31773190
subprocess.run(command, shell=True, cwd=REPO_ROOT, check=True)
3191+
local_ip = get_local_ip()
3192+
agixt_port = env_vars.get("AGIXT_PORT", "7437")
3193+
app_port = env_vars.get("AGIXT_INTERACTIVE_PORT", "3437")
3194+
api_url = env_vars.get("AGIXT_URI", f"http://{local_ip}:{agixt_port}")
3195+
app_url = env_vars.get("APP_URI", f"http://{local_ip}:{app_port}")
31783196
print("AGiXT Docker services started successfully.")
3197+
print(f" API: {api_url}")
3198+
print(f" App: {app_url}")
31793199
except KeyboardInterrupt:
31803200
print("\nStopping AGiXT containers...")
31813201
subprocess.run(

setup.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@
99
with open(readme_path, encoding="utf-8") as f:
1010
long_description = f.read()
1111

12-
# Get requirements from requirements.txt to a list
12+
# Full requirements from requirements.txt (only needed for local server mode)
1313
with open(os.path.join(this_directory, "requirements.txt"), encoding="utf-8") as f:
1414
install_requires = f.read().splitlines()
15-
requirements = []
15+
full_requirements = []
1616
for reqs in install_requires:
1717
if "--" not in reqs and ":" not in reqs and "#" not in reqs:
18-
requirements.append(reqs)
18+
full_requirements.append(reqs)
19+
20+
# CLI-only requirements (lightweight - just what the CLI needs)
21+
cli_requirements = [
22+
"python-dotenv>=1.0.0",
23+
"requests>=2.28.0",
24+
"agixtsdk>=0.0.82",
25+
"websocket-client>=1.6.0",
26+
"pyotp",
27+
"docker>=7.0.0",
28+
]
29+
1930
# Get version from version file in agixt/version
2031
with open(os.path.join(this_directory, "agixt/version"), encoding="utf-8") as f:
2132
version = f.read().strip()
@@ -25,12 +36,15 @@
2536
version=version,
2637
description="An Artificial Intelligence Automation Platform. AI Instruction management from various providers, has an adaptive memory, and a versatile plugin system with many commands including web browsing. Supports many AI providers and models and growing support every day.",
2738
long_description=long_description,
28-
long_description_content_type="text/markdown", # This should match the format of your README
39+
long_description_content_type="text/markdown",
2940
author="Josh XT",
3041
author_email="josh@devxt.com",
3142
packages=find_packages(),
3243
python_requires=">=3.10",
33-
install_requires=requirements,
44+
install_requires=cli_requirements,
45+
extras_require={
46+
"local": full_requirements,
47+
},
3448
entry_points={
3549
"console_scripts": ["agixt=agixt.cli:main"],
3650
},

0 commit comments

Comments
 (0)