diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-27 23:23:43 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-27 23:23:43 +0000 |
| commit | 7519de4e56323230d06cfc64b00df52339eb2434 (patch) | |
| tree | 87712be5ef45a6913601e729c18a67c20fee9f09 /modes/db.sh | |
Add modal-shell project with .agent/ config, mode stubs, ms dispatcher,
bare repo at /site/git.terst.org/repos/modal-shell.git, and ADR-001.
Diffstat (limited to 'modes/db.sh')
| -rwxr-xr-x | modes/db.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modes/db.sh b/modes/db.sh new file mode 100755 index 0000000..75c4833 --- /dev/null +++ b/modes/db.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# db — open an interactive database shell with project credentials +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=base.sh +source "$SCRIPT_DIR/base.sh" + +# ── TODO: uncomment and configure for your database ────────────────────────── + +# PostgreSQL +# exec psql "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_NAME" + +# MySQL / MariaDB +# exec mysql -h "$DB_HOST" -P "$DB_PORT" -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" + +# SQLite +# exec sqlite3 "$PROJECT_ROOT/db.sqlite3" + +# Redis +# exec redis-cli -h "$DB_HOST" + +echo "error: no database configured in modes/db.sh" >&2 +exit 1 |
