shelf Docs
On this page
shelf sweep

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

What it does

Reconciles the library once, then for each registered project whose directory exists, does what shelf sync does there. Projects whose directory is gone are listed as missing, not changed.

See Automation for cron, systemd and launchd examples.

Examples

terminal
shelf sweep
Synced 3 project(s).
  billing-api: updated pdf-tools

Only projects where something changed get a line (returned …, restored …, updated …). A missing project:

terminal
shelf sweep
Synced 4 project(s).
  docs-site: /home/me/code/docs-site is missing (`shelf doctor --fix`)

JSON output

json
{"schemaVersion":1,"ok":true,"data":{"synced":[{"project":{"id":"271949f0-7dc1-437e-93b2-ccb03cfec021","name":"billing-api","path":"/home/me/code/billing-api"},"expired":[],"restored":[],"updated":[],"warnings":[]}],"missing":[]}}

synced[] has one shelf sync result per project. missing[] lists { id, name, path } of projects whose directory doesn't exist.

Errors

CodeWhen
CONFLICTA project's lockfile is invalid.