Skip to content

[Base] Add typed Field Groups shortcut #2157

Description

@nguyenngothuong

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_groups array and non-empty children.
  • Explain that each field can belong to only one Field Group.
  • Surface error 1254122 as an existing/duplicate group membership conflict.
  • Clearly distinguish Field Groups from +view-set-group.
  • Return the created field_groups[].id, name, and description.

If the platform only exposes create today, the CLI should not invent unsupported list/update/delete operations.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain/basePR touches the base domain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions