shelf Docs
On this page
shelf return <skill> [options]
ArgumentDescription
<skill>Skill name
OptionTypeDefaultDescription
--forcebooleanDiscard local edits to the project copy

Also takes the global options --json and --actor (CLI overview).

What it does

Deletes <target>/<name> for each of the loan's targets, closes the loan, removes the skill from the lockfile and records returned in the activity log. The library is untouched; borrow it again any time.

If a copy has local edits (modified or diverged), it refuses. Keep the edits with shelf promote (publish to the library) or shelf detach (keep them in the project, unmanaged), or discard them with --force.

Don't delete skill copies by hand: shelf would see them as missing and restore them.

Examples

terminal
shelf return pdf-tools
Returned pdf-tools
terminal
shelf return pdf-tools
error: The project copy of "pdf-tools" has local edits
hint: Keep them with `shelf promote pdf-tools` or `shelf detach pdf-tools`, or discard them with --force

JSON output

json
{"schemaVersion":1,"ok":true,"data":{"skill":"release-notes"}}

Errors

CodeWhen
NOT_INITIALIZEDNot inside a shelf project.
NOT_BORROWEDThe project doesn't borrow the skill.
LOCAL_CHANGESA copy has local edits and --force wasn't given.