CLI commands
Every tamery command and its flags.
tamery --help or tamery <command> --help shows help in your terminal. tamery --version prints the version.
Once a day the CLI checks npm for a newer version and tells you when there is one.
tamery login
tamery login
Opens the browser, where you confirm the sign-in, and saves your session locally. The link is printed too, in case the browser opens somewhere you are not looking. It expires after 5 minutes.
| Flag | Use |
|---|---|
--no-open | Only print the sign-in link. Useful over SSH. |
--force, -f | Sign in again, for example to switch accounts. |
Without --force, signing in while you already are just tells you so.
The session lives in ~/.config/tamery/cli.json, readable only by you.
tamery logout
tamery logout
Signs the CLI session out on our side and removes it from your computer.
tamery whoami
tamery whoami
Shows which account is signed in. If the session has expired, it clears it and asks you to sign in again.
tamery query
Run SQL against a connection saved in the app:
tamery query --list-connections
tamery query -c my-db "SELECT 1 AS hello"
tamery query -c my-db --file ./report.sql
tamery query -c my-db --json "SELECT 1 AS hello"
| Flag | Use |
|---|---|
--connection, -c | Connection name or ID. Not needed if you have only one. Names must match exactly; use the ID if two share a name. |
--file, -f | Read SQL from a file instead of the argument. |
--json | Print rows as JSON instead of a table. |
--list-connections | List the connections you can use and exit. |
The CLI prints every row it gets back. There is no row limit, so add one to the SQL when the table is large.
The CLI needs the full connection string from sync, secrets included:
- Full connections work.
- No password connections arrive without their password, SSH secrets, SSL key passphrase, or access token, so most won't connect.
- Metadata only connections don't show up at all.
SSH tunnels need the desktop app. SQLite paths, ~/ included, point to files on the computer running the command.
SQL runs against the database exactly as written, writes included. The CLI does not ask for confirmation the way the app does.
tamery proxy
tamery proxy
Lets the web app reach localhost, private networks, and SQLite files through this computer. Run tamery login first, with the same account you use in the browser. The web app finds the proxy on its own within 10 seconds.
While the proxy runs, the web app sends queries through it, not only for local databases. That also makes No password connections usable in the browser once you enter the password.
Your queries go from your machine straight to the database. The proxy still needs the internet to check your Tamery session, and it refuses a browser signed in to a different account.
It listens on 127.0.0.1:26380. Stop it with Ctrl+C.