Feishu CLI Bitable & Tables

Full CRUD for multi-dimensional tables, records, fields, views, dashboards, workflows, roles, forms, and advanced permissions — the most feature-rich module in the CLI with 60 shortcut commands.

Multi-Dimensional Table Management from the Terminal

The Feishu CLI Bitable module is the most feature-rich domain with 60 shortcut commands covering every aspect of Lark’s multi-dimensional tables (Base). All commands use the base service prefix and operate through the Base v3 API.

Key capabilities include:

  • Table CRUD — create, list, get, update, and delete tables with field definitions
  • Record management — upsert, list, query, delete records with attachment uploads
  • Field operations — create typed fields including formula, lookup, single/multi-select with options
  • View configuration — 15 commands for filters, groups, sorts, timebars, and card layouts
  • Data query — advanced analytics with JSON DSL for aggregation, filtering, and grouping
  • Dashboards — create dashboards and chart/metric blocks
  • Workflows — create, enable, and disable automated workflows
  • Forms — create forms and manage form questions
  • Role & permissions — role CRUD plus advanced permissions toggle

All commands support both user and bot identity. High-risk operations (delete) support --dry-run for safe previewing.

Shared Flags Across All Base Commands

Most Bitable commands share these common reference flags. The --base-token is required for nearly every operation and can be extracted from the Bitable URL.

ParameterDescription
--base-tokenBase token (required for almost all commands)
--table-idTable ID or name
--field-idField ID or name
--view-idView ID or name
--record-idRecord ID

Table CRUD — 5 Commands

Create, list, retrieve, update, and delete tables within a Base. Table creation supports inline field and view definitions.

# Create a table with custom fields $ lark-cli base +table-create --base-token "bascnXXX" --name "Project Tracker" --fields '[{"field_name":"Status","type":3},{"field_name":"Priority","type":3}]'
# List all tables in a base $ lark-cli base +table-list --base-token "bascnXXX"
# Get table details $ lark-cli base +table-get --base-token "bascnXXX" --table-id "tblXXX"
# Update table name $ lark-cli base +table-update --base-token "bascnXXX" --table-id "tblXXX" --name "Renamed Tracker"
# Delete a table (high-risk, use --dry-run first) $ lark-cli base +table-delete --base-token "bascnXXX" --table-id "tblXXX" --dry-run
ShortcutDescriptionKey Parameters
+table-createCreate a table and optional fields/views--name, --fields, --view
+table-listList all tables--base-token
+table-getGet table details--table-id
+table-updateUpdate table name--table-id, --name
+table-deleteDelete a table--table-id

Record CRUD — 6 Commands

Create, read, update, and delete records. The +record-upsert command intelligently creates or updates based on whether a --record-id is provided. Supports attachment uploads directly to attachment fields.

# List records (with optional view filter) $ lark-cli base +record-list --base-token "bascnXXX" --table-id "tblXXX" --view-id "vewXXX"
# List records with pagination $ lark-cli base +record-list --base-token "bascnXXX" --table-id "tblXXX" --offset 0 --limit 100
# Create a new record $ lark-cli base +record-upsert --base-token "bascnXXX" --table-id "tblXXX" --json '{"fields":{"Name":"Task A","Status":"In Progress","Priority":"High"}}'
# Update an existing record $ lark-cli base +record-upsert --base-token "bascnXXX" --table-id "tblXXX" --record-id "recXXX" --json '{"fields":{"Status":"Done"}}'
# Get a specific record $ lark-cli base +record-get --base-token "bascnXXX" --table-id "tblXXX" --record-id "recXXX"
# Upload an attachment to a record field $ lark-cli base +record-upload-attachment --base-token "bascnXXX" --table-id "tblXXX" --record-id "recXXX" --field-id "Attachments" --file ./report.pdf
# View record edit history $ lark-cli base +record-history-list --base-token "bascnXXX" --table-id "tblXXX" --record-id "recXXX"
# Delete a record (high-risk) $ lark-cli base +record-delete --base-token "bascnXXX" --table-id "tblXXX" --record-id "recXXX" --dry-run
ShortcutDescriptionKey Parameters
+record-listList records in a table--view-id, --offset, --limit
+record-getGet a specific record--record-id
+record-upsertCreate or update a record--json, --record-id (optional)
+record-upload-attachmentUpload file to attachment field--record-id, --field-id, --file, --name
+record-deleteDelete a record--record-id
+record-history-listView record edit history--record-id

Field CRUD — 6 Commands

Create, list, get, update, and delete fields. Field definitions use a JSON object with field_name, type (numeric code), and optional property for select options, formulas, and lookups.

# Create a single-select field with options $ lark-cli base +field-create --base-token "bascnXXX" --table-id "tblXXX" --json '{"field_name":"Priority","type":3,"property":{"options":[{"name":"High"},{"name":"Medium"},{"name":"Low"}]}}'
# Create a number field $ lark-cli base +field-create --base-token "bascnXXX" --table-id "tblXXX" --json '{"field_name":"Budget","type":2}'
# List all fields in a table $ lark-cli base +field-list --base-token "bascnXXX" --table-id "tblXXX"
# Search field select options $ lark-cli base +field-search-options --base-token "bascnXXX" --table-id "tblXXX" --field-id "Priority"

Field Type Reference

Type CodeField TypeType CodeField Type
1Text11Person
2Number13Phone
3SingleSelect15Link (URL)
4MultiSelect17Lookup
5DateTime18Formula
7Checkbox22Location
ShortcutDescription
+field-createCreate a field with type and property definition
+field-listList all fields in a table
+field-getGet field details
+field-updateUpdate field properties
+field-deleteDelete a field
+field-search-optionsSearch select/multi-select options

View Configuration — 15 Commands

Create, list, rename, and delete views. Configure view-level filters, groups, sorts, timebars, and card layouts. Each configuration aspect has dedicated get and set commands.

# Create a new view $ lark-cli base +view-create --base-token "bascnXXX" --table-id "tblXXX" --json '{"view_name":"Kanban View","view_type":"kanban"}'
# Set a view filter $ lark-cli base +view-set-filter --base-token "bascnXXX" --table-id "tblXXX" --view-id "vewXXX" --json '{"conditions":[{"field_name":"Status","operator":"is","value":["Done"]}],"conjunction":"and"}'
# Set view sort order $ lark-cli base +view-set-sort --base-token "bascnXXX" --table-id "tblXXX" --view-id "vewXXX" --json '[{"field_name":"Priority","desc":true}]'
# Set view grouping $ lark-cli base +view-set-group --base-token "bascnXXX" --table-id "tblXXX" --view-id "vewXXX" --json '[{"field_name":"Status","desc":false}]'
# Rename a view $ lark-cli base +view-rename --base-token "bascnXXX" --table-id "tblXXX" --view-id "vewXXX" --json '{"name":"Sprint Board"}'
ShortcutDescription
+view-createCreate a new view
+view-listList all views
+view-getGet view details
+view-deleteDelete a view
+view-renameRename a view
+view-get-filter / +view-set-filterGet or set view filter configuration
+view-get-group / +view-set-groupGet or set view grouping
+view-get-sort / +view-set-sortGet or set view sort order
+view-get-timebar / +view-set-timebarGet or set Gantt/timeline timebar config
+view-get-card / +view-set-cardGet or set card layout configuration

+data-query — Advanced Analytics with JSON DSL

Query and analyze Base data using the LiteQuery Protocol — a JSON DSL that supports dimensions, measures, aggregation, filtering, sorting, and grouping. The DSL must contain at least one of dimensions or measures.

# Query with filter, sort, and field selection $ lark-cli base +data-query --base-token "bascnXXX" --dsl '{"dimensions":["Status"],"measures":[{"field_name":"Budget","aggregator":"SUM"}],"filter":{"conjunction":"and","conditions":[{"field_name":"Status","operator":"is","value":["In Progress"]}]}}'
# Simple dimension query $ lark-cli base +data-query --base-token "bascnXXX" --dsl '{"dimensions":["Name","Status"],"measures":[{"field_name":"Name","aggregator":"COUNT"}]}'
DSL FieldDescription
dimensionsArray of field names to group by
measuresArray of {"field_name", "aggregator"} objects (SUM, COUNT, AVG, MAX, MIN)
filterFilter object with conjunction (and/or) and conditions array
sortArray of {"field_name", "desc": true/false} objects

