Skip to content

Databases

When parallel coding agents work on different branches, they often point at the same local database and collide on migrations. Runside finds PostgreSQL, PgBouncer, Redis, and MySQL instances across your computer, WSL2, and remote SSH servers so you can spot collisions early, browse schemas read-only, and save 1-click backups before running migrations.

Inside Workspaces, Runside checks each folder’s .env* files and active database sockets:

  • Secrets Stripped Immediately: Usernames, passwords, and query strings are removed during parsing so .env credentials never enter snapshots, logs, or MCP outputs.
  • Tunnel Resolution (via :localPort): If a local branch targets an SSH tunnel pointing to staging or production, Runside tags the pill with that remote environment.
  • SHARED Warnings: When two or more active folders point at the same database endpoint and database name, pills highlight SHARED so agents don’t overwrite each other’s schemas.
  • Workspace Consumers: Database Overview lists every active folder pointing at that database with 1-click jump back to the branch.

Runside Databases Split Workbench showing PostgreSQL server rail, logical databases, Keychain status, SHARED worktree consumers, and Snapshot DB

Open Databases in the sidebar to see a split view pairing a Database Servers rail with the inspector:

  • Servers & Logical Databases: Expand any server (PostgreSQL :5432, Redis :6379, MySQL :3306) to switch between discovered logical databases (acme_dev, billing_dev, Redis db0), or use the DB switcher in the inspector header.
  • Server Overview: Click a server header to compare all logical databases, connection counts, and blocked locks side by side.

Overview, Quick Queries & Read-Only Schema

Section titled “Overview, Quick Queries & Read-Only Schema”

Runside read-only PostgreSQL Schema inspector showing tables, columns, PK/FK constraints, indexes, and Copy Schema for AI

  • Overview: Shows engine version, active/max connections, Blocked locks highlights, disk/memory size, and a redacted connection URL with 1-click Copy .env URL.
  • Read-Only Schema / Keyspace: Browse Postgres/MySQL tables, columns, PK/FK constraints, indexes, and row estimates in a read-only transaction — or inspect Redis key prefixes, types, and TTL summaries without ever reading stored values. Click Copy Schema for AI / Copy Keyspace for AI to share structure with your agent.
  • Quick Query: Built-in read-only diagnostics for active connections, lock trees, largest tables, Redis slowlog, and MySQL processlists.
  • Open in External Tools: Use Open in ▾ in the header to launch psql / redis-cli / mysql in your terminal, open TablePlus / Beekeeper Studio / Postico, or open the process folder.

1-Click Pre-Migration Snapshots & Team Sync

Section titled “1-Click Pre-Migration Snapshots & Team Sync”

Before an agent runs migrations or seeds, click Snapshot DB in the header (or use Snapshots):

  • Native Backups: Uses pg_dump -Fc for PostgreSQL, redis-cli --rdb for Redis, and mysqldump --single-transaction for MySQL, storing timestamp, size, and Git branch metadata locally.
  • 1-Click Restore (Guarded): Click Restore next to any snapshot to roll back. Production machines block restores whenever Production Lock is enabled.
  • OS Keychain Storage: Click Auth / Keychain to store database credentials in your OS Keychain (macOS Keychain, Windows Credential Manager, or Linux Secret Service) — never in config.toml.
  • Shared S3 / R2 Team Snapshots: Add your bucket endpoint in Settings (⌘,) → Storage & Audit (or .runside.toml) and save keys + optional passphrase in OS Keychain (runside-s3). Archives are encrypted client-side before upload (see Configuration).

Runside detects user-started servers, Linux systemd services, and Docker/Podman containers without sudo across local OS, WSL2, and remote SSH probes (including Redis-compatible engines such as Valkey, Dragonfly, and KeyDB). Local and WSL2 databases connect directly over localhost, while remote SSH databases route inspections, queries, snapshots, and CLI handoffs over an active 127.0.0.1:<localPort> SSH tunnel.