[Base] Add typed Field Groups shortcut
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Summary
Add a typed Base shortcut for creating Field Groups (column groups in the Base UI). This is distinct from record grouping through +view-set-group.
Environment
- lark-cli: 1.0.81
- Brand: Lark
- Identity tested: user
Current behavior
lark-cli base --help exposes field CRUD and view grouping, but no +field-group-* shortcut. Agents must use the raw API escape hatch:
lark-cli api POST /open-apis/bitable/v1/apps/<app_token>/tables/<table_id>/field_groups \
--as user \
--data @field-groups.json
The endpoint works when the token has base:field_group:create. It is also represented by AppTableFieldGroup.Create in the official Go SDK.
Proposed behavior
Provide a typed shortcut such as:
lark-cli base +field-group-create \
--base-token <app_token> \
--table-id <table_id> \
--json @field-groups.json \
--as user \
--dry-run
The shortcut should:
- Declare and check
base:field_group:create. - Validate the top-level
field_groupsarray and non-emptychildren. - Explain that each field can belong to only one Field Group.
- Surface error
1254122as an existing/duplicate group membership conflict. - Clearly distinguish Field Groups from
+view-set-group. - Return the created
field_groups[].id,name, anddescription.
If the platform only exposes create today, the CLI should not invent unsupported list/update/delete operations.
References
- Official SDK sample: https://github.com/larksuite/oapi-sdk-go/blob/v3_main/sample/apiall/bitablev1/create_appTableFieldGroup.go
- Endpoint:
POST /open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing Base field CRUD shortcuts and their help and validation patterns, then compare the official Go SDK Field Group sample with the documented POST endpoint. Add only the typed create shortcut, including permission and payload checks, duplicate-membership error handling, distinction from +view-set-group, and created field-group output. Done when the proposed dry-run command and relevant help behavior work without inventing unsupported operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100