--- title: 'CLI commands' sidebarTitle: 'Commands' description: 'Every tamery command and its flags.' keywords: ['reference', 'options', 'arguments', 'usage', 'login', 'add', 'remove'] --- `tamery --help` (`-h`) lists the commands, and `--help` after a command, such as `tamery bridge --help`, shows its options and subcommands. `tamery --version` (`-v`) prints the version. ## tamery login ```bash tamery login ``` Opens the browser to sign this computer in to your Tamery account, and prints the link too. The link expires after 5 minutes. Confirm only if you started signing in yourself. After you confirm in the browser, the CLI saves the session encrypted with a key in the system keychain. If the keychain is locked, it may open its own unlock dialog, and the CLI waits until you answer it. If the computer is already signed in, it prints the account. To switch accounts, run `tamery logout` first. Signing in to a different account removes the secrets and paired browsers saved for the old one. ## tamery whoami ```bash tamery whoami ``` Prints the account this computer is signed in to, or says it isn't signed in and exits with code 1. ## tamery bridge ```bash tamery bridge ``` Lets the web app run your connections on this computer until you press **Ctrl+C**. If the computer isn't signed in yet, it signs in first, as `tamery login` does. [Tamery CLI](/cli/overview#run-the-bridge) walks through pairing. It prints the account, the address it listens on and a link to connect a browser. When a browser clicks **Connect**, it asks you whether to allow it. It also reports requests it refused because of a wrong host or origin. | Flag | Use | | --- | --- | | `--port ` | Listen on another port. The default is `26380`. | | `--public-url ` | The HTTPS address a tunnel or reverse proxy on this computer serves the bridge at. See [Reach a bridge on another computer](/cli/remote). | If the port is taken, usually by another bridge, it says so and exits. Stop the other one or pass `--port`. ## tamery bridge approve ```bash tamery bridge approve ``` Answers for a bridge that runs without a terminal to ask in, such as a service, a container or a detached session. When `tamery bridge` runs in a terminal you can see, the question appears there instead. 1. Keep the bridge running. 2. On the same computer, run `tamery bridge approve`. It waits for a browser. 3. In the web app, click **Connect** in **Settings → Bridge**. 4. Answer the question in the `approve` terminal. The order of steps 2 and 3 doesn't matter, as long as you answer within 2 minutes of clicking **Connect**. At most 3 requests wait at a time; more are declined. ## tamery bridge unpair-all ```bash tamery bridge unpair-all ``` Disconnects every paired browser, also from a bridge that is already running. Each one needs to be allowed again. Saved secrets stay. ## tamery connection list ```bash tamery connection list ``` Prints every connection in your workspaces with its id, name, engine and label, newest first. The other `tamery connection` commands take either the id or the name. When two connections share a name, pass the id. ## tamery connection create ```bash tamery connection create --name "Orders" --label prod ``` Asks for the connection string, tests it and saves the connection in your default workspace. The string is never a flag, so the password stays out of your shell history. To pass it from a script, pipe it in: ```bash echo "$DATABASE_URL" | tamery connection create --name "Orders" ``` | Flag | Use | | --- | --- | | `--name ` | The connection's name. Without it, the name is the host and the database the string names, such as `db.example.com:5432/orders`, or the file name for SQLite. | | `--label