query and export write to standard output.
Set up
The command ships with the app. Choose the form for your installation:tablepro. For Flatpak, replace it with flatpak run app.tablepro.TablePro. --version prints the app version.
Before querying, open the app and turn on Preferences > MCP > Enable MCP Server. Commands never start the app. Each run reads the access token from the app’s keyring, so there is no pair or unpair command. Use the command from the same installation as the running app; native and Flatpak installations have separate token storage.
Open files and links
-n (--new-window) requests a new window.
tablepro open <target> also opens a file or URL. Use tablepro open tables or tablepro ./tables for an existing file named like a command. A word that is neither an existing file nor a URL exits 2.
Links always need consent. See Connection links for schemes and prompts.
Run a query
-f (--file), or on standard input. -f - reads from a terminal until Ctrl+D. For a file outside the Flatpak sandbox’s access, redirect standard input from your host shell.
Put SQL beginning with a dash after --:
There is no
--schema option on query. Qualify names in SQL, such as public.orders. A result cut short prints a message on standard error. The limit bounds returned rows, not how many rows a write changes.
Open the connection
Commands use connections open in the app. With standard error attached to a terminal, a command opens a closed connection and waits up to five minutes. Answer any password prompt in the app. Without that terminal, a closed connection exits 1. Open it before starting an unattended script. Waiting for a connection that never opens also exits 1.Browse a connection
-c is short for --connection. Pass a saved connection’s name or id. If a name matches several connections, use an id from connections.
All five commands accept --format. For describe, use --ddl to print the CREATE statement instead; it cannot be combined with --format.
As with query, --database selects only a database already open beside the connection. Omit --schema to use the connection’s default schema.
Export
--format is required: choose csv, json or sql. SQL produces INSERT statements in the engine’s dialect. Pass table names without SQL quotes; use shell quotes for spaces and --schema for the schema. --database follows the same rule as query.
The query row limit also applies to each exported table. Set --limit to change it. A call accepts up to 20 tables, and standard error names any table cut short. For more rows, use Export Rows… in the app.
Check status
Shell completion
The .deb and .rpm packages install bash, zsh and fish completions. Open a new shell after installing. For zsh, enable completion in~/.zshrc if it is not already enabled:
tablepro completion bash, tablepro completion zsh and tablepro completion fish print scripts for a command named tablepro. These complete commands, options and format names, without looking up connection names.
Output formats
Rows go to standard output. Errors, notices and truncation messages go to standard error. For queries, browse commands andstatus, the default is table when standard output is a terminal and csv otherwise. Set --format in scripts to choose it explicitly.
Several result sets become an array of arrays in JSON, consecutive objects in JSONL, or blocks separated by a blank line in the other formats. Repeated column names get numbered JSON keys, such as
id and id_2.
JSON preserves the value types returned by the server, including numbers and booleans.
Exit status
A pipe closed by its reader, such as
| head, exits 0.
What a query may do
A connection’s External Clients setting applies to every command that uses it. Blocked hides the connection; naming it exits 2. Read Only is the default and refuses writes. With Read & Write, each write still needs Run in the connection’s window. Safe Mode also applies; Read-Only refuses writes.--read-only refuses a write before it asks for approval.
Send one statement, or one SQL Server batch, per query. The SQL text is limited to 100 KiB. A transaction left open by a write is rolled back when that call ends.
Connection links
The desktop registers these schemes for links from browsers and other apps. They also work as command arguments.
A
jdbc: wrapper around a supported connection URL works from the command line, but has no desktop scheme registration.
A link matching a saved connection asks before opening it. Click Open to continue; Enter and Escape cancel. Other links fill the connect dialog. Review the fields and click Connect; a successful connection is saved.
A URL password fills the Password row. The full link is never logged or shown. There is no saved trust choice: local links need consent too.
