← all conversations

Sovereign System Setup

2026-06-064 turns8,703 charsgpt-5-5
sovereign-computingmacos-setupshell-scripting

Summary

The user wants to create install and uninstall shell scripts for setting up a sovereign system on a MacBook Air based on Daniel Kliever's guidelines.

Messages

according to danielkliewer.com I want to set up a general purpose sovereign system to use on a macbook air and I want you to create a .sh script to accomplish this for me
Based on your SOVEREIGN posts, the minimum viable "sovereign system" on a MacBook Air is: - Local inference with Ollama - Local embeddings with nomic-embed-text - ChromaDB for vector memory - Neo4j for graph memory (optional) - Python environment - Local document storage - Audit logs - No cloud dependencies - A reproducible local workspace This script follows the philosophy described in **"SOVEREIGN: The Unified Architecture"** and **"Synthetic Intelligence"** by entity["people","Daniel Kliewer","Author of danielkliewer.com"]. It installs the core infrastructure rather than the entire reference implementation. citeturn0search0turn0search2 ### sovereign-bootstrap.sh ```bash #!/bin/bash set -e echo "===========================================" echo " SOVEREIGN MACBOOK AIR BOOTSTRAP" echo "===========================================" # -------------------------------------------------- # Homebrew # -------------------------------------------------- if ! command -v brew &> /dev/null; then echo "[+] Installing Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi echo "[+] Updating Homebrew..." brew update # -------------------------------------------------- # Core Packages # -------------------------------------------------- echo "[+] Installing dependencies..." brew install \ git \ python \ node \ ollama \ wget \ jq \ tmux # -------------------------------------------------- # Python Environment # -------------------------------------------------- mkdir -p ~/SOVEREIGN cd ~/SOVEREIGN python3 -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install \ chromadb \ networkx \ neo4j \ fastapi \ uvicorn \ pydantic \ requests \ sentence-transformers \ spacy \ pyyaml \ markdown \ pypdf \ python-docx \ aiofiles \ websockets python -m spacy download en_core_web_sm # -------------------------------------------------- # Directory Structure # -------------------------------------------------- echo "[+] Creating sovereign filesystem..." mkdir -p \ data/documents \ data/chromadb \ data/graph_snapshots \ logs/execution_traces \ logs/persona_evolution \ config/personas \ bank/documents \ bank/vectors \ bank/graph \ bank/index \ bank/metadata \ scripts # -------------------------------------------------- # Chroma Initialization # -------------------------------------------------- python <<EOF import chromadb client = chromadb.PersistentClient(path="data/chromadb") print("ChromaDB initialized") EOF # -------------------------------------------------- # Ollama # -------------------------------------------------- echo "[+] Starting Ollama..." brew services start ollama sleep 5 echo "[+] Pulling local models..." ollama pull llama3.2 ollama pull qwen3:8b ollama pull nomic-embed-text # -------------------------------------------------- # Configuration # -------------------------------------------------- cat > config/sovereign.yaml <<EOF sovereign: version: "1.0.0" environment: "local" inference: provider: ollama endpoint: http://localhost:11434 models: general: llama3.2 coding: qwen3:8b embeddings: nomic-embed-text memory: vector_store: chromadb path: ./data/chromadb logging: audit_path: ./logs EOF # -------------------------------------------------- # Simple Health Check # -------------------------------------------------- echo "[+] Running health checks..." curl -s http://localhost:11434/api/tags >/dev/null echo "" echo "===========================================" echo " SOVEREIGN INSTALLED" echo "===========================================" echo "" echo "Workspace:" echo " ~/SOVEREIGN" echo "" echo "Models:" echo " llama3.2" echo " qwen3:8b" echo " nomic-embed-text" echo "" echo "Ollama:" echo " http://localhost:11434" echo "" echo "Chroma:" echo " ./data/chromadb" echo "" echo "Documents:" echo " ./data/documents" echo "" echo "You own the inference." echo "You own the memory." echo "You own the machine." echo "" ``` ### Usage Save as: ```bash sovereign-bootstrap.sh ``` Make executable: ```bash chmod +x sovereign-bootstrap.sh ``` Run: ```bash ./sovereign-bootstrap.sh ``` For a MacBook Air (especially Apple Silicon), I'd also recommend adding: - urlOllamahttps://ollama.com - urlOpen WebUIhttps://openwebui.com - urlNeo4jhttps://neo4j.com - urlChromaDBhttps://www.trychroma.com to create a complete local-first workstation resembling the architecture described in SOVEREIGN, with local chat, RAG, graph memory, document ingestion, and agent workflows. citeturn0search0turn0search1
gpt-5-5
write an uninstall script as well for this
A clean uninstall script should reverse everything the bootstrap script created: - Stop Ollama - Remove downloaded models - Remove Homebrew services - Remove the `~/SOVEREIGN` workspace - Optionally uninstall packages that were installed specifically for SOVEREIGN - Leave unrelated user data alone I recommend making it interactive so you don't accidentally destroy data. ```bash #!/bin/bash set -e echo "===========================================" echo " SOVEREIGN UNINSTALLER" echo "===========================================" echo "" read -p "Remove entire ~/SOVEREIGN workspace? (y/N): " REMOVE_WORKSPACE read -p "Remove Ollama models? (y/N): " REMOVE_MODELS read -p "Uninstall Ollama? (y/N): " REMOVE_OLLAMA read -p "Uninstall supporting Homebrew packages? (y/N): " REMOVE_BREW echo "" echo "Beginning cleanup..." echo "" # -------------------------------------------------- # Stop Services # -------------------------------------------------- if command -v brew >/dev/null 2>&1; then echo "[+] Stopping Ollama service..." brew services stop ollama 2>/dev/null || true fi # -------------------------------------------------- # Remove Models # -------------------------------------------------- if [[ "$REMOVE_MODELS" =~ ^[Yy]$ ]]; then echo "[+] Removing local models..." if command -v ollama >/dev/null 2>&1; then ollama rm llama3.2 2>/dev/null || true ollama rm qwen3:8b 2>/dev/null || true ollama rm nomic-embed-text 2>/dev/null || true fi rm -rf ~/.ollama/models 2>/dev/null || true fi # -------------------------------------------------- # Remove Workspace # -------------------------------------------------- if [[ "$REMOVE_WORKSPACE" =~ ^[Yy]$ ]]; then echo "[+] Removing workspace..." rm -rf ~/SOVEREIGN fi # -------------------------------------------------- # Remove Ollama # -------------------------------------------------- if [[ "$REMOVE_OLLAMA" =~ ^[Yy]$ ]]; then echo "[+] Uninstalling Ollama..." brew uninstall ollama 2>/dev/null || true rm -rf ~/.ollama fi # -------------------------------------------------- # Remove Brew Packages # -------------------------------------------------- if [[ "$REMOVE_BREW" =~ ^[Yy]$ ]]; then echo "[+] Removing supporting packages..." brew uninstall \ wget \ jq \ tmux \ node \ python \ git 2>/dev/null || true fi # -------------------------------------------------- # Cleanup # -------------------------------------------------- echo "[+] Removing caches..." rm -rf ~/Library/Caches/pip 2>/dev/null || true rm -rf ~/.cache/chroma 2>/dev/null || true # -------------------------------------------------- # Summary # -------------------------------------------------- echo "" echo "===========================================" echo " UNINSTALL COMPLETE" echo "===========================================" echo "" echo "Remaining items that may still exist:" echo " ~/.ollama" echo " ~/Library/Application Support/Ollama" echo " Homebrew itself" echo "" echo "To completely remove Homebrew:" echo "" echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"' echo "" echo "SOVEREIGN infrastructure removed." ``` If you're building a true "sovereign workstation," I'd actually create three scripts: ```text install.sh update.sh uninstall.sh ``` Where: - `install.sh` builds the environment from scratch. - `update.sh` updates Homebrew packages, Python dependencies, and Ollama models. - `uninstall.sh` removes everything safely. That gives you a reproducible infrastructure lifecycle similar to how cloud environments are managed, but entirely on your MacBook Air.
gpt-5-5