@versatly/airtable-cli
CLI for Airtable base, table, and record operations using the official Airtable SDK.
Install
npm install -g @versatly/airtable-cli
Authentication
Create a personal access token in Airtable and export it as AIRTABLE_API_KEY:
export AIRTABLE_API_KEY="patXXXXXXXXXXXXXX"
Usage
List bases:
airtable bases list
List tables in a base:
airtable tables list --base appXXXXXXXXXXXXXX
List records (optionally by view):
airtable records list --base appXXXXXXXXXXXXXX --table "Projects"
airtable records list --base appXXXXXXXXXXXXXX --table "Projects" --view "Main View"
Get a record:
airtable records get --base appXXXXXXXXXXXXXX --table "Projects" --id recXXXXXXXXXXXXXX
Create a record:
airtable records create --base appXXXXXXXXXXXXXX --table "Projects" --fields '{"Name":"Launch","Status":"In Progress"}'
Update a record:
airtable records update --base appXXXXXXXXXXXXXX --table "Projects" --id recXXXXXXXXXXXXXX --fields '{"Status":"Done"}'
Delete a record:
airtable records delete --base appXXXXXXXXXXXXXX --table "Projects" --id recXXXXXXXXXXXXXX
Search with a formula:
airtable search --base appXXXXXXXXXXXXXX --table "Projects" --query "FIND('Launch', {Name})"
Output
All commands emit JSON to stdout for easy piping into other tools.