knowledge-genome-orchestrator/scripts/setup.sh

38 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/env bash
# =============================================================================
# scripts/setup.sh
# Main entry point for the Knowledge Genome framework initialization.
# Orchestrates dependency checks, master repo setup, and genome provisioning.
# =============================================================================
set -euo pipefail
# Resolve script directory and source core components
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${SCRIPT_DIR}" # All child scripts use relative paths from project root
source "${SCRIPT_DIR}/lib/output.sh"
source "${SCRIPT_DIR}/globals.env"
source "${SCRIPT_DIR}/registry.sh"
source "${SCRIPT_DIR}/lib/deps.sh"
step "Starting Knowledge Genome Setup"
# 1. Environment and Dependency Validation
info "Validating system dependencies..."
check_deps
check_git_identity
# 2. Master Repository Provisioning
info "Initializing Master Repository..."
bash "${SCRIPT_DIR}/scripts/setup-master.sh"
# 3. Genomes Provisioning (as defined in registry.sh)
info "Provisioning registered Genomes..."
bash "${SCRIPT_DIR}/scripts/setup-genomes.sh"
success "Setup process completed successfully!"
box "Next Steps:" \
"1. Navigate to master: cd ${WORK_DIR}/${MASTER_REPO}" \
"2. Secure your keys: Upload contents of ${KEYS_DIR} to Vaultwarden" \
"3. Start building: Add files to raw/articles/ and run your agents"