Repository navigation
Expand file tree
/
Copy pathsetup.sh
More file actions
72 lines (63 loc) · 3.27 KB
/
Copy pathsetup.sh
File metadata and controls
72 lines (63 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# Veridian — One-Click Setup (Linux/macOS)
# Usage: curl -sSL https://raw.githubusercontent.com/Abyssal-Genesis/veridian/main/setup.sh | bash
# Or: bash setup.sh
set -euo pipefail
CYAN='\033[96m'
GREEN='\033[92m'
YELLOW='\033[93m'
RED='\033[91m'
BOLD='\033[1m'
RESET='\033[0m'
echo -e "${CYAN}${BOLD}"
echo " ╔══════════════════════════════════════════════════════╗"
echo " ║ ◈ D E U S O C U L U S ◈ ║"
echo " ║ Automated Setup — v0.3.0 ║"
echo " ╚══════════════════════════════════════════════════════╝"
echo -e "${RESET}"
# Check Python
echo -e "${YELLOW}[1/5]${RESET} Checking Python..."
if ! command -v python3 &>/dev/null; then
echo -e "${RED}Python 3.11+ is required. Install from https://python.org${RESET}"
exit 1
fi
PY_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
echo -e " Found Python ${GREEN}${PY_VERSION}${RESET}"
# Create venv
echo -e "${YELLOW}[2/5]${RESET} Creating virtual environment..."
if [ ! -d ".venv" ]; then
python3 -m venv .venv
echo -e " ${GREEN}✓ Virtual environment created${RESET}"
else
echo -e " ${GREEN}✓ Virtual environment exists${RESET}"
fi
# Activate and install
echo -e "${YELLOW}[3/5]${RESET} Installing dependencies..."
source .venv/bin/activate
pip install -e ".[dev]" -q 2>/dev/null
echo -e " ${GREEN}✓ All dependencies installed${RESET}"
# Run tests
echo -e "${YELLOW}[4/5]${RESET} Running test suite..."
python -m pytest tests/ --ignore=tests/test_api.py --ignore=tests/test_postgres_integration.py --ignore=tests/test_validate_repo.py -q 2>/dev/null && echo -e " ${GREEN}✓ All tests passed${RESET}" || echo -e " ${YELLOW}⚠ Some tests may require additional setup${RESET}"
# Generate SDK
echo -e "${YELLOW}[5/5]${RESET} Generating SDK..."
python scripts/generate_sdk.py --lang python 2>/dev/null && echo -e " ${GREEN}✓ Python SDK generated${RESET}" || echo -e " ${YELLOW}⚠ SDK generation skipped${RESET}"
echo ""
echo -e "${GREEN}${BOLD}═══════════════════════════════════════════════╗${RESET}"
echo -e "${GREEN}${BOLD} ✓ Veridian is ready! ║${RESET}"
echo -e "${GREEN}${BOLD}═══════════════════════════════════════════════╝${RESET}"
echo ""
echo -e " ${BOLD}Start the server:${RESET}"
echo -e " ${CYAN}python -m veridian.api --host 0.0.0.0 --port 8080${RESET}"
echo ""
echo -e " ${BOLD}Open the dashboard:${RESET}"
echo -e " ${CYAN}http://localhost:8080${RESET}"
echo ""
echo -e " ${BOLD}Terminal toolkit:${RESET}"
echo -e " ${CYAN}python -m veridian.toolkit${RESET}"
echo ""
echo -e " ${BOLD}Quick commands:${RESET}"
echo -e " ${CYAN}python -m veridian.toolkit evaluate --score 0.78${RESET}"
echo -e " ${CYAN}python -m veridian.toolkit posture${RESET}"
echo -e " ${CYAN}python -m veridian.toolkit sign --data 'audit payload'${RESET}"
echo ""