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.
InstallLink to section
brew install anyrow/tap/anyrowLinux 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 keyLink to section
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.
| 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.
CommandsLink to section
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'| 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. List commands take --limit, --cursor,
--page, --filter, --order and --q (Pagination).
OutputLink to section
--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 codesLink to section
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The API answered with a 4xx error; the error body 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 completionLink to section
anyrow completion zsh > "${fpath[1]}/_anyrow" # zshanyrow completion bash > /etc/bash_completion.d/anyrowanyrow completion fish > ~/.config/fish/completions/anyrow.fishPowerShell: anyrow completion powershell | Out-String | Invoke-Expression.