larksuite / larksuite/cli

[Base] Add +table-batch-create and +table-batch-delete shortcuts

Open
#2,654 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug domain/base
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

Prerequisites
  • I searched existing issues and discussions, this is not already proposed.
  • This is a concrete, actionable proposal, not a vague wish.
Problem or motivation

Table management is single-table only (+table-create, +table-delete). When scaffolding a Base with several tables, agents loop over single creates, and cleanup loops over single deletes. The platform exposes batch endpoints for both:

POST /open-apis/bitable/v1/apps/:app_token/tables/batch_create
POST /open-apis/bitable/v1/apps/:app_token/tables/batch_delete
Proposed solution

Two shortcuts:

  • +table-batch-create --base-token --json <tables array> (risk: write, scope: base:table:create). Each entry takes name, optional default_view_name, and optional fields in the same shape +field-create accepts. Returns table_ids in input order.
  • +table-batch-delete --base-token --table-ids <comma list> (risk: high-risk-write, scope: base:table:delete, max 50 IDs per call per the API limit). Deletion is irreversible, so the high-risk gate with --yes fits the existing taxonomy.

Both directions were verified against a live tenant: create two tables, confirm via +table-list, batch delete them, confirm removal.

Alternatives considered

Looping over the existing single-table commands. It works but multiplies rate-limit exposure (10 writes per second per table), produces no single atomic request to preview with --dry-run, and leaves partial scaffolds when one call in the middle fails.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing +table-create and +table-delete entry points and the Base table API client, then compare their argument and risk-gate handling with the proposed batch endpoints. Done means both shortcuts accept the specified inputs and limits, preserve create input order, enforce --yes for deletion, and their results can be confirmed through +table-list.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.