larksuite / larksuite/cli

Feature request: add Drive recycle bin operations

Open
#2,612 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

Please add CLI support for managing the Feishu/Lark Drive recycle bin (trash).

Motivation

The current lark-cli drive commands can delete a file or folder into the recycle bin, but there is no command to:

  • list the current user’s recycle-bin items;
  • restore an item from the recycle bin;
  • permanently delete a selected item;
  • empty the recycle bin (with an explicit high-risk confirmation gate).

This makes it difficult to complete document lifecycle management from the CLI. The official Drive API appears to expose delete-to-trash and permanent-delete events, but the CLI does not currently provide an operational recycle-bin interface.

Proposed interface

For example:

lark-cli drive +trash-list
lark-cli drive +trash-restore --file-token <token> --type <type> --yes
lark-cli drive +trash-delete --file-token <token> --type <type> --yes
lark-cli drive +trash-empty --yes

The exact names can follow the project’s conventions. Please include pagination, file type/title metadata, and clear warnings for irreversible operations. A dry-run or preview mode would also be useful for bulk empty operations.

Expected benefit

This would allow scripts and AI agents to safely inspect, restore, and permanently clean up Drive documents without switching to the web UI.

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 reviewing the existing lark-cli drive commands that delete files or folders into the recycle bin, then verify the official Drive API operations and response fields. Done means list, restore, permanent-delete, and empty commands support pagination and file metadata, with explicit confirmation for irreversible actions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.