Tamery CLI
Run the web app's queries on your own computer with tamery machine: localhost, private networks, SQLite and DuckDB files, and connections whose password stays with you.
tamery machine turns the computer it runs on into a machine: a place where the web app, or the desktop app on another computer, runs your connections. Use it for a database on localhost or a private network, a SQLite or DuckDB file, or a connection whose password Tamery's server doesn't have. The desktop app doesn't need it for its own computer: it already runs queries there.
Install
On macOS and Linux:
curl -fsSL https://tamery.app/cli/install.sh | sh
On Windows, in PowerShell:
irm https://tamery.app/cli/install.ps1 | iex
The script puts tamery in ~/.tamery/bin, adds that folder to your PATH, and prints the command to run next. To install a specific version, set TAMERY_VERSION, for example TAMERY_VERSION=1.2.0.
If you have Node.js, npm works too, and so do pnpm and Bun:
npm i -g tamery
The CLI runs on macOS (Apple silicon and Intel), Linux (x64 and arm64), and Windows (x64 and arm64). It needs neither Node.js nor any other runtime. On Alpine and other musl-based Linux, install libstdc++ first, for example apk add libstdc++.
Run the machine
-
Start the machine:
tamery machineThe first time, it opens the browser so you can sign in with the account you use in the web app. It then lists itself under Settings → Machines in every app signed in to your account, and opens that page.
-
Choose the machine under a connection's Runs on, or click Connect next to it in Settings → Machines. Tamery tries each address the machine listens at and uses the first one this browser reaches.
-
The app and the terminal running
tamery machineboth show a code. If they match, select Yes in the terminal and press Enter. This lets the browser run your connections on that computer, including ones that use its files, SSH keys or credentials. No is selected first, and no answer within 2 minutes counts as no.
Connections run only on machines your account lists, so the machine must be signed in to the same account.
Choose where a connection runs
While there is more than one place to run it, each connection has a Runs on choice, in its form, in its ⋯ menu on the connections page, and under the computer or cloud icon at the top of the window while it's open: Tamery Cloud in the web app, This computer in the desktop app, or one of your machines. The desktop app also offers Tamery Cloud for a connection the web app can reach: synced as Full, with a public host and no SSH tunnel. Use it when your database only lets in the cloud proxy's addresses, for example. Picking a database a machine found sets it to that machine. A change applies from the next run: every statement of a run that already started runs where it started. The choice is yours alone: in a shared workspace, every member picks where the connection runs for them, from the menu or the icon if they can't edit it, so nobody's queries go through your computer.
While a connection that runs on a machine is open, the computer icon also shows the machine's state: a green dot while it answers, red within 10 seconds of it stopping. Hover it for the reason.
If the machine stops, that connection's queries fail until you start it again. They never move to Tamery's cloud proxy on their own. To use the cloud proxy instead, for example while that computer is off, set Runs on back to Tamery Cloud. That works only for a connection the cloud proxy can reach: a public host, no SSH tunnel, and no files or credentials from that computer. It then connects from the cloud proxy's addresses.
Every machine in your account is listed there, connected or not. Picking one this browser isn't connected to yet connects it, with the same code check. Opening a connection whose machine you picked on another device asks you to connect it first.
The machine accepts only browsers signed in to the same account as the machine.
Your machines
Settings → Machines lists every machine signed in to your account, whether it's running, and which ones this browser is connected to. A browser can be connected to several machines at once. An allowed browser stays allowed when the machine restarts.
Disconnect makes the machine forget this browser, and so does signing out. The trash button removes a machine from your account and disconnects it; a machine that still runs shows up again. Connections set to run on a removed machine keep that choice and wait for it, until you pick another place under Runs on. To disconnect every browser at once, run tamery machine unpair-all. tamery logout removes the machine from your account.
The desktop app as a machine
The desktop app is a machine too, with no CLI. Once you sign in, it lists the computer in your account as <hostname> (desktop app), listening at http://127.0.0.1:26382, and keeps serving while Tamery runs, even with every window closed. On Windows and Linux, Tamery keeps running after its last window closes only while the MCP server is on, from the system tray. Settings → Machines shows it as This computer under Your machines. To stop it, click Turn off there. It stays off, also after you sign out and in again, until you click Turn on.
When a browser connects to it, the desktop app asks in a dialog whether to allow it, with the same code the browser shows. Don't Allow is the default. If Tamery has no window, not even one it opened in the background for an agent, the request is declined: open the desktop app and connect again.
Browsers on the same computer connect directly. To reach it from another computer, give it an address.
On this computer, Runs on shows a connection that another device runs on this machine as This computer. To run a connection here from your other devices, pick this machine under Runs on there, then leave it as This computer here.
The machine signs in with the desktop app's account and keeps its own copy of the secrets browsers send it, encrypted with a key in the system keychain. Signing out stops it, removes it from your account, and forgets the browsers it allowed and its address for your other computers.
Without a browser or terminal
On a server without a browser, open the sign-in link that tamery machine prints on your own computer. Then click Connect next to it in Settings → Machines. To reach it from another computer, see Reach a machine on another computer.
When the machine runs without a terminal to ask in, such as a service or a container, answer with tamery machine approve.
Which connections it runs
The machine runs only the connections saved in your account.
| Sync type | On the machine |
|---|---|
| Full | Runs right away. |
| No password | Asks once for the password and the other secrets that don't sync. |
| Metadata only | Asks once for the server details. |
Some connections use this computer's files or credentials: a SQLite or DuckDB file, a certificate file (such as sslkey or tlsCAFile), an SSH tunnel, or a MongoDB login with the computer's AWS, OIDC or Kerberos credentials. The machine runs them only once you allow them:
- Saved in this browser: already allowed.
- Saved by someone else: click Allow on Allow this connection on the machine.
- Edited since you allowed it, in anything but the database name and secrets: allow it again. A teammate can't point the machine at your files or credentials.
To try a new connection while paired, save it first. Only saved connections run on the machine.
SQLite and DuckDB paths, ~/ included, point to files on the machine's computer. The machine doesn't open files in app data folders, such as ~/Library, AppData or a folder in your home folder whose name starts with a dot, where browsers and other apps keep cookies and keys. It opens only regular files, never a device, pipe or folder, also for certificate and SSH key paths. A MongoDB login with the computer's AWS, OIDC or Kerberos credentials runs on the machine only for MongoDB Atlas, over TLS that checks the certificate against the system's authorities. Open other connections like these in the desktop app. The first DuckDB file downloads DuckDB for the machine, once. A DuckDB query through the machine reads only its own file, never other files or URLs. SSH tunnels open there too, with its SSH keys, agent and ~/.ssh/config. When an SSH host isn't in that computer's known_hosts, the web app shows its key fingerprint and asks whether to trust it. Trust and Connect adds it to ~/.ssh/known_hosts on the machine's computer, and Cancel doesn't connect.
The machine reaches databases and files with the rights of the system user that runs it. On a shared server, run it as a user with no more access than it needs.
A query that runs longer than about 4 minutes fails.
The machine also tells the web app what that computer has, as the desktop app does for its own:
- New connection lists the databases it finds there: running Docker containers, and connections saved in DBeaver, TablePlus, DataGrip, pgAdmin,
pg_service.conf,.pgpassormy.cnf. Picking one fills the form. A password saved with it for a database on that computer, without an SSH tunnel, never reaches the browser: the machine keeps it for the connection you save and uses it for every app you allowed on that machine. The password never leaves that machine, so another place that can run the connection may ask you for it. For a database elsewhere, such as a server behind a VPN, or a password kept in the macOS Keychain, type the password. - The AI chat's / menu lists your agent skills and commands from that computer's home folder.
Manage connections
tamery connection creates, updates and deletes the connections in your account from the terminal. Changes show up in the app like changes made there. A connection you create with the CLI keeps its details on that computer, so once its Runs on names that computer's machine, it runs there without any more questions. A Metadata only one is the exception in the web app: each browser asks for its server details once, as for any Metadata only connection. CLI commands lists the flags.
In a script, without a terminal, tamery connection and tamery query never start signing in: they fail with Not signed in instead, so run tamery login on that computer first.
tamery query runs a statement on a connection from the terminal and prints the rows as a table, JSON or CSV. It only reads unless you pass --write, so it suits scripts and coding agents that run shell commands. See tamery query.
Where secrets are stored
If this browser already has the secrets the machine needs, it sends them on its own. Otherwise the web app opens the connection form on the missing fields. What you enter is saved in this browser and sent to the machine once.
The machine encrypts secrets with a key in the system keychain: the macOS Keychain, Windows Credential Manager, or the Secret Service on Linux. A Linux server often has no keychain. There the key goes into ~/.config/tamery/machine.key, readable only by your user, and the machine warns on every start that file permissions are all that protect it. A computer you sign in to over SSH keeps the key in that file too, since a keychain prompt there would open on its own screen, where you can't answer it. Set TAMERY_CONFIG_DIR to keep these files somewhere other than ~/.config/tamery.
If Tamery's servers can't be reached, connections the machine ran since it started keep working, and so do connections whose details you entered or allowed on it. After a restart, other connections wait for the servers.
Usage data
The CLI sends usage events to Tamery once you sign in, linked to your account, like the app does: signing in and out, starting the machine and answering its questions, updates, and the tamery connection and tamery query commands. They carry the engine, the sync type, counts and whether a command worked, never names, connection strings, SQL or data. To turn them off, set DO_NOT_TRACK=1.
Browser support
| Browser | Support |
|---|---|
| Chrome, Edge, Brave, Arc | Supported. The first Connect asks for permission to access devices on your local network. Allow it. |
| Firefox | Supported, with the same local network prompt. |
| Safari | Can't reach http://127.0.0.1. Use the desktop app, or give the machine an HTTPS address. |
If you blocked the prompt, allow local network access for the web app in the browser's site settings and reload.
Update
tamery update
Then restart the machine. tamery update installs the latest version the same way you installed the CLI. CLI commands covers what it does when something is in the way.
When it starts, tamery machine checks for a newer version and tells you to run tamery update when there is one. Settings → Machines shows the update too. When the web app needs a newer machine, it stops sending queries to it and shows the update there.