larksuite / larksuite/cli

[Base] Add +dashboard-copy shortcut

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

Nobody has claimed this yet.

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

The Base domain covers dashboard CRUD (+dashboard-create, +dashboard-update, +dashboard-delete, blocks, share, arrange) but has no way to duplicate a dashboard. Duplicating is a common setup step when scaffolding several similar dashboards, and today agents must use the raw API:

lark-cli api POST /open-apis/bitable/v1/apps/<app_token>/dashboards/<block_id>/copy
Proposed solution

One shortcut:

  • +dashboard-copy --base-token --block-id --name (risk: write, scope: base:dashboard:copy)

Notes from verifying against a live tenant:

  • The docs list bitable:app as the required scope, but the granular base:dashboard:copy scope is accepted and works.
  • Response carries the new dashboard block_id and name.
  • --name is required by the API and validated as non-empty.
Alternatives considered

Keep using the raw api escape hatch. It works but skips scope preflight and dry-run, and the scope name (base:dashboard:copy vs the documented bitable:app) is easy to get wrong without a typed command declaring it.

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 examining the existing Base dashboard shortcuts, especially +dashboard-create, +dashboard-update, and +dashboard-delete, then compare their handling with the documented POST /open-apis/bitable/v1/apps/<app_token>/dashboards/<block_id>/copy endpoint. Done means a typed +dashboard-copy command accepts --base-token, --block-id, and non-empty --name, declares base:dashboard:copy, and exposes the returned block_id and name with scope preflight and dry-run support.

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
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.