Skip to content

arnoldadlv/airtable-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

airtable-cli

Zero-dependency CLI for the Airtable REST API. TSV-first output designed for humans and AI agents.

Install

pip install airtable-api-cli

Setup

Set your Airtable Personal Access Token:

export AIRTABLE_PAT="pat..."

Commands

Bases & Tables

Command Description
airtable list-bases List all accessible bases
airtable create-base <json> Create a new base (requires workspaceId)
airtable list-tables <baseId> List tables in a base
airtable create-table <baseId> <json> Create a new table
airtable create-field <baseId> <tableId> <json> Create a field
airtable update-field <baseId> <tableId> <fieldId> <json> Update a field

Records

Command Description
airtable list-records <baseId> <table> [options] List records
airtable get-record <baseId> <table> <recordId> Get a single record
airtable create-records <baseId> <table> <json> Create records
airtable update-records <baseId> <table> <json> Update records (PATCH)
airtable replace-records <baseId> <table> <json> Replace records (PUT)
airtable delete-records <baseId> <table> <id1,id2> Delete records

Bulk & Utilities

Command Description
airtable bulk-create <baseId> <table> <json> Create any number of records (auto-batches by 10)
airtable bulk-update <baseId> <table> <json> Update any number of records (auto-batches by 10)
airtable upsert <baseId> <table> --match <field> <json> Create or update based on match field
airtable resolve-links <baseId> <table> [--field <name>] Resolve linked record IDs to display values
airtable export-csv <baseId> <table> [options] Export table to CSV
airtable count <baseId> <table> [--filter '<formula>'] Count records
airtable find-duplicates <baseId> <table> --field <name> Find duplicate records

Output Formats

Default output is TSV (tab-separated values) -- compact and easy to pipe.

airtable list-records appXXX "My Table"              # TSV (default)
airtable list-records appXXX "My Table" -o json       # JSON
airtable list-records appXXX "My Table" -o csv        # CSV

Query Options

For list-records and export-csv:

--filter '{Status} = "Active"'   # filterByFormula
--fields 'Name,Email'            # select specific fields
--sort 'Name:asc'                # sort (field:direction)
--max 10                         # limit records
--view 'Grid view'               # use a specific view
--all                            # auto-paginate all records

Why This Exists

  • Zero dependencies -- stdlib urllib only, installs anywhere Python runs
  • TSV-first -- default output is token-efficient for LLM/agent pipelines
  • One file -- easy to audit, vendor, or fork

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages