> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tamery.app/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI overview

> The Tamery CLI runs SQL against saved connections, executes SQL files, and bridges the web app to local databases.

The Tamery CLI runs SQL against your saved connections, executes SQL files in scripts, and runs a local proxy so the web app can reach private databases.

## Install

Requires Node.js 20+.

```bash theme={null}
npm install -g tamery
```

The CLI checks for updates and tells you when a newer version is available.

## Authenticate

```bash theme={null}
tamery login
```

Opens the browser sign-in flow and saves your session locally. Over SSH or without a browser, use `--no-open` to print the URL instead:

```bash theme={null}
tamery login --no-open
```

The flow times out after 5 minutes. Check who you're signed in as with `tamery whoami`.

## Commands

<CardGroup cols={2}>
  <Card title="login" icon="arrow-right-to-bracket" href="/cli/commands#tamery-login">
    Sign in via browser.
  </Card>

  <Card title="logout" icon="arrow-right-from-bracket" href="/cli/commands#tamery-logout">
    Sign out and clear the session.
  </Card>

  <Card title="whoami" icon="circle-user" href="/cli/commands#tamery-whoami">
    Show the signed-in user.
  </Card>

  <Card title="query" icon="database" href="/cli/commands#tamery-query">
    Run SQL inline or from a file.
  </Card>

  <Card title="proxy" icon="plug" href="/cli/commands#tamery-proxy">
    Bridge the web app to private databases.
  </Card>
</CardGroup>

## Proxy

The web app connects to databases from the browser. For a database on localhost, a private network, or behind a firewall, run a local proxy:

```bash theme={null}
tamery proxy
```

The web app routes queries through your machine — credentials and traffic stay local. Stop it with <kbd>Ctrl</kbd>+<kbd>C</kbd>.

See the [command reference](/cli/commands) for all flags and examples.
