#!/usr/bin/env bash # Run a house-tracker script against prod with the limited house_cli role # (house.listings + house.price_history only), without the app's credentials. # scripts/house-db.sh list --city gouda # scripts/house-db.sh add --street "Raam 12" --city Gouda --price 1475 # Credentials: ~/.config/house-cli.env (DB_URL=..., mode 600, readable by stan only). set -euo pipefail cd "$(dirname "$0")/.." env_file="${HOUSE_CLI_ENV:-$HOME/.config/house-cli.env}" [ -r "$env_file" ] || { echo "missing $env_file" >&2; exit 1; } unset DATABASE_URL DB_URL exec bun --env-file="$env_file" scripts/house-listing.ts "$@"