---
title: CLI
description: 'The anyrow command line: every endpoint from a terminal or a script, as JSON, YAML or a table.'
url: https://anyrow.ai/docs/cli
canonical_url: https://anyrow.ai/docs/cli
last_updated: '2026-10-16'
---

# CLI

`anyrow` calls every endpoint of the API from a terminal. It prints JSON by default, so its
output pipes into `jq` and scripts; `--output table` reads better by eye.

## Install

```bash title="Homebrew"
brew install anyrow/tap/anyrow
```

```bash title="Scoop"
scoop bucket add anyrow https://github.com/anyrow/scoop-bucket
scoop install anyrow
```

```bash title="Snap"
sudo snap install anyrow
```

Linux packages (`.deb`, `.rpm`, `.apk`) and binaries for macOS, Linux and Windows are on the
[releases page](https://github.com/anyrow/cli/releases). Check the install with
`anyrow --version`.

## Sign in with a key

Create an API key in the app with the [permissions](/docs/authorization) your commands need,
and put it in the environment:

```bash
export ANYROW_API_KEY="ak_..."
anyrow table list --project-id proj_...
```

Or keep it in the config file, `~/.config/anyrow/config.toml` (`$XDG_CONFIG_HOME/anyrow/` when
that's set):

```toml
api_key = "ak_..."
output = "table"
timeout = "60s"
```

Each setting resolves from, first to last: the flag, the environment variable, the config
file, the default.

| Flag | Variable | Config key | Default |
| :-- | :-- | :-- | :-- |
| `--api-key` | `ANYROW_API_KEY` | `api_key` | none |
| `--base-url` | `ANYROW_BASE_URL` | `base_url` | `https://api.anyrow.ai` |
| `--output` | `ANYROW_OUTPUT` | `output` | `json` |
| `--timeout` | `ANYROW_TIMEOUT` | `timeout` | `30s` |
| `--config` | `ANYROW_CONFIG` | | `~/.config/anyrow/config.toml` |

Prefer the variable or the config file to `--api-key`: a flag shows in the process list.
`--verbose` prints request metadata to stderr.

## Commands

Commands follow the API: one group per resource, one command per operation, with path
parameters as flags (`--project-id`, `--table-id`). Bodies go in `--data`, as JSON, `@file` or
`-` for stdin.

```bash
# Tables in a project, as a table
anyrow table list --project-id proj_... --output table

# Create a table from a file
anyrow table create --project-id proj_... --data @invoices-table.json

# Rows, 50 at a time, filtered
anyrow row list --project-id proj_... --table-id tbl_... --limit 50 --q acme

# Add a row from stdin
echo '{ "vendor": "Acme", "total": 120 }' | anyrow row create --project-id proj_... --table-id tbl_... --data -

# Export a table as CSV
anyrow table export --project-id proj_... --table-id tbl_... --format csv

# One field of every row on the page, through jq
anyrow row list --project-id proj_... --table-id tbl_... | jq '.rows[].vendor'
```

| Group | Commands |
| :-- | :-- |
| `table` | `list`, `get`, `create`, `update`, `delete`, `restore`, `duplicate`, `export` |
| `column` | `add`, `update`, `remove`, `reorder`, `distinct` |
| `row` | `list`, `get`, `create`, `update`, `delete`, `bulk`, `aggregate`, `source` |
| `extract` | `once`, `stream`, `table-once`, `table-stream` |
| `batch` | `list`, `get`, `download-csv`, `download-json`, `download-xlsx` |
| `export` | `get` |
| `suggest` | `schema` |
| `table-template` | `project-list`, `project-get`, `use`, `create`, `list-mine`, `update`, `delete` |
| `webhook` | `list`, `get`, `create`, `update`, `delete`, `test`, `deliveries`, `rotate-secret` |

`anyrow <group> <command> --help` lists a command's flags; each matches a parameter on the
endpoint's page in the [API reference](/docs/api). List commands take `--limit`, `--cursor`,
`--page`, `--filter`, `--order` and `--q` ([Pagination](/docs/pagination)).

## Output

| `--output` | Prints |
| :-- | :-- |
| `json` | The response body, indented |
| `ndjson` | The response body on one line, for streaming into other tools |
| `yaml` | The response body as YAML |
| `table` | Columns and rows, for reading |

## Exit codes

| Code | Meaning |
| --: | :-- |
| 0 | Success |
| 1 | The API answered with a 4xx error; the [error body](/docs/errors) is on stderr |
| 2 | The API answered with a 5xx error |
| 3 | The request didn't complete: network, timeout or an unexpected error |
| 4 | Bad usage: an unknown flag, a broken config file or no API key |
| 5 | The API answered with a redirect |

## Shell completion

```bash
anyrow completion zsh > "${fpath[1]}/_anyrow"   # zsh
anyrow completion bash > /etc/bash_completion.d/anyrow
anyrow completion fish > ~/.config/fish/completions/anyrow.fish
```

PowerShell: `anyrow completion powershell | Out-String | Invoke-Expression`.
