Skip to content

Tools

CLI

The anyrow command line: every endpoint from a terminal or a script, as JSON, YAML or a table.

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

brew install anyrow/tap/anyrow

Linux packages (.deb, .rpm, .apk) and binaries for macOS, Linux and Windows are on the releases page (opens in a new tab). Check the install with anyrow --version.

Sign in with a key

Create an API key in the app with the permissions your commands need, and put it in the environment:

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):

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

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

FlagVariableConfig keyDefault
--api-keyANYROW_API_KEYapi_keynone
--base-urlANYROW_BASE_URLbase_urlhttps://api.anyrow.ai
--outputANYROW_OUTPUToutputjson
--timeoutANYROW_TIMEOUTtimeout30s
--configANYROW_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.

# Tables in a project, as a tableanyrow table list --project-id proj_... --output table# Create a table from a fileanyrow table create --project-id proj_... --data @invoices-table.json# Rows, 50 at a time, filteredanyrow row list --project-id proj_... --table-id tbl_... --limit 50 --q acme# Add a row from stdinecho '{ "vendor": "Acme", "total": 120 }' | anyrow row create --project-id proj_... --table-id tbl_... --data -# Export a table as CSVanyrow table export --project-id proj_... --table-id tbl_... --format csv# One field of every row on the page, through jqanyrow row list --project-id proj_... --table-id tbl_... | jq '.rows[].vendor'
GroupCommands
tablelist, get, create, update, delete, restore, duplicate, export
columnadd, update, remove, reorder, distinct
rowlist, get, create, update, delete, bulk, aggregate, source
extractonce, stream, table-once, table-stream
batchlist, get, download-csv, download-json, download-xlsx
exportget
suggestschema
table-templateproject-list, project-get, use, create, list-mine, update, delete
webhooklist, 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. List commands take --limit, --cursor, --page, --filter, --order and --q (Pagination).

Output

--outputPrints
jsonThe response body, indented
ndjsonThe response body on one line, for streaming into other tools
yamlThe response body as YAML
tableColumns and rows, for reading

Exit codes

CodeMeaning
0Success
1The API answered with a 4xx error; the error body is on stderr
2The API answered with a 5xx error
3The request didn't complete: network, timeout or an unexpected error
4Bad usage: an unknown flag, a broken config file or no API key
5The API answered with a redirect

Shell completion

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

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