Scope: base:table:read

Dashboard & Block Management — 10 Commands

Create and manage dashboards with chart blocks, metric blocks, and other visualizations. Dashboards provide a visual overview of Base data.

# Create a dashboard $ lark-cli base +dashboard-create --base-token "bascnXXX" --name "Q1 Overview"
# Create a dashboard with theme $ lark-cli base +dashboard-create --base-token "bascnXXX" --name "Sales Report" --theme-style "dark"
# Add a chart block to a dashboard $ lark-cli base +dashboard-block-create --base-token "bascnXXX" --json '{"dashboard_id":"dshXXX","block_type":"chart","config":{...}}'
# List all dashboards $ lark-cli base +dashboard-list --base-token "bascnXXX"
ShortcutDescription
+dashboard-createCreate a dashboard
+dashboard-listList all dashboards
+dashboard-getGet dashboard details
+dashboard-updateUpdate dashboard name or theme
+dashboard-deleteDelete a dashboard
+dashboard-block-createAdd a block to a dashboard
+dashboard-block-listList blocks in a dashboard
+dashboard-block-getGet block details
+dashboard-block-updateUpdate a dashboard block
+dashboard-block-deleteDelete a dashboard block

Workflow Automation — 6 Commands

Create and manage automated workflows within a Base. Workflows can trigger actions based on record changes, time conditions, or manual triggers. Workflow definitions are passed as JSON and can be loaded from files using the @path/to/file.json syntax for large definitions.

# Create a workflow $ lark-cli base +workflow-create --base-token "bascnXXX" --json '{"title":"Auto Notify","steps":[...]}'
# Create a workflow from a JSON file $ lark-cli base +workflow-create --base-token "bascnXXX" --json @workflow-definition.json
# Enable a workflow $ lark-cli base +workflow-enable --base-token "bascnXXX" --json '{"workflow_id":"wflXXX"}'
# Disable a workflow $ lark-cli base +workflow-disable --base-token "bascnXXX" --json '{"workflow_id":"wflXXX"}'
ShortcutDescription
+workflow-createCreate a new workflow
+workflow-listList all workflows
+workflow-getGet workflow details
+workflow-updateUpdate workflow definition
+workflow-enableEnable a workflow
+workflow-disableDisable a workflow

Form Management — 8 Commands

Create forms linked to Base tables and manage form questions. Forms provide a user-friendly input interface for collecting records into a table.

# Create a form for a table $ lark-cli base +form-create --base-token "bascnXXX" --table-id "tblXXX" --name "Bug Report Form" --description "Submit bug reports for triage"
# List all forms in a table $ lark-cli base +form-list --base-token "bascnXXX" --table-id "tblXXX"
# Add a question to a form $ lark-cli base +form-questions-create --base-token "bascnXXX" --table-id "tblXXX" --json '{"form_id":"frmXXX","field_id":"fldXXX","required":true}'
ShortcutDescription
+form-createCreate a form for a table
+form-listList all forms
+form-getGet form details
+form-updateUpdate form name or description
+form-deleteDelete a form
+form-questions-createAdd a question to a form
+form-questions-updateUpdate a form question
+form-questions-deleteDelete a form question

Role Management & Advanced Permissions — 7 Commands

Create and manage custom roles for fine-grained access control. Enable or disable advanced permissions at the Base level. When advanced permissions are enabled, access is controlled through roles rather than simple sharing.

# Enable advanced permissions on a base $ lark-cli base +advperm-enable --base-token "bascnXXX"
# Create a custom role $ lark-cli base +role-create --base-token "bascnXXX" --json '{"role_name":"Editor","permissions":[...]}'
# List all roles $ lark-cli base +role-list --base-token "bascnXXX"
# Disable advanced permissions $ lark-cli base +advperm-disable --base-token "bascnXXX"
ShortcutDescription
+role-createCreate a custom role
+role-listList all roles
+role-getGet role details
+role-updateUpdate a role
+role-deleteDelete a role
+advperm-enableEnable advanced permissions
+advperm-disableDisable advanced permissions

Base-Level Commands — 3 Commands

Get information about a Base, create a new Base, or copy an existing one.

# Get base details $ lark-cli base +base-get --base-token "bascnXXX"
# Create a new base $ lark-cli base +base-create --json '{"name":"Project Management","folder_token":"fldcnXXX"}'
# Copy an existing base $ lark-cli base +base-copy --base-token "bascnXXX" --json '{"name":"Project Tracker Copy"}'
ShortcutDescription
+base-getGet Base metadata
+base-createCreate a new Base
+base-copyCopy an existing Base

Best Practices & Limits

  • Batch limits: Record operations are limited to 500 records per batch request.
  • Attachment size: Maximum 20 MB per file for +record-upload-attachment.
  • Wiki links: If your Base is in a wiki, resolve wiki tokens to get the actual base token first using lark-cli wiki spaces get_node.
  • Dry-run support: High-risk operations (delete commands) support --dry-run to preview the API call before execution.
  • Field references: Most commands accept either field IDs (fldXXX) or field names directly as --field-id.
  • JSON from files: For large JSON payloads, use @path/to/file.json syntax instead of inline JSON strings.
  • Formula/Lookup fields: When creating formula or lookup fields (type 17, 18), read the field guide first and set --i-have-read-guide.

All 60 Bitable Shortcut Commands

CategoryShortcutRiskDescription
Tables+table-createWriteCreate a table and optional fields/views
+table-listReadList all tables
+table-getReadGet table details
+table-updateWriteUpdate table name
+table-deleteWriteDelete a table
Records+record-listReadList records in a table
+record-getReadGet a specific record
+record-upsertWriteCreate or update a record
+record-upload-attachmentWriteUpload file to attachment field
+record-deleteWriteDelete a record
+record-history-listReadView record edit history
Fields+field-createWriteCreate a field
+field-listReadList all fields
+field-getReadGet field details
+field-updateWriteUpdate field properties
+field-deleteWriteDelete a field
+field-search-optionsReadSearch select options
Views+view-createWriteCreate a new view
+view-listReadList all views
+view-getReadGet view details
+view-deleteWriteDelete a view
+view-renameWriteRename a view
+view-get-filterReadGet view filter
+view-set-filterWriteSet view filter
+view-get-groupReadGet view grouping
+view-set-groupWriteSet view grouping
+view-get-sortReadGet view sort order
+view-set-sortWriteSet view sort order
+view-get-timebarReadGet timebar config
+view-set-timebarWriteSet timebar config
+view-get-cardReadGet card layout
+view-set-cardWriteSet card layout
Query+data-queryReadQuery with JSON DSL
Dashboards+dashboard-createWriteCreate a dashboard
+dashboard-listReadList dashboards
+dashboard-getReadGet dashboard details
+dashboard-updateWriteUpdate a dashboard
+dashboard-deleteWriteDelete a dashboard
+dashboard-block-createWriteAdd a block
+dashboard-block-listReadList blocks
+dashboard-block-getReadGet block details
+dashboard-block-updateWriteUpdate a block
+dashboard-block-deleteWriteDelete a block
Workflows+workflow-createWriteCreate a workflow
+workflow-listReadList workflows
+workflow-getReadGet workflow details
+workflow-updateWriteUpdate a workflow
+workflow-enableWriteEnable a workflow
+workflow-disableWriteDisable a workflow
Forms+form-createWriteCreate a form
+form-listReadList forms
+form-getReadGet form details
+form-updateWriteUpdate a form
+form-deleteWriteDelete a form
+form-questions-createWriteAdd a question
+form-questions-updateWriteUpdate a question
+form-questions-deleteWriteDelete a question
Base+base-getReadGet Base metadata
+base-createWriteCreate a new Base
+base-copyWriteCopy an existing Base
Roles & Perms+role-createWriteCreate a custom role
+role-listReadList roles
+role-getReadGet role details
+role-updateWriteUpdate a role
+role-deleteWriteDelete a role
+advperm-enableWriteEnable advanced permissions
+advperm-disableWriteDisable advanced permissions

Related Feishu CLI Guides