Skip to content

Feature request: add Drive recycle bin operations #2612

Description

@pooleparty2

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions