#!/usr/bin/env bash # Launcher for macOS/Linux: the window by default, ./run.sh --cli for the # terminal version. Starts in the directory you ran it from, so that is # the working directory Bolt's commands and relative paths use. set -euo pipefail ROOT="$(cd "$(dirname "$0")" && pwd)" if [ ! -d "$ROOT/.venv" ]; then python3 -m venv "$ROOT/.venv" "$ROOT/.venv/bin/pip" install --upgrade pip "$ROOT/.venv/bin/pip" install -r "$ROOT/requirements.txt" fi export PYTHONPATH="$ROOT${PYTHONPATH:+:$PYTHONPATH}" exec "$ROOT/.venv/bin/python" -m bolt_console "$@"