Skip to content

feat(commands): add ddev tablepro global host command - #8580

Merged
stasadev merged 3 commits into
ddev:mainfrom
datlechin:add-tablepro-host-command
Jul 18, 2026
Merged

stasadev merged 3 commits into
ddev:mainfrom
datlechin:add-tablepro-host-command

Conversation

@datlechin

Copy link
Copy Markdown
Contributor

The Issue

TablePro is a native macOS database client. DDEV ships host commands for TablePlus, Sequel Ace, Querious, DBeaver and HeidiSQL, but not for TablePro, so there is no ddev tablepro.

This matters because DDEV assigns the database a new host port on every ddev start, so a saved connection in the GUI goes stale. The host command is what reads DDEV_HOST_DB_PORT each time.

How This PR Solves The Issue

Adds pkg/ddevapp/global_dotddev_assets/commands/host/tablepro, modeled on the existing tableplus command:

  • Starts the project if it is not running, using the same no_recursion re-exec pattern as the other host commands.
  • Builds mysql:// or postgres:// from DDEV_DATABASE_FAMILY and DDEV_HOST_DB_PORT, with DDEV's db:db@.../db credentials.
  • Passes name=ddev-${DDEV_SITENAME} so the connection is labeled per project in the GUI.
  • Opens with open -b com.TablePro, targeting TablePro by bundle ID. That matters because TablePlus also registers as a handler for mysql:// and postgres://, and would otherwise win when both apps are installed.

Gated by ## OSTypes: darwin and ## HostBinaryExists: /Applications/TablePro.app, so the command only appears for macOS users who have TablePro installed.

TablePro parses these URLs already, including the name parameter, so no changes are needed on its side for this to work.

Docs updated in the same places the other database GUI commands are listed (commands.md, cli.md, database-management.md, developer-tools.md), plus the spellcheck wordlist.

Manual Testing Instructions

With TablePro installed in /Applications:

cd ~/some-ddev-project
ddev tablepro

TablePro opens on the project database. Works for both MySQL/MariaDB and PostgreSQL projects. Stop the project first to check that the command starts it and then connects.

Automated Testing Overview

None. This matches the other GUI launcher host commands, which have no automated tests because they require a GUI app installed on the host.

Related Issue Link(s)

Release/Deployment Notes

None. The command is additive and only surfaces when /Applications/TablePro.app exists.

@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

@tyler36 tyler36 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One first glance, looks OK to me.
I'm on WSL2 so unable to confirm the command functions as expected.

Test

Command fails on WSL2, as expected.

$ ddev tablepro
Command 'tablepro' cannot be used with your OS, skipping /home/user47/.ddev/commands/host/tablepro
Error: unknown command "tablepro" for "ddev"

@datlechin

Copy link
Copy Markdown
Contributor Author

Hi @tyler36, thanks for taking a look!

Yes, tablepro is macOS only, since TablePro is a native macOS app. The script is already gated with ## OSTypes: darwin (plus ## HostBinaryExists: /Applications/TablePro.app), so on WSL2 it correctly refuses to run. The failure you saw is the expected behavior.

@rfay

rfay commented Jul 16, 2026

Copy link
Copy Markdown
Member

Thanks for getting this in. For the future, please use the "rebase" option under update, as it makes your PR more maintainable. In this simple PR it may not make any difference, but it sure helps if you do it that way.

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good, thanks!
I manually tested with mysql:8.4 and postgres:17

It looks like a great tool too!

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@stasadev stasadev changed the title feat: add ddev tablepro host command for TablePro feat(commands): add ddev tablepro global host command Jul 18, 2026
@stasadev
stasadev merged commit 002e134 into ddev:main Jul 18, 2026
45 of 46 checks passed
@datlechin
datlechin deleted the add-tablepro-host-command branch July 18, 2026 10:44
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in the v1.25.4 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants