Skip to content

storage has no delete-object command — only delete-bucket #271

Description

@agent-zhang-beihai

What happens

The CLI can create buckets, list objects, upload and download, but the only delete is delete-bucket (bucket + all objects). There is no way to remove ONE object. Managing published content assets means retiring a superseded image or video routinely; today the only CLI-shaped option is to destroy the whole bucket. Suggest 'storage delete-object --bucket ' to complete the CRUD set that upload/download/list already imply.

Command

npx @insforge/cli storage delete-object articles/_probe.png --bucket content-assets

Error

error: unknown command 'delete-object'

Expected

The skill's Command Routing table lists 'Storage buckets and objects' as a CLI area, which reads as full object management.

Workaround

DELETE /api/storage/buckets/:bucket/objects/:key with the project API key as a bearer token — returns 200.

Triage finding

Triage judged this fixable.

Add src/commands/storage/delete-object.ts registering delete-object <objectKey> --requiredOption --bucket <name>, mirroring download.ts for URL construction (ossFetch DELETE to /api/storage/buckets/${encodeURIComponent(bucket)}/objects/${encodeURIComponent(objectKey)}) and delete-bucket.ts for the confirm prompt / --yes / --json / trackCommandUsage handling; wire it into src/index.ts next to the other storage registrations, and add the matching bullet to the Storage section of insforge-skills/skills/insforge-cli/SKILL.md; verify by npm run build then upload → list-objects (key present) → delete-objectlist-objects (key gone), plus a 404 check on a nonexistent key.

Suggested fix

From automated triage — a starting point, not a verified plan.

Add src/commands/storage/delete-object.ts registering delete-object <objectKey> --requiredOption --bucket <name>, mirroring download.ts for URL construction (ossFetch DELETE to /api/storage/buckets/${encodeURIComponent(bucket)}/objects/${encodeURIComponent(objectKey)}) and delete-bucket.ts for the confirm prompt / --yes / --json / trackCommandUsage handling; wire it into src/index.ts next to the other storage registrations, and add the matching bullet to the Storage section of insforge-skills/skills/insforge-cli/SKILL.md; verify by npm run build then upload → list-objects (key present) → delete-objectlist-objects (key gone), plus a 404 check on a nonexistent key.


Component cli · severity minor · CLI 0.2.2 · darwin 25.5.0

Filed automatically from user feedback.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions