Skip to content

feat(import): import connections from Beekeeper Studio#1320

Merged
datlechin merged 3 commits into
mainfrom
feat/beekeeper-import
May 18, 2026
Merged

feat(import): import connections from Beekeeper Studio#1320
datlechin merged 3 commits into
mainfrom
feat/beekeeper-import

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

Adds Beekeeper Studio as a 4th source for the Import from other apps flow, alongside TablePlus, Sequel Ace, and DBeaver.

What it does

  • Detects Beekeeper Studio via LaunchServices (bundle id `io.beekeeperstudio.desktop`), so a fresh install is recognized even before the user opens it.
  • Reads `~/Library/Application Support/beekeeper-studio/app.db` (SQLite) via the built-in SQLite3 C library, read-only, no journal files written.
  • Imports the local workspace only (`workspaceId = -1`). Cloud-synced workspaces require a Beekeeper Cloud account and have their own source of truth.
  • Maps the connection_folder hierarchy to TablePro groups.
  • Maps SSH config including bastion (jump host) — first importer to populate `ExportableSSHConfig.jumpHosts`.
  • Decrypts saved passwords using Beekeeper's two-tier key scheme.

Driver coverage

MySQL, MariaDB, PostgreSQL, Redshift, CockroachDB, SQLite, SQL Server, Oracle, MongoDB, Redis, Cassandra, ClickHouse, BigQuery, DuckDB, libSQL.

Beekeeper's Snowflake / Trino / Firebird / SQL Anywhere / SurrealDB connections are skipped with a warning since TablePro has no driver for them.

Password decryption

`BeekeeperEncryptor` re-implements the `simple-encryptor` Node.js format Beekeeper uses (AES-256-CBC, SHA-256-derived key, IV-per-record, plaintext is JSON):

  1. Read `~/Library/Application Support/beekeeper-studio/.key`
  2. Decrypt with Beekeeper's hardcoded bootstrap key to get the per-install user key
  3. Use the user key to decrypt each password column

No keychain prompts (Beekeeper stores everything in its data directory).

Test plan

  • Install Beekeeper Studio, do not open it → appears as available in the import dialog
  • With Beekeeper connections (any driver TablePro supports): all show in preview
  • With Include passwords on: passwords arrive populated in the new connections
  • With Snowflake/Firebird/etc. in Beekeeper: those rows are skipped, the rest import cleanly
  • Connection folder names map to TablePro groups
  • SSH connection with bastion: jumpHost is preserved
  • SSL connection: cert paths preserved

datlechin added 3 commits May 18, 2026 15:38
…subtitle, encryptor tests

- BeekeeperStudioImporter: open the SQLite database once per import and
  pass the handle to readSavedConnections and readConnectionFolders
  instead of opening it twice
- BeekeeperStudioImporter: check Task.checkCancellation() in the
  per-row loop so a long import can be aborted
- ExportableConnection: extract displaySubtitle so the SQLite/DuckDB
  file-path handling lives in one place; ConnectionImportPreviewList
  and WelcomeWindowView both use it now
- BeekeeperEncryptor: add decryptDictionary typed wrapper, document why
  HMAC verification is skipped, and add a source-of-truth comment on
  the driver map
- BeekeeperEncryptorTests: round-trip simple-encryptor payloads against
  the helper (string + dictionary), wrong-key rejection, malformed
  payload rejection
@datlechin datlechin merged commit e7f31e9 into main May 18, 2026
2 checks passed
@datlechin datlechin deleted the feat/beekeeper-import branch May 18, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant