open "mysql://…" goes to whichever app claims the mysql:// scheme, and with another database
client installed that may not be TablePro. Name TablePro instead, either by bundle identifier or
through the tablepro command:
tablepro with no argument opens the app and nothing else.
Add the tablepro command to your PATH
The command ships inside the app atTablePro.app/Contents/SharedSupport/bin/tablepro. It runs
query and connections itself and hands anything else to open -b com.TablePro. Link it into
/usr/local/bin once:
sudo asks for your password in Terminal. TablePro itself never writes outside its own folders and
never asks for an administrator password. Settings > General > Command Line prints the same line
with the path of the copy you are running, and reads Linked once the link is in place. Any other
directory on your PATH works too, and one you own needs no sudo.


The Command Line section in Settings > General
sudo rm /usr/local/bin/tablepro. The link follows the app, so updating TablePro
updates the command; move the app and the link needs making again.
Open a file
Files route the same way, whether double-clicked in Finder or passed on the command line:.sql,.psqland.pgsqlopen in a query tab on the current connection. A window already holding that file comes to front. With no connection open, the file waits until you connect.- Database files open a connection to the file itself and save nothing:
.db,.db3,.s3db,.sl3,.sqlite,.sqlite3and.sqlitedbopen with SQLite,.duckdband.ddbwith the DuckDB plugin. A window already connected to that file comes to front instead of a second one opening.
Run a query
--connection takes a saved connection’s name or its id, and tablepro connections lists both. The
SQL comes from the argument, from -f <file>, or from standard input. Rows go to standard output,
messages and errors to standard error.
Pass
--format in a script rather than relying on the terminal check. A result cut short by
--limit says so on standard error.
Output formats
Every value is text, as in the grid. Binary columns come out as Base64. Two columns with the same
name become
name and name_2 in JSON.
Pair the command
The command reaches TablePro through its MCP server, so turn on Enable MCP Server under Settings > MCP first. With it off, every run exits 3. When TablePro is not running, the command starts it in the background, with no window.1
Run any query in Terminal
TablePro asks Allow tablepro command to access TablePro?
2
Choose what the command may do
The sheet starts at Read Only. Pick Read & Write if your scripts write, and limit the
connections or set an expiry if you want.
3
Approve
Your browser opens a page saying the command is paired. Close it. The query you ran continues.
What a query may do
A query clears the same gates as any MCP client:- The connection’s External Clients level: Blocked hides it, Read Only refuses writes.
- A connection whose AI policy is Never is refused.
- The first query on each connection asks you, as often as Approval under Settings > MCP says.
- Safe Mode confirms or authenticates writes on your Mac.
DROPandTRUNCATEare refused. Run them in TablePro.- One statement per run. A SQL Server script runs batch by batch at its
GOlines and prints every result set, separated by a blank line, or in JSON as one array per result set.
List connections
name, id and type, never a host, user or password. The list
leaves out connections the command may not reach.
Trusting a link
The first time a link connects, TablePro asks: Open External Database Connection?, showing the host, user and database. This is what stops a web page from opening a connection behind your back. For a database on your own machine (localhost, 127.0.0.1, ::1, or any 127.x.x.x address) the
alert adds Always Allow. Choose it and that database stops asking, which is what makes
ddev tablepro a one-step command. Trust is keyed on database type, host,
database name, user and the URL’s name parameter, not the port, so a tool that picks a new port on
each start stays trusted.


The confirmation alert for an external database link
A link to a remote host asks every time. Only a database on this machine can be trusted.
?query=, ?condition= or ?raw=) confirms the filter, and a connection with a pre-connect script
shows the script.
