-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup.sh
More file actions
executable file
·36 lines (30 loc) · 1.17 KB
/
Copy pathstartup.sh
File metadata and controls
executable file
·36 lines (30 loc) · 1.17 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
#!/usr/bin/env bash
# Bootstrap SAGE: venv + editable install (Linux / macOS).
# Installs runtime + dev tools + optional Textual TUI (`sage tui`).
# Usage: ./startup.sh OR bash startup.sh
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT"
PYTHON="${PYTHON:-python3}"
if ! command -v "$PYTHON" >/dev/null 2>&1; then
echo "[SAGE] ERROR: '$PYTHON' not found. Install Python 3.10+ or set PYTHON=/path/to/python3" >&2
exit 1
fi
if [[ ! -d .venv ]]; then
echo "[SAGE] Creating .venv with $PYTHON ..."
"$PYTHON" -m venv .venv
fi
# shellcheck source=/dev/null
source .venv/bin/activate
python -m pip install -U pip wheel setuptools
python -m pip install -e ".[dev,tui]"
echo ""
echo "[SAGE] OK — virtualenv ready at $ROOT/.venv"
echo " source .venv/bin/activate"
echo " sage doctor"
echo " sage # interactive shell (prompt_toolkit)"
echo " sage tui # full-screen UI (Textual)"
echo ""
echo "Optional: export SAGE_REPO_URL=https://github.com/your-org/your-fork"
echo " (so /help and /commands show correct doc links)."
echo "Textual-only install: pip install -e \".[tui]\" (if you skipped dev extras)"