Spaces:
Runtime error
Runtime error
Justadudeinspace
commited on
Add app demo of BLUX-cA
Browse files- .env.example +0 -4
- .gitattributes +2 -35
- .gitignore +0 -34
- .pre-commit-config.yaml +0 -23
- app.py +221 -0
- installer.sh +0 -361
- ov.py +0 -23
- ov/__init__.py +0 -6
- ov/cli.py +0 -427
- pyproject.toml +0 -141
- quick-install.sh +0 -15
- requirements-dev.txt +0 -18
- requirements.txt +0 -18
- tests/__init__.py +0 -1
.env.example
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
# Outer Void CLI Configuration
|
| 2 |
-
GITHUB_TOKEN=your_github_token_here
|
| 3 |
-
HF_TOKEN=your_huggingface_token_here
|
| 4 |
-
ORG_NAME=Outer-Void
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitattributes
CHANGED
|
@@ -1,42 +1,9 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 40 |
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 41 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
| 42 |
*.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 4 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 5 |
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 6 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.gguf filter=lfs diff=lfs merge=lfs -text
|
.gitignore
DELETED
|
@@ -1,34 +0,0 @@
|
|
| 1 |
-
__pycache__/
|
| 2 |
-
*.py[cod]
|
| 3 |
-
*$py.class
|
| 4 |
-
*.so
|
| 5 |
-
.Python
|
| 6 |
-
build/
|
| 7 |
-
develop-eggs/
|
| 8 |
-
dist/
|
| 9 |
-
downloads/
|
| 10 |
-
eggs/
|
| 11 |
-
.eggs/
|
| 12 |
-
lib/
|
| 13 |
-
lib64/
|
| 14 |
-
parts/
|
| 15 |
-
sdist/
|
| 16 |
-
var/
|
| 17 |
-
wheels/
|
| 18 |
-
*.egg-info/
|
| 19 |
-
.installed.cfg
|
| 20 |
-
*.egg
|
| 21 |
-
.env
|
| 22 |
-
.venv
|
| 23 |
-
.env/
|
| 24 |
-
venv/
|
| 25 |
-
ENV/
|
| 26 |
-
.idea/
|
| 27 |
-
.vscode/
|
| 28 |
-
*.swp
|
| 29 |
-
*.swo
|
| 30 |
-
.coverage
|
| 31 |
-
htmlcov/
|
| 32 |
-
.pytest_cache/
|
| 33 |
-
.mypy_cache/
|
| 34 |
-
*.log
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pre-commit-config.yaml
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
repos:
|
| 2 |
-
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 3 |
-
rev: v4.4.0
|
| 4 |
-
hooks:
|
| 5 |
-
- id: trailing-whitespace
|
| 6 |
-
- id: end-of-file-fixer
|
| 7 |
-
- id: check-yaml
|
| 8 |
-
- id: check-added-large-files
|
| 9 |
-
|
| 10 |
-
- repo: https://github.com/psf/black
|
| 11 |
-
rev: 23.1.0
|
| 12 |
-
hooks:
|
| 13 |
-
- id: black
|
| 14 |
-
|
| 15 |
-
- repo: https://github.com/pycqa/isort
|
| 16 |
-
rev: 5.12.0
|
| 17 |
-
hooks:
|
| 18 |
-
- id: isort
|
| 19 |
-
|
| 20 |
-
- repo: https://github.com/pycqa/flake8
|
| 21 |
-
rev: 6.0.0
|
| 22 |
-
hooks:
|
| 23 |
-
- id: flake8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
ov_ca_demo.py — BLUX-cA Ideology Demo (Gradio)
|
| 4 |
+
|
| 5 |
+
Features
|
| 6 |
+
- Constitution spine: concise rules guiding every reply
|
| 7 |
+
- Discernment compass (toy): picks a tactic based on language signals
|
| 8 |
+
- Explainable routing: shows "why this response" trace
|
| 9 |
+
- Redaction: optional PI/phone/email scrubbing on inputs
|
| 10 |
+
- Append-only audit: JSONL log per session (downloadable)
|
| 11 |
+
- Chat UX: simple, calm, direct, humane voice
|
| 12 |
+
|
| 13 |
+
Run:
|
| 14 |
+
pip install gradio==4.44.0
|
| 15 |
+
python ov_ca_demo.py
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
from __future__ import annotations
|
| 19 |
+
import json, re, time, uuid
|
| 20 |
+
from dataclasses import dataclass, asdict
|
| 21 |
+
from pathlib import Path
|
| 22 |
+
from typing import Dict, List, Tuple
|
| 23 |
+
|
| 24 |
+
import gradio as gr
|
| 25 |
+
|
| 26 |
+
# --- BLUX-cA: Mini Constitution (short form) ---------------------------------
|
| 27 |
+
CONSTITUTION = [
|
| 28 |
+
"Integrity over approval; truth over comfort.",
|
| 29 |
+
"Strategy: enlighten, not humiliate.",
|
| 30 |
+
"Defaults: do-no-harm, de-escalate, safeguard minors.",
|
| 31 |
+
"Transparency: explain routing & decisions.",
|
| 32 |
+
"Autonomy & dignity: offer choices, never coerce.",
|
| 33 |
+
]
|
| 34 |
+
|
| 35 |
+
# --- Simple redaction (toggleable) -------------------------------------------
|
| 36 |
+
EMAIL_RE = re.compile(r"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}")
|
| 37 |
+
PHONE_RE = re.compile(r"\+?\d[\d\-\s]{7,}\d")
|
| 38 |
+
IP_RE = re.compile(r"\b(?:\d{1,3}\.){3}\d{1,3}\b")
|
| 39 |
+
|
| 40 |
+
def redact(text: str) -> Tuple[str, Dict[str, List[str]]]:
|
| 41 |
+
found = {
|
| 42 |
+
"emails": EMAIL_RE.findall(text),
|
| 43 |
+
"phones": PHONE_RE.findall(text),
|
| 44 |
+
"ips": IP_RE.findall(text),
|
| 45 |
+
}
|
| 46 |
+
red = EMAIL_RE.sub("[redacted:email]", text)
|
| 47 |
+
red = PHONE_RE.sub("[redacted:phone]", red)
|
| 48 |
+
red = IP_RE.sub("[redacted:ip]", red)
|
| 49 |
+
return red, found
|
| 50 |
+
|
| 51 |
+
# --- Discernment Compass (toy heuristic) -------------------------------------
|
| 52 |
+
@dataclass
|
| 53 |
+
class CompassResult:
|
| 54 |
+
state: str # "struggler" | "indulger" | "neutral"
|
| 55 |
+
signals: List[str] # matched cues
|
| 56 |
+
tactic: str # "validate+tools" | "boundary+off-ramp" | "inform+coach"
|
| 57 |
+
|
| 58 |
+
NEG_CUES = [
|
| 59 |
+
"it's hopeless", "i give up", "worthless", "i'm broken",
|
| 60 |
+
"nobody cares", "can't change", "no control"
|
| 61 |
+
]
|
| 62 |
+
BLAME_CUES = [
|
| 63 |
+
"their fault", "they made me", "always them", "not on me"
|
| 64 |
+
]
|
| 65 |
+
|
| 66 |
+
def discern(message: str) -> CompassResult:
|
| 67 |
+
m = message.lower()
|
| 68 |
+
signals = []
|
| 69 |
+
if any(k in m for k in NEG_CUES):
|
| 70 |
+
signals.append("hopelessness")
|
| 71 |
+
if any(k in m for k in BLAME_CUES):
|
| 72 |
+
signals.append("deflection/blame")
|
| 73 |
+
if "help" in m or "advice" in m:
|
| 74 |
+
signals.append("help-seeking")
|
| 75 |
+
|
| 76 |
+
if "hopelessness" in signals and "deflection/blame" not in signals:
|
| 77 |
+
return CompassResult("struggler", signals, "validate+tools")
|
| 78 |
+
if "deflection/blame" in signals and "help-seeking" not in signals:
|
| 79 |
+
return CompassResult("indulger", signals, "boundary+off-ramp")
|
| 80 |
+
return CompassResult("neutral", signals, "inform+coach")
|
| 81 |
+
|
| 82 |
+
# --- Tactics library (language templates) ------------------------------------
|
| 83 |
+
def respond_with_tactic(user: str, tactic: str, gentle: bool) -> str:
|
| 84 |
+
# concise, direct, humane voice
|
| 85 |
+
if tactic == "validate+tools":
|
| 86 |
+
return (
|
| 87 |
+
"I hear the weight. Let’s pick one doable step you can own today. "
|
| 88 |
+
"Name a small target (5–10 min). I’ll give a plan and a checkpoint. "
|
| 89 |
+
"If safety is urgent, say so and we pivot to safeguards."
|
| 90 |
+
)
|
| 91 |
+
if tactic == "boundary+off-ramp":
|
| 92 |
+
return (
|
| 93 |
+
"I won’t co-sign blame. If you want movement, choose one action you control. "
|
| 94 |
+
"We can map risks, tradeoffs, and a next step — or pause until you’re ready."
|
| 95 |
+
)
|
| 96 |
+
# inform+coach (default)
|
| 97 |
+
return (
|
| 98 |
+
"Tell me the goal, current constraints, and a time window. "
|
| 99 |
+
"I’ll outline options, risks, and a minimal path you can try now."
|
| 100 |
+
)
|
| 101 |
+
|
| 102 |
+
# --- Policy trace & audit -----------------------------------------------------
|
| 103 |
+
@dataclass
|
| 104 |
+
class AuditEvent:
|
| 105 |
+
id: str
|
| 106 |
+
ts: float
|
| 107 |
+
user_input: str
|
| 108 |
+
user_redactions: Dict[str, List[str]]
|
| 109 |
+
compass: Dict
|
| 110 |
+
tactic: str
|
| 111 |
+
constitution: List[str]
|
| 112 |
+
assistant: str
|
| 113 |
+
|
| 114 |
+
def make_audit_event(user_text: str, redactions: Dict[str, List[str]], compass: CompassResult, reply: str) -> AuditEvent:
|
| 115 |
+
return AuditEvent(
|
| 116 |
+
id=str(uuid.uuid4()),
|
| 117 |
+
ts=time.time(),
|
| 118 |
+
user_input=user_text,
|
| 119 |
+
user_redactions=redactions,
|
| 120 |
+
compass=asdict(compass),
|
| 121 |
+
tactic=compass.tactic,
|
| 122 |
+
constitution=CONSTITUTION,
|
| 123 |
+
assistant=reply,
|
| 124 |
+
)
|
| 125 |
+
|
| 126 |
+
# --- Core handler -------------------------------------------------------------
|
| 127 |
+
def ca_chat(history: List[Tuple[str, str]],
|
| 128 |
+
message: str,
|
| 129 |
+
enable_redaction: bool,
|
| 130 |
+
gentle_tone: bool,
|
| 131 |
+
log_path: str) -> Tuple[List[Tuple[str, str]], str, str]:
|
| 132 |
+
raw = message or ""
|
| 133 |
+
if enable_redaction:
|
| 134 |
+
clean, found = redact(raw)
|
| 135 |
+
else:
|
| 136 |
+
clean, found = raw, {"emails": [], "phones": [], "ips": []}
|
| 137 |
+
|
| 138 |
+
compass = discern(clean)
|
| 139 |
+
reply = respond_with_tactic(clean, compass.tactic, gentle_tone)
|
| 140 |
+
|
| 141 |
+
# Add a short “why” trace for transparency
|
| 142 |
+
trace = {
|
| 143 |
+
"compass_state": compass.state,
|
| 144 |
+
"signals": compass.signals,
|
| 145 |
+
"applied_tactic": compass.tactic,
|
| 146 |
+
}
|
| 147 |
+
trace_md = (
|
| 148 |
+
f"**Trace** — state: `{trace['compass_state']}` | "
|
| 149 |
+
f"signals: `{', '.join(trace['signals']) or 'none'}` | "
|
| 150 |
+
f"tactic: `{trace['applied_tactic']}`"
|
| 151 |
+
)
|
| 152 |
+
|
| 153 |
+
# Append-only audit JSONL
|
| 154 |
+
event = make_audit_event(clean, found, compass, reply)
|
| 155 |
+
if log_path:
|
| 156 |
+
p = Path(log_path).expanduser()
|
| 157 |
+
p.parent.mkdir(parents=True, exist_ok=True)
|
| 158 |
+
with p.open("a", encoding="utf-8") as f:
|
| 159 |
+
f.write(json.dumps(asdict(event), ensure_ascii=False) + "\n")
|
| 160 |
+
|
| 161 |
+
history = history + [(raw, reply + "\n\n" + trace_md)]
|
| 162 |
+
return history, json.dumps(asdict(event), indent=2, ensure_ascii=False), str(Path(log_path).expanduser())
|
| 163 |
+
|
| 164 |
+
# --- UI ----------------------------------------------------------------------
|
| 165 |
+
def build_ui():
|
| 166 |
+
with gr.Blocks(title="BLUX-cA Demo", css="footer{visibility:hidden}") as demo:
|
| 167 |
+
gr.Markdown("# BLUX-cA Demo\nSmall, explainable agent aligned to a constitution.")
|
| 168 |
+
|
| 169 |
+
with gr.Row():
|
| 170 |
+
with gr.Column(scale=2):
|
| 171 |
+
chat = gr.Chatbot(height=420, label="Conversation")
|
| 172 |
+
msg = gr.Textbox(placeholder="Share context or ask for help…", autofocus=True)
|
| 173 |
+
with gr.Row():
|
| 174 |
+
redact_toggle = gr.Checkbox(True, label="Redact personal data (email/phone/IP)")
|
| 175 |
+
gentle_tone = gr.Checkbox(True, label="Gentle tone")
|
| 176 |
+
send = gr.Button("Send", variant="primary")
|
| 177 |
+
|
| 178 |
+
with gr.Column(scale=1):
|
| 179 |
+
gr.Markdown("### Constitution")
|
| 180 |
+
rules = gr.HighlightedText(
|
| 181 |
+
value=[(r, "rule") for r in CONSTITUTION],
|
| 182 |
+
label="Active rules (short form)",
|
| 183 |
+
show_legend=False,
|
| 184 |
+
interactive=False,
|
| 185 |
+
)
|
| 186 |
+
gr.Markdown("### Audit (latest event)")
|
| 187 |
+
audit_json = gr.JSON(label="Event", value={})
|
| 188 |
+
log_file = gr.Textbox(
|
| 189 |
+
value="~/.outer_void/audit/blux_ca_demo.history.jsonl",
|
| 190 |
+
label="Audit log (JSONL file)",
|
| 191 |
+
)
|
| 192 |
+
download = gr.File(label="Download log (appears after first message)")
|
| 193 |
+
|
| 194 |
+
def on_send(history, message, red, gent, path):
|
| 195 |
+
if not (message and message.strip()):
|
| 196 |
+
return history, "", None
|
| 197 |
+
h, evt_json, path_str = ca_chat(history or [], message, red, gent, path)
|
| 198 |
+
file_ref = str(Path(path_str).expanduser())
|
| 199 |
+
return h, evt_json, file_ref if Path(file_ref).exists() else None
|
| 200 |
+
|
| 201 |
+
send.click(
|
| 202 |
+
on_send,
|
| 203 |
+
inputs=[chat, msg, redact_toggle, gentle_tone, log_file],
|
| 204 |
+
outputs=[chat, audit_json, download],
|
| 205 |
+
)
|
| 206 |
+
msg.submit(
|
| 207 |
+
on_send,
|
| 208 |
+
inputs=[chat, msg, redact_toggle, gentle_tone, log_file],
|
| 209 |
+
outputs=[chat, audit_json, download],
|
| 210 |
+
)
|
| 211 |
+
|
| 212 |
+
gr.Markdown(
|
| 213 |
+
"#### Notes\n"
|
| 214 |
+
"- This is a **toy** compass and tactic set for demo purposes.\n"
|
| 215 |
+
"- Every turn writes an **append-only JSONL** event with a trace.\n"
|
| 216 |
+
"- Redaction happens **before** analysis when enabled."
|
| 217 |
+
)
|
| 218 |
+
return demo
|
| 219 |
+
|
| 220 |
+
if __name__ == "__main__":
|
| 221 |
+
build_ui().launch()
|
installer.sh
DELETED
|
@@ -1,361 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
|
| 3 |
-
# Outer Void CLI Installer
|
| 4 |
-
# Installation script for the Outer Void command-line interface
|
| 5 |
-
|
| 6 |
-
set -e # Exit on any error
|
| 7 |
-
|
| 8 |
-
# Colors for output
|
| 9 |
-
RED='\033[0;31m'
|
| 10 |
-
GREEN='\033[0;32m'
|
| 11 |
-
YELLOW='\033[1;33m'
|
| 12 |
-
BLUE='\033[0;34m'
|
| 13 |
-
NC='\033[0m' # No Color
|
| 14 |
-
|
| 15 |
-
# Configuration
|
| 16 |
-
REPO_URL="https://github.com/Outer-Void/outer-void-cli"
|
| 17 |
-
INSTALL_DIR="$HOME/.outer-void"
|
| 18 |
-
BIN_DIR="$HOME/.local/bin"
|
| 19 |
-
VENV_DIR="$INSTALL_DIR/venv"
|
| 20 |
-
PYTHON_EXEC="python3"
|
| 21 |
-
PIP_EXEC="pip3"
|
| 22 |
-
|
| 23 |
-
# Logging functions
|
| 24 |
-
log_info() {
|
| 25 |
-
echo -e "${BLUE}ℹ️ INFO:${NC} $1"
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
log_success() {
|
| 29 |
-
echo -e "${GREEN}✅ SUCCESS:${NC} $1"
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
log_warning() {
|
| 33 |
-
echo -e "${YELLOW}⚠️ WARNING:${NC} $1"
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
log_error() {
|
| 37 |
-
echo -e "${RED}❌ ERROR:${NC} $1"
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
# Check if command exists
|
| 41 |
-
command_exists() {
|
| 42 |
-
command -v "$1" >/dev/null 2>&1
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
# Detect platform
|
| 46 |
-
detect_platform() {
|
| 47 |
-
case "$(uname -s)" in
|
| 48 |
-
Linux*) platform="Linux" ;;
|
| 49 |
-
Darwin*) platform="macOS" ;;
|
| 50 |
-
CYGWIN*) platform="Cygwin" ;;
|
| 51 |
-
MINGW*) platform="MinGW" ;;
|
| 52 |
-
*) platform="Unknown" ;;
|
| 53 |
-
esac
|
| 54 |
-
echo "$platform"
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
# Check Python installation
|
| 58 |
-
check_python() {
|
| 59 |
-
if ! command_exists "$PYTHON_EXEC"; then
|
| 60 |
-
log_error "Python 3 is required but not installed."
|
| 61 |
-
log_info "Please install Python 3.8 or higher from https://python.org"
|
| 62 |
-
exit 1
|
| 63 |
-
fi
|
| 64 |
-
|
| 65 |
-
python_version=$($PYTHON_EXEC -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
|
| 66 |
-
python_version_full=$($PYTHON_EXEC -c "import sys; print(sys.version)")
|
| 67 |
-
|
| 68 |
-
log_info "Found Python $python_version_full"
|
| 69 |
-
|
| 70 |
-
# Check if version is at least 3.8
|
| 71 |
-
if $PYTHON_EXEC -c "import sys; exit(0 if sys.version_info >= (3, 8) else 1)"; then
|
| 72 |
-
log_success "Python version meets requirements (>= 3.8)"
|
| 73 |
-
else
|
| 74 |
-
log_error "Python 3.8 or higher is required. Found $python_version"
|
| 75 |
-
exit 1
|
| 76 |
-
fi
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
# Check pip installation
|
| 80 |
-
check_pip() {
|
| 81 |
-
if ! command_exists "$PIP_EXEC"; then
|
| 82 |
-
log_warning "pip3 not found, trying to install..."
|
| 83 |
-
|
| 84 |
-
if command_exists "apt-get"; then
|
| 85 |
-
sudo apt-get update && sudo apt-get install -y python3-pip
|
| 86 |
-
elif command_exists "yum"; then
|
| 87 |
-
sudo yum install -y python3-pip
|
| 88 |
-
elif command_exists "brew"; then
|
| 89 |
-
brew install python3
|
| 90 |
-
else
|
| 91 |
-
log_error "Please install pip3 manually"
|
| 92 |
-
exit 1
|
| 93 |
-
fi
|
| 94 |
-
fi
|
| 95 |
-
|
| 96 |
-
if command_exists "$PIP_EXEC"; then
|
| 97 |
-
pip_version=$($PIP_EXEC --version)
|
| 98 |
-
log_success "Found pip: $pip_version"
|
| 99 |
-
else
|
| 100 |
-
log_error "pip3 is required but not installed"
|
| 101 |
-
exit 1
|
| 102 |
-
fi
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
# Create directory structure
|
| 106 |
-
create_directories() {
|
| 107 |
-
log_info "Creating installation directories..."
|
| 108 |
-
|
| 109 |
-
mkdir -p "$INSTALL_DIR"
|
| 110 |
-
mkdir -p "$BIN_DIR"
|
| 111 |
-
|
| 112 |
-
log_success "Created installation directory: $INSTALL_DIR"
|
| 113 |
-
log_success "Created bin directory: $BIN_DIR"
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
# Create virtual environment
|
| 117 |
-
create_venv() {
|
| 118 |
-
log_info "Creating Python virtual environment..."
|
| 119 |
-
|
| 120 |
-
if [ -d "$VENV_DIR" ]; then
|
| 121 |
-
log_warning "Virtual environment already exists, recreating..."
|
| 122 |
-
rm -rf "$VENV_DIR"
|
| 123 |
-
fi
|
| 124 |
-
|
| 125 |
-
$PYTHON_EXEC -m venv "$VENV_DIR"
|
| 126 |
-
|
| 127 |
-
# Update Python and pip executables to use venv
|
| 128 |
-
PYTHON_EXEC="$VENV_DIR/bin/python"
|
| 129 |
-
PIP_EXEC="$VENV_DIR/bin/pip"
|
| 130 |
-
|
| 131 |
-
log_success "Virtual environment created at $VENV_DIR"
|
| 132 |
-
}
|
| 133 |
-
|
| 134 |
-
# Install package
|
| 135 |
-
install_package() {
|
| 136 |
-
log_info "Installing Outer Void CLI..."
|
| 137 |
-
|
| 138 |
-
# Check if we're in a development directory with pyproject.toml
|
| 139 |
-
if [ -f "pyproject.toml" ] && [ -d "ov" ]; then
|
| 140 |
-
log_info "Installing from local development copy..."
|
| 141 |
-
$PIP_EXEC install -e .
|
| 142 |
-
else
|
| 143 |
-
log_info "Installing from PyPI..."
|
| 144 |
-
$PIP_EXEC install outer-void-cli
|
| 145 |
-
fi
|
| 146 |
-
|
| 147 |
-
log_success "Package installed successfully"
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
-
# Create symlinks
|
| 151 |
-
create_symlinks() {
|
| 152 |
-
log_info "Creating application symlinks..."
|
| 153 |
-
|
| 154 |
-
# Remove existing symlinks
|
| 155 |
-
rm -f "$BIN_DIR/outer-void"
|
| 156 |
-
rm -f "$BIN_DIR/ov"
|
| 157 |
-
|
| 158 |
-
# Create new symlinks
|
| 159 |
-
ln -sf "$VENV_DIR/bin/outer-void" "$BIN_DIR/outer-void"
|
| 160 |
-
ln -sf "$VENV_DIR/bin/ov" "$BIN_DIR/ov"
|
| 161 |
-
|
| 162 |
-
# Make scripts executable
|
| 163 |
-
chmod +x "$VENV_DIR/bin/outer-void"
|
| 164 |
-
chmod +x "$VENV_DIR/bin/ov"
|
| 165 |
-
|
| 166 |
-
log_success "Created symlinks: outer-void, ov"
|
| 167 |
-
}
|
| 168 |
-
|
| 169 |
-
# Add bin directory to PATH
|
| 170 |
-
setup_path() {
|
| 171 |
-
log_info "Setting up PATH..."
|
| 172 |
-
|
| 173 |
-
local shell_rc=""
|
| 174 |
-
case "$SHELL" in
|
| 175 |
-
*/bash) shell_rc="$HOME/.bashrc" ;;
|
| 176 |
-
*/zsh) shell_rc="$HOME/.zshrc" ;;
|
| 177 |
-
*/fish) shell_rc="$HOME/.config/fish/config.fish" ;;
|
| 178 |
-
*) shell_rc="$HOME/.profile" ;;
|
| 179 |
-
esac
|
| 180 |
-
|
| 181 |
-
if [ -n "$shell_rc" ] && [ -f "$shell_rc" ]; then
|
| 182 |
-
if ! grep -q "$BIN_DIR" "$shell_rc"; then
|
| 183 |
-
echo "export PATH=\"$BIN_DIR:\$PATH\"" >> "$shell_rc"
|
| 184 |
-
log_success "Added $BIN_DIR to PATH in $shell_rc"
|
| 185 |
-
else
|
| 186 |
-
log_info "$BIN_DIR already in PATH"
|
| 187 |
-
fi
|
| 188 |
-
else
|
| 189 |
-
log_warning "Could not detect shell configuration file"
|
| 190 |
-
log_info "Please add this to your shell profile:"
|
| 191 |
-
echo "export PATH=\"$BIN_DIR:\$PATH\""
|
| 192 |
-
fi
|
| 193 |
-
}
|
| 194 |
-
|
| 195 |
-
# Verify installation
|
| 196 |
-
verify_installation() {
|
| 197 |
-
log_info "Verifying installation..."
|
| 198 |
-
|
| 199 |
-
# Refresh shell
|
| 200 |
-
export PATH="$BIN_DIR:$PATH"
|
| 201 |
-
|
| 202 |
-
if command_exists "outer-void"; then
|
| 203 |
-
log_success "Outer Void CLI installed successfully!"
|
| 204 |
-
|
| 205 |
-
# Test the installation
|
| 206 |
-
if outer-void version >/dev/null 2>&1; then
|
| 207 |
-
log_success "CLI is functioning correctly"
|
| 208 |
-
else
|
| 209 |
-
log_warning "CLI installed but may have issues running"
|
| 210 |
-
fi
|
| 211 |
-
else
|
| 212 |
-
log_error "Installation verification failed"
|
| 213 |
-
exit 1
|
| 214 |
-
fi
|
| 215 |
-
}
|
| 216 |
-
|
| 217 |
-
# Display post-install message
|
| 218 |
-
show_post_install() {
|
| 219 |
-
echo
|
| 220 |
-
echo -e "${GREEN}🎉 Outer Void CLI Installation Complete!${NC}"
|
| 221 |
-
echo
|
| 222 |
-
echo "📁 Installation directory: $INSTALL_DIR"
|
| 223 |
-
echo "🔗 Binary directory: $BIN_DIR"
|
| 224 |
-
echo "🐍 Virtual environment: $VENV_DIR"
|
| 225 |
-
echo
|
| 226 |
-
echo "🚀 Available commands:"
|
| 227 |
-
echo " outer-void Main command"
|
| 228 |
-
echo " ov Short alias"
|
| 229 |
-
echo
|
| 230 |
-
echo "📚 Usage examples:"
|
| 231 |
-
echo " outer-void summary # Show organization overview"
|
| 232 |
-
echo " outer-void list repos # List GitHub repositories"
|
| 233 |
-
echo " outer-void list models # List Hugging Face models"
|
| 234 |
-
echo " outer-void web # Open web dashboard"
|
| 235 |
-
echo " outer-void --help # Show help"
|
| 236 |
-
echo
|
| 237 |
-
echo "💡 You may need to restart your terminal or run:"
|
| 238 |
-
echo " source ~/.bashrc # or source ~/.zshrc"
|
| 239 |
-
echo
|
| 240 |
-
}
|
| 241 |
-
|
| 242 |
-
# Cleanup function
|
| 243 |
-
cleanup() {
|
| 244 |
-
if [ $? -ne 0 ]; then
|
| 245 |
-
log_error "Installation failed. Cleaning up..."
|
| 246 |
-
rm -rf "$INSTALL_DIR"
|
| 247 |
-
fi
|
| 248 |
-
}
|
| 249 |
-
|
| 250 |
-
# Main installation function
|
| 251 |
-
main() {
|
| 252 |
-
echo -e "${BLUE}"
|
| 253 |
-
echo "🌌 Outer Void CLI Installer"
|
| 254 |
-
echo "=========================="
|
| 255 |
-
echo -e "${NC}"
|
| 256 |
-
|
| 257 |
-
# Set trap for cleanup on failure
|
| 258 |
-
trap cleanup EXIT
|
| 259 |
-
|
| 260 |
-
# Detect platform
|
| 261 |
-
platform=$(detect_platform)
|
| 262 |
-
log_info "Detected platform: $platform"
|
| 263 |
-
|
| 264 |
-
# Run installation steps
|
| 265 |
-
check_python
|
| 266 |
-
check_pip
|
| 267 |
-
create_directories
|
| 268 |
-
create_venv
|
| 269 |
-
install_package
|
| 270 |
-
create_symlinks
|
| 271 |
-
setup_path
|
| 272 |
-
verify_installation
|
| 273 |
-
show_post_install
|
| 274 |
-
|
| 275 |
-
# Remove trap on success
|
| 276 |
-
trap - EXIT
|
| 277 |
-
}
|
| 278 |
-
|
| 279 |
-
# Uninstall function
|
| 280 |
-
uninstall() {
|
| 281 |
-
echo -e "${YELLOW}"
|
| 282 |
-
echo "🗑️ Uninstalling Outer Void CLI"
|
| 283 |
-
echo "============================="
|
| 284 |
-
echo -e "${NC}"
|
| 285 |
-
|
| 286 |
-
read -p "Are you sure you want to uninstall Outer Void CLI? (y/N): " -n 1 -r
|
| 287 |
-
echo
|
| 288 |
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
| 289 |
-
log_info "Uninstall cancelled"
|
| 290 |
-
exit 0
|
| 291 |
-
fi
|
| 292 |
-
|
| 293 |
-
log_info "Removing installation directory: $INSTALL_DIR"
|
| 294 |
-
rm -rf "$INSTALL_DIR"
|
| 295 |
-
|
| 296 |
-
log_info "Removing symlinks"
|
| 297 |
-
rm -f "$BIN_DIR/outer-void"
|
| 298 |
-
rm -f "$BIN_DIR/ov"
|
| 299 |
-
|
| 300 |
-
log_success "Outer Void CLI uninstalled successfully"
|
| 301 |
-
}
|
| 302 |
-
|
| 303 |
-
# Update function
|
| 304 |
-
update() {
|
| 305 |
-
echo -e "${BLUE}"
|
| 306 |
-
echo "🔄 Updating Outer Void CLI"
|
| 307 |
-
echo "========================"
|
| 308 |
-
echo -e "${NC}"
|
| 309 |
-
|
| 310 |
-
if [ ! -d "$INSTALL_DIR" ]; then
|
| 311 |
-
log_error "Outer Void CLI not found. Please install first."
|
| 312 |
-
exit 1
|
| 313 |
-
fi
|
| 314 |
-
|
| 315 |
-
log_info "Updating Outer Void CLI..."
|
| 316 |
-
|
| 317 |
-
# Use venv pip if available
|
| 318 |
-
if [ -f "$VENV_DIR/bin/pip" ]; then
|
| 319 |
-
PIP_EXEC="$VENV_DIR/bin/pip"
|
| 320 |
-
fi
|
| 321 |
-
|
| 322 |
-
$PIP_EXEC install --upgrade outer-void-cli
|
| 323 |
-
log_success "Outer Void CLI updated successfully"
|
| 324 |
-
}
|
| 325 |
-
|
| 326 |
-
# Show usage
|
| 327 |
-
usage() {
|
| 328 |
-
echo "Usage: $0 [command]"
|
| 329 |
-
echo
|
| 330 |
-
echo "Commands:"
|
| 331 |
-
echo " install Install Outer Void CLI (default)"
|
| 332 |
-
echo " uninstall Remove Outer Void CLI"
|
| 333 |
-
echo " update Update Outer Void CLI to latest version"
|
| 334 |
-
echo " help Show this help message"
|
| 335 |
-
echo
|
| 336 |
-
echo "Examples:"
|
| 337 |
-
echo " $0 install # Install the CLI"
|
| 338 |
-
echo " $0 update # Update the CLI"
|
| 339 |
-
echo " $0 uninstall # Remove the CLI"
|
| 340 |
-
}
|
| 341 |
-
|
| 342 |
-
# Parse command line arguments
|
| 343 |
-
case "${1:-install}" in
|
| 344 |
-
install|"")
|
| 345 |
-
main
|
| 346 |
-
;;
|
| 347 |
-
uninstall|remove)
|
| 348 |
-
uninstall
|
| 349 |
-
;;
|
| 350 |
-
update|upgrade)
|
| 351 |
-
update
|
| 352 |
-
;;
|
| 353 |
-
help|--help|-h)
|
| 354 |
-
usage
|
| 355 |
-
;;
|
| 356 |
-
*)
|
| 357 |
-
log_error "Unknown command: $1"
|
| 358 |
-
usage
|
| 359 |
-
exit 1
|
| 360 |
-
;;
|
| 361 |
-
esac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ov.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
"""
|
| 3 |
-
ov.py — Minimal root runner for Outer Void CLI
|
| 4 |
-
"""
|
| 5 |
-
|
| 6 |
-
import sys
|
| 7 |
-
import os
|
| 8 |
-
|
| 9 |
-
# Add current directory to Python path
|
| 10 |
-
sys.path.insert(0, os.path.dirname(__file__))
|
| 11 |
-
|
| 12 |
-
try:
|
| 13 |
-
from ov.cli import main
|
| 14 |
-
except ImportError:
|
| 15 |
-
print("❌ Could not import Outer Void CLI")
|
| 16 |
-
print("💡 Make sure:")
|
| 17 |
-
print(" - The 'ov' directory exists with __init__.py and cli.py")
|
| 18 |
-
print(" - You're in the correct directory")
|
| 19 |
-
print(" - Or install with: pip install -e .")
|
| 20 |
-
sys.exit(1)
|
| 21 |
-
|
| 22 |
-
if __name__ == "__main__":
|
| 23 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ov/__init__.py
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
"""Outer Void CLI package."""
|
| 2 |
-
__version__ = "1.0.0"
|
| 3 |
-
__author__ = "Outer Void Team, Justadudeinspace"
|
| 4 |
-
|
| 5 |
-
# Import main for easy access
|
| 6 |
-
from .cli import main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ov/cli.py
DELETED
|
@@ -1,427 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
"""
|
| 3 |
-
Outer Void CLI - Precision interface for the Outer Void ecosystem.
|
| 4 |
-
"""
|
| 5 |
-
|
| 6 |
-
import os
|
| 7 |
-
import sys
|
| 8 |
-
import json
|
| 9 |
-
import webbrowser
|
| 10 |
-
import argparse
|
| 11 |
-
import time
|
| 12 |
-
from pathlib import Path
|
| 13 |
-
from typing import Optional, Dict, Any, List, Tuple
|
| 14 |
-
from dataclasses import dataclass
|
| 15 |
-
|
| 16 |
-
# Add this line to make relative imports work
|
| 17 |
-
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 18 |
-
|
| 19 |
-
import requests
|
| 20 |
-
import gradio as gr
|
| 21 |
-
|
| 22 |
-
# Configuration
|
| 23 |
-
ORG_NAME = "Outer-Void"
|
| 24 |
-
HF_BASE = f"https://huggingface.co/api/organizations/{ORG_NAME}"
|
| 25 |
-
GH_BASE = f"https://api.github.com/orgs/{ORG_NAME}/repos"
|
| 26 |
-
|
| 27 |
-
# Rate limiting and retry configuration
|
| 28 |
-
REQUEST_TIMEOUT = 15
|
| 29 |
-
MAX_RETRIES = 3
|
| 30 |
-
RETRY_DELAY = 1
|
| 31 |
-
|
| 32 |
-
@dataclass
|
| 33 |
-
class OrgStats:
|
| 34 |
-
"""Precise organization statistics container"""
|
| 35 |
-
hf_members: int = 0
|
| 36 |
-
hf_models: int = 0
|
| 37 |
-
gh_repos: int = 0
|
| 38 |
-
gh_top_repos: List[Dict[str, Any]] = None
|
| 39 |
-
last_updated: Optional[float] = None
|
| 40 |
-
|
| 41 |
-
def __post_init__(self):
|
| 42 |
-
if self.gh_top_repos is None:
|
| 43 |
-
self.gh_top_repos = []
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
class OuterVoidClient:
|
| 47 |
-
"""Precision client for Outer Void ecosystem APIs"""
|
| 48 |
-
|
| 49 |
-
def __init__(self):
|
| 50 |
-
self.session = requests.Session()
|
| 51 |
-
self.session.headers.update({
|
| 52 |
-
'User-Agent': 'OuterVoid-CLI/1.0',
|
| 53 |
-
'Accept': 'application/json'
|
| 54 |
-
})
|
| 55 |
-
self.stats = OrgStats()
|
| 56 |
-
|
| 57 |
-
def main():
|
| 58 |
-
"""Precision main function with enhanced argument parsing"""
|
| 59 |
-
parser = argparse.ArgumentParser(
|
| 60 |
-
description="Outer Void Ecosystem CLI - Precision Interface",
|
| 61 |
-
formatter_class=argparse.RawDescriptionHelpFormatter,
|
| 62 |
-
epilog="""
|
| 63 |
-
Examples:
|
| 64 |
-
python ov.py summary # Show detailed organization overview
|
| 65 |
-
python ov.py web # Open organization web pages
|
| 66 |
-
python ov.py export # Export data as JSON
|
| 67 |
-
python ov.py list repos # List all GitHub repositories
|
| 68 |
-
python ov.py list models # List all Hugging Face models
|
| 69 |
-
python ov.py list all # List both repos and models
|
| 70 |
-
python ov.py version # Show version information
|
| 71 |
-
""",
|
| 72 |
-
add_help=False # We'll add custom help handling
|
| 73 |
-
)
|
| 74 |
-
|
| 75 |
-
# Add help argument manually to control behavior
|
| 76 |
-
parser.add_argument(
|
| 77 |
-
'-h', '--help',
|
| 78 |
-
action='help',
|
| 79 |
-
default=argparse.SUPPRESS,
|
| 80 |
-
help='Show this help message and exit'
|
| 81 |
-
)
|
| 82 |
-
|
| 83 |
-
parser.add_argument(
|
| 84 |
-
'command',
|
| 85 |
-
nargs='?',
|
| 86 |
-
choices=['summary', 'web', 'export', 'list', 'version'],
|
| 87 |
-
help='Command to execute'
|
| 88 |
-
)
|
| 89 |
-
|
| 90 |
-
parser.add_argument(
|
| 91 |
-
'subcommand',
|
| 92 |
-
nargs='?',
|
| 93 |
-
help='Subcommand for list command (repos|models|all)'
|
| 94 |
-
)
|
| 95 |
-
|
| 96 |
-
parser.add_argument(
|
| 97 |
-
'--format', '-f',
|
| 98 |
-
choices=['json', 'table', 'csv'],
|
| 99 |
-
default='table',
|
| 100 |
-
help='Output format for list/export (default: table)'
|
| 101 |
-
)
|
| 102 |
-
|
| 103 |
-
parser.add_argument(
|
| 104 |
-
'--limit', '-l',
|
| 105 |
-
type=int,
|
| 106 |
-
default=50,
|
| 107 |
-
help='Limit number of items to display (default: 50)'
|
| 108 |
-
)
|
| 109 |
-
|
| 110 |
-
parser.add_argument(
|
| 111 |
-
'--verbose', '-v',
|
| 112 |
-
action='store_true',
|
| 113 |
-
help='Enable verbose output'
|
| 114 |
-
)
|
| 115 |
-
|
| 116 |
-
# If no arguments provided, show help
|
| 117 |
-
if len(sys.argv) == 1:
|
| 118 |
-
parser.print_help()
|
| 119 |
-
sys.exit(0)
|
| 120 |
-
|
| 121 |
-
args = parser.parse_args()
|
| 122 |
-
|
| 123 |
-
# Handle help for specific commands
|
| 124 |
-
if args.command == 'list' and args.subcommand in [None, 'help', '-h', '--help']:
|
| 125 |
-
print("List command usage:")
|
| 126 |
-
print(" python ov.py list repos # List GitHub repositories")
|
| 127 |
-
print(" python ov.py list models # List Hugging Face models")
|
| 128 |
-
print(" python ov.py list all # List both repos and models")
|
| 129 |
-
print("\nOptions for list command:")
|
| 130 |
-
print(" --format table|json|csv # Output format (default: table)")
|
| 131 |
-
print(" --limit NUMBER # Limit results (default: 50)")
|
| 132 |
-
print(" --verbose # Show detailed information")
|
| 133 |
-
sys.exit(0)
|
| 134 |
-
|
| 135 |
-
# Initialize client
|
| 136 |
-
client = OuterVoidClient()
|
| 137 |
-
|
| 138 |
-
try:
|
| 139 |
-
if args.command == 'summary':
|
| 140 |
-
if args.verbose:
|
| 141 |
-
print("🔍 Verbose mode enabled - gathering detailed organization data...")
|
| 142 |
-
show_org_summary(client)
|
| 143 |
-
|
| 144 |
-
elif args.command == 'web':
|
| 145 |
-
open_web_dash()
|
| 146 |
-
|
| 147 |
-
elif args.command == 'export':
|
| 148 |
-
export_data(args.format, client, args.limit)
|
| 149 |
-
|
| 150 |
-
elif args.command == 'list':
|
| 151 |
-
if not args.subcommand:
|
| 152 |
-
print("❌ Please specify what to list: repos, models, or all")
|
| 153 |
-
print("💡 Use: python ov.py list --help for usage information")
|
| 154 |
-
sys.exit(1)
|
| 155 |
-
list_data(args.subcommand, args.format, args.limit, client, args.verbose)
|
| 156 |
-
|
| 157 |
-
elif args.command == 'version':
|
| 158 |
-
print("Outer Void CLI v1.0.0 - Precision Edition")
|
| 159 |
-
|
| 160 |
-
else:
|
| 161 |
-
parser.print_help()
|
| 162 |
-
|
| 163 |
-
except KeyboardInterrupt:
|
| 164 |
-
print("\n⚠️ Operation cancelled by user")
|
| 165 |
-
sys.exit(1)
|
| 166 |
-
except Exception as e:
|
| 167 |
-
print(f"💥 Unexpected error: {e}")
|
| 168 |
-
if args.verbose:
|
| 169 |
-
import traceback
|
| 170 |
-
traceback.print_exc()
|
| 171 |
-
sys.exit(1)
|
| 172 |
-
|
| 173 |
-
def fetch_json_with_retry(self, url: str) -> Optional[Dict[Any, Any]]:
|
| 174 |
-
"""Robust JSON fetching with retry logic and precise error handling"""
|
| 175 |
-
for attempt in range(MAX_RETRIES):
|
| 176 |
-
try:
|
| 177 |
-
response = self.session.get(url, timeout=REQUEST_TIMEOUT)
|
| 178 |
-
response.raise_for_status()
|
| 179 |
-
|
| 180 |
-
# Validate JSON content type
|
| 181 |
-
content_type = response.headers.get('content-type', '')
|
| 182 |
-
if 'application/json' not in content_type:
|
| 183 |
-
print(f"⚠️ Unexpected content type from {url}: {content_type}")
|
| 184 |
-
return None
|
| 185 |
-
|
| 186 |
-
return response.json()
|
| 187 |
-
|
| 188 |
-
except requests.exceptions.Timeout:
|
| 189 |
-
print(f"⏰ Timeout fetching {url} (attempt {attempt + 1}/{MAX_RETRIES})")
|
| 190 |
-
except requests.exceptions.ConnectionError as e:
|
| 191 |
-
print(f"🔌 Connection error fetching {url}: {e}")
|
| 192 |
-
except requests.exceptions.HTTPError as e:
|
| 193 |
-
print(f"🚨 HTTP error fetching {url}: {e.response.status_code} - {e.response.reason}")
|
| 194 |
-
# Don't retry on client errors
|
| 195 |
-
if 400 <= e.response.status_code < 500:
|
| 196 |
-
break
|
| 197 |
-
except json.JSONDecodeError as e:
|
| 198 |
-
print(f"📄 JSON decode error from {url}: {e}")
|
| 199 |
-
break
|
| 200 |
-
except Exception as e:
|
| 201 |
-
print(f"❓ Unexpected error fetching {url}: {e}")
|
| 202 |
-
|
| 203 |
-
if attempt < MAX_RETRIES - 1:
|
| 204 |
-
time.sleep(RETRY_DELAY * (2 ** attempt)) # Exponential backoff
|
| 205 |
-
|
| 206 |
-
return None
|
| 207 |
-
|
| 208 |
-
def gather_organization_data(self) -> OrgStats:
|
| 209 |
-
"""Precisely gather all organization data with comprehensive error handling"""
|
| 210 |
-
print("🔄 Gathering Outer Void organization data...")
|
| 211 |
-
|
| 212 |
-
# Hugging Face data
|
| 213 |
-
hf_data = self.fetch_json_with_retry(HF_BASE)
|
| 214 |
-
if hf_data:
|
| 215 |
-
self.stats.hf_members = len(hf_data.get('members', []))
|
| 216 |
-
# Handle different possible structures for models
|
| 217 |
-
models = hf_data.get('models', [])
|
| 218 |
-
if isinstance(models, list):
|
| 219 |
-
self.stats.hf_models = len(models)
|
| 220 |
-
else:
|
| 221 |
-
self.stats.hf_models = 0
|
| 222 |
-
else:
|
| 223 |
-
print("🤗 Hugging Face data unavailable.")
|
| 224 |
-
|
| 225 |
-
# GitHub data with pagination support
|
| 226 |
-
gh_repos = self._fetch_all_github_repos()
|
| 227 |
-
if gh_repos is not None:
|
| 228 |
-
self.stats.gh_repos = len(gh_repos)
|
| 229 |
-
# Sort by update time and take top 10
|
| 230 |
-
sorted_repos = sorted(gh_repos,
|
| 231 |
-
key=lambda x: x.get('updated_at', ''),
|
| 232 |
-
reverse=True)
|
| 233 |
-
self.stats.gh_top_repos = sorted_repos[:10]
|
| 234 |
-
else:
|
| 235 |
-
print("🐙 GitHub data unavailable.")
|
| 236 |
-
|
| 237 |
-
self.stats.last_updated = time.time()
|
| 238 |
-
return self.stats
|
| 239 |
-
|
| 240 |
-
def _fetch_all_github_repos(self) -> Optional[List[Dict[str, Any]]]:
|
| 241 |
-
"""Fetch all GitHub repos with pagination support"""
|
| 242 |
-
all_repos = []
|
| 243 |
-
page = 1
|
| 244 |
-
per_page = 100
|
| 245 |
-
|
| 246 |
-
while True:
|
| 247 |
-
try:
|
| 248 |
-
url = f"{GH_BASE}?page={page}&per_page={per_page}&sort=updated"
|
| 249 |
-
repos = self.fetch_json_with_retry(url)
|
| 250 |
-
|
| 251 |
-
if not repos or not isinstance(repos, list):
|
| 252 |
-
break
|
| 253 |
-
|
| 254 |
-
all_repos.extend(repos)
|
| 255 |
-
|
| 256 |
-
# Check if we've got all repos (GitHub returns empty list when done)
|
| 257 |
-
if len(repos) < per_page:
|
| 258 |
-
break
|
| 259 |
-
|
| 260 |
-
page += 1
|
| 261 |
-
|
| 262 |
-
except Exception as e:
|
| 263 |
-
print(f"⚠️ Error in GitHub pagination: {e}")
|
| 264 |
-
break
|
| 265 |
-
|
| 266 |
-
return all_repos if all_repos else None
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
def show_org_summary(client: Optional[OuterVoidClient] = None):
|
| 270 |
-
"""Display a precise and formatted organization summary"""
|
| 271 |
-
if client is None:
|
| 272 |
-
client = OuterVoidClient()
|
| 273 |
-
|
| 274 |
-
stats = client.gather_organization_data()
|
| 275 |
-
|
| 276 |
-
print(f"\n🌌 Outer Void Organization Overview")
|
| 277 |
-
print("=" * 50)
|
| 278 |
-
|
| 279 |
-
# Hugging Face section
|
| 280 |
-
print("🤗 Hugging Face Hub:")
|
| 281 |
-
print(f" ├─ Organization: {ORG_NAME}")
|
| 282 |
-
print(f" ├─ Members: {stats.hf_members}")
|
| 283 |
-
print(f" └─ Models: {stats.hf_models}")
|
| 284 |
-
|
| 285 |
-
# GitHub section
|
| 286 |
-
print(f"\n🐙 GitHub Organization:")
|
| 287 |
-
print(f" └─ Total Repositories: {stats.gh_repos}")
|
| 288 |
-
|
| 289 |
-
if stats.gh_top_repos:
|
| 290 |
-
print(f"\n📚 Recently Updated Repositories:")
|
| 291 |
-
for i, repo in enumerate(stats.gh_top_repos, 1):
|
| 292 |
-
name = repo.get('name', 'Unknown')
|
| 293 |
-
description = repo.get('description', 'No description')
|
| 294 |
-
stars = repo.get('stargazers_count', 0)
|
| 295 |
-
updated = repo.get('updated_at', '').split('T')[0] # Just the date part
|
| 296 |
-
|
| 297 |
-
print(f" {i:2d}. {name}")
|
| 298 |
-
if description:
|
| 299 |
-
print(f" 📝 {description[:60]}{'...' if len(description) > 60 else ''}")
|
| 300 |
-
print(f" ⭐ {stars} stars | 📅 Updated: {updated}")
|
| 301 |
-
|
| 302 |
-
# Quick links
|
| 303 |
-
print(f"\n🔗 Quick Links:")
|
| 304 |
-
print(f" ├─ Hugging Face: https://huggingface.co/{ORG_NAME}")
|
| 305 |
-
print(f" ├─ GitHub: https://github.com/{ORG_NAME}")
|
| 306 |
-
print(f" └─ This report generated: {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
| 307 |
-
print()
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
def open_web_dash():
|
| 311 |
-
"""Precisely open web dashboard with validation"""
|
| 312 |
-
urls = [
|
| 313 |
-
f"https://huggingface.co/{ORG_NAME}",
|
| 314 |
-
f"https://github.com/{ORG_NAME}"
|
| 315 |
-
]
|
| 316 |
-
|
| 317 |
-
print("🌐 Opening Outer Void organization pages...")
|
| 318 |
-
for url in urls:
|
| 319 |
-
try:
|
| 320 |
-
webbrowser.open(url)
|
| 321 |
-
print(f" ✅ Opened: {url}")
|
| 322 |
-
except webbrowser.Error as e:
|
| 323 |
-
print(f" ❌ Failed to open {url}: {e}")
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
def export_data(format_type: str = "json", client: Optional[OuterVoidClient] = None):
|
| 327 |
-
"""Precise data export with multiple format support"""
|
| 328 |
-
if client is None:
|
| 329 |
-
client = OuterVoidClient()
|
| 330 |
-
|
| 331 |
-
stats = client.gather_organization_data()
|
| 332 |
-
|
| 333 |
-
if format_type.lower() == "json":
|
| 334 |
-
output_file = Path("outervoid_org_data.json")
|
| 335 |
-
data = {
|
| 336 |
-
"metadata": {
|
| 337 |
-
"organization": ORG_NAME,
|
| 338 |
-
"generated_at": time.strftime('%Y-%m-%d %H:%M:%S UTC'),
|
| 339 |
-
"source": "Outer Void CLI"
|
| 340 |
-
},
|
| 341 |
-
"huggingface": {
|
| 342 |
-
"members": stats.hf_members,
|
| 343 |
-
"models": stats.hf_models,
|
| 344 |
-
"url": f"https://huggingface.co/{ORG_NAME}"
|
| 345 |
-
},
|
| 346 |
-
"github": {
|
| 347 |
-
"total_repositories": stats.gh_repos,
|
| 348 |
-
"recent_repositories": stats.gh_top_repos
|
| 349 |
-
}
|
| 350 |
-
}
|
| 351 |
-
|
| 352 |
-
try:
|
| 353 |
-
output_file.write_text(json.dumps(data, indent=2, ensure_ascii=False))
|
| 354 |
-
print(f"💾 Data successfully exported → {output_file.resolve()}")
|
| 355 |
-
print(f" 📊 Contains: {stats.hf_members} members, {stats.hf_models} models, {stats.gh_repos} repos")
|
| 356 |
-
except Exception as e:
|
| 357 |
-
print(f"❌ Failed to write export file: {e}")
|
| 358 |
-
|
| 359 |
-
else:
|
| 360 |
-
print(f"❌ Unsupported export format: {format_type}")
|
| 361 |
-
print(" Supported formats: json")
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
def main():
|
| 365 |
-
"""Precision main function with enhanced argument parsing"""
|
| 366 |
-
parser = argparse.ArgumentParser(
|
| 367 |
-
description="Outer Void Ecosystem CLI - Precision Interface",
|
| 368 |
-
formatter_class=argparse.RawDescriptionHelpFormatter,
|
| 369 |
-
epilog="""
|
| 370 |
-
Examples:
|
| 371 |
-
python ov.py summary # Show detailed organization overview
|
| 372 |
-
python ov.py web # Open organization web pages
|
| 373 |
-
python ov.py export # Export data as JSON
|
| 374 |
-
python ov.py export --format json # Explicit JSON export
|
| 375 |
-
"""
|
| 376 |
-
)
|
| 377 |
-
|
| 378 |
-
parser.add_argument(
|
| 379 |
-
'command',
|
| 380 |
-
choices=['summary', 'web', 'export', 'version'],
|
| 381 |
-
help='Command to execute'
|
| 382 |
-
)
|
| 383 |
-
|
| 384 |
-
parser.add_argument(
|
| 385 |
-
'--format', '-f',
|
| 386 |
-
choices=['json'],
|
| 387 |
-
default='json',
|
| 388 |
-
help='Export format (default: json)'
|
| 389 |
-
)
|
| 390 |
-
|
| 391 |
-
parser.add_argument(
|
| 392 |
-
'--verbose', '-v',
|
| 393 |
-
action='store_true',
|
| 394 |
-
help='Enable verbose output'
|
| 395 |
-
)
|
| 396 |
-
|
| 397 |
-
args = parser.parse_args()
|
| 398 |
-
|
| 399 |
-
# Initialize client
|
| 400 |
-
client = OuterVoidClient()
|
| 401 |
-
|
| 402 |
-
try:
|
| 403 |
-
if args.command == 'summary':
|
| 404 |
-
if args.verbose:
|
| 405 |
-
print("🔍 Verbose mode enabled - gathering detailed organization data...")
|
| 406 |
-
show_org_summary(client)
|
| 407 |
-
|
| 408 |
-
elif args.command == 'web':
|
| 409 |
-
open_web_dash()
|
| 410 |
-
|
| 411 |
-
elif args.command == 'export':
|
| 412 |
-
export_data(args.format, client)
|
| 413 |
-
|
| 414 |
-
elif args.command == 'version':
|
| 415 |
-
print("Outer Void CLI v1.0.0 - Precision Edition")
|
| 416 |
-
|
| 417 |
-
except KeyboardInterrupt:
|
| 418 |
-
print("\n⚠️ Operation cancelled by user")
|
| 419 |
-
sys.exit(1)
|
| 420 |
-
except Exception as e:
|
| 421 |
-
print(f"💥 Unexpected error: {e}")
|
| 422 |
-
if args.verbose:
|
| 423 |
-
import traceback
|
| 424 |
-
traceback.print_exc()
|
| 425 |
-
sys.exit(1)
|
| 426 |
-
|
| 427 |
-
def main():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
-
[project]
|
| 6 |
-
name = "outer-void-cli"
|
| 7 |
-
version = "1.0.0"
|
| 8 |
-
description = "Outer Void Ecosystem CLI - Precision Interface for Hugging Face and GitHub organizations"
|
| 9 |
-
readme = "README.md"
|
| 10 |
-
authors = [
|
| 11 |
-
{name = "Outer Void Team", email = "contact@outer-void.org"},
|
| 12 |
-
]
|
| 13 |
-
license = {text = "MIT"}
|
| 14 |
-
keywords = ["cli", "huggingface", "github", "organization", "ai", "models"]
|
| 15 |
-
classifiers = [
|
| 16 |
-
"Development Status :: 4 - Beta",
|
| 17 |
-
"Intended Audience :: Developers",
|
| 18 |
-
"Intended Audience :: Science/Research",
|
| 19 |
-
"License :: OSI Approved :: MIT License",
|
| 20 |
-
"Operating System :: OS Independent",
|
| 21 |
-
"Programming Language :: Python :: 3",
|
| 22 |
-
"Programming Language :: Python :: 3.8",
|
| 23 |
-
"Programming Language :: Python :: 3.9",
|
| 24 |
-
"Programming Language :: Python :: 3.10",
|
| 25 |
-
"Programming Language :: Python :: 3.11",
|
| 26 |
-
"Programming Language :: Python :: 3.12",
|
| 27 |
-
"Topic :: Utilities",
|
| 28 |
-
"Topic :: Scientific/Engineering",
|
| 29 |
-
"Topic :: Software Development :: Libraries :: Python Modules",
|
| 30 |
-
]
|
| 31 |
-
|
| 32 |
-
dependencies = [
|
| 33 |
-
"requests>=2.28.0",
|
| 34 |
-
"rich>=13.0.0",
|
| 35 |
-
"python-dotenv>=1.0.0",
|
| 36 |
-
"tabulate>=0.9.0",
|
| 37 |
-
"colorama>=0.4.6; sys_platform == 'win32'",
|
| 38 |
-
]
|
| 39 |
-
|
| 40 |
-
requires-python = ">=3.8"
|
| 41 |
-
|
| 42 |
-
[project.optional-dependencies]
|
| 43 |
-
dev = [
|
| 44 |
-
"pytest>=7.0.0",
|
| 45 |
-
"pytest-cov>=4.0.0",
|
| 46 |
-
"black>=23.0.0",
|
| 47 |
-
"isort>=5.12.0",
|
| 48 |
-
"flake8>=6.0.0",
|
| 49 |
-
"mypy>=1.0.0",
|
| 50 |
-
"pre-commit>=3.0.0",
|
| 51 |
-
]
|
| 52 |
-
docs = [
|
| 53 |
-
"mkdocs>=1.4.0",
|
| 54 |
-
"mkdocs-material>=9.0.0",
|
| 55 |
-
"mkdocstrings[python]>=0.22.0",
|
| 56 |
-
]
|
| 57 |
-
all = [
|
| 58 |
-
"outer-void-cli[dev]",
|
| 59 |
-
"outer-void-cli[docs]",
|
| 60 |
-
]
|
| 61 |
-
|
| 62 |
-
[project.urls]
|
| 63 |
-
Homepage = "https://github.com/Outer-Void/outer-void-cli"
|
| 64 |
-
Documentation = "https://outer-void.github.io/outer-void-cli"
|
| 65 |
-
Repository = "https://github.com/Outer-Void/outer-void-cli"
|
| 66 |
-
Issues = "https://github.com/Outer-Void/outer-void-cli/issues"
|
| 67 |
-
"Changelog" = "https://github.com/Outer-Void/outer-void-cli/releases"
|
| 68 |
-
|
| 69 |
-
[project.scripts]
|
| 70 |
-
outer-void = "ov:main"
|
| 71 |
-
ov = "ov:main"
|
| 72 |
-
|
| 73 |
-
[tool.setuptools.packages.find]
|
| 74 |
-
where = ["."]
|
| 75 |
-
include = ["*"]
|
| 76 |
-
|
| 77 |
-
[tool.black]
|
| 78 |
-
line-length = 88
|
| 79 |
-
target-version = ['py38']
|
| 80 |
-
include = '\.pyi?$'
|
| 81 |
-
extend-exclude = '''
|
| 82 |
-
/(
|
| 83 |
-
# directories
|
| 84 |
-
\.eggs
|
| 85 |
-
| \.git
|
| 86 |
-
| \.hg
|
| 87 |
-
| \.mypy_cache
|
| 88 |
-
| \.tox
|
| 89 |
-
| \.venv
|
| 90 |
-
| build
|
| 91 |
-
| dist
|
| 92 |
-
)/
|
| 93 |
-
'''
|
| 94 |
-
|
| 95 |
-
[tool.isort]
|
| 96 |
-
profile = "black"
|
| 97 |
-
multi_line_output = 3
|
| 98 |
-
line_length = 88
|
| 99 |
-
|
| 100 |
-
[tool.mypy]
|
| 101 |
-
python_version = "3.8"
|
| 102 |
-
warn_return_any = true
|
| 103 |
-
warn_unused_configs = true
|
| 104 |
-
disallow_untyped_defs = true
|
| 105 |
-
disallow_incomplete_defs = true
|
| 106 |
-
check_untyped_defs = true
|
| 107 |
-
disallow_untyped_decorators = true
|
| 108 |
-
no_implicit_optional = true
|
| 109 |
-
warn_redundant_casts = true
|
| 110 |
-
warn_unused_ignores = true
|
| 111 |
-
warn_no_return = true
|
| 112 |
-
|
| 113 |
-
[tool.pytest.ini_options]
|
| 114 |
-
minversion = "7.0"
|
| 115 |
-
addopts = "--verbose --color=yes --cov=ov --cov-report=term-missing --cov-report=html"
|
| 116 |
-
testpaths = ["tests"]
|
| 117 |
-
python_files = ["test_*.py"]
|
| 118 |
-
python_classes = ["Test*"]
|
| 119 |
-
python_functions = ["test_*"]
|
| 120 |
-
|
| 121 |
-
[tool.coverage.run]
|
| 122 |
-
source = ["ov"]
|
| 123 |
-
omit = [
|
| 124 |
-
"*/tests/*",
|
| 125 |
-
"*/test_*",
|
| 126 |
-
"*/__pycache__/*",
|
| 127 |
-
]
|
| 128 |
-
|
| 129 |
-
[tool.coverage.report]
|
| 130 |
-
exclude_lines = [
|
| 131 |
-
"pragma: no cover",
|
| 132 |
-
"def __repr__",
|
| 133 |
-
"if self.debug:",
|
| 134 |
-
"if settings.DEBUG",
|
| 135 |
-
"raise AssertionError",
|
| 136 |
-
"raise NotImplementedError",
|
| 137 |
-
"if 0:",
|
| 138 |
-
"if __name__ == .__main__.:",
|
| 139 |
-
"class .*\\bProtocol\\b":,
|
| 140 |
-
"@(abc\\.)?abstractmethod",
|
| 141 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
quick-install.sh
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
set -e
|
| 3 |
-
|
| 4 |
-
echo "🚀 Quick installing Outer Void CLI..."
|
| 5 |
-
|
| 6 |
-
# Check for Python
|
| 7 |
-
if ! command -v python3 &> /dev/null; then
|
| 8 |
-
echo "❌ Python 3 required. Install from https://python.org"
|
| 9 |
-
exit 1
|
| 10 |
-
fi
|
| 11 |
-
|
| 12 |
-
# Install via pip
|
| 13 |
-
pip3 install outer-void-cli
|
| 14 |
-
|
| 15 |
-
echo "✅ Installed! Use: outer-void --help"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements-dev.txt
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
# Production dependencies
|
| 2 |
-
requests>=2.28.0
|
| 3 |
-
python-dotenv>=1.0.0
|
| 4 |
-
|
| 5 |
-
# Enhanced output (optional but recommended)
|
| 6 |
-
rich>=13.0.0
|
| 7 |
-
tabulate>=0.9.0
|
| 8 |
-
|
| 9 |
-
# Development tools
|
| 10 |
-
pytest>=7.0.0
|
| 11 |
-
black>=23.0.0
|
| 12 |
-
flake8>=6.0.0
|
| 13 |
-
mypy>=1.0.0
|
| 14 |
-
pre-commit>=3.0.0
|
| 15 |
-
|
| 16 |
-
# Documentation
|
| 17 |
-
mkdocs>=1.4.0
|
| 18 |
-
mkdocs-material>=9.0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
# Core dependencies
|
| 2 |
-
requests==2.31.0
|
| 3 |
-
urllib3==2.0.4
|
| 4 |
-
|
| 5 |
-
# CLI enhancements
|
| 6 |
-
rich==13.5.2
|
| 7 |
-
argcomplete==3.1.2
|
| 8 |
-
tabulate==0.9.0
|
| 9 |
-
colorama==0.4.6
|
| 10 |
-
click==8.1.7
|
| 11 |
-
|
| 12 |
-
# Configuration & data
|
| 13 |
-
python-dotenv==1.0.0
|
| 14 |
-
pyyaml==6.0.1
|
| 15 |
-
|
| 16 |
-
# Utilities
|
| 17 |
-
tqdm==4.65.0
|
| 18 |
-
python-dateutil==2.8.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
# Test package
|
|
|
|
|
|