label
| Function | Lists, adds, or removes page labels on one or more pages. Pipe paths from find to label many pages at once. |
| Options | -y, --yes — required for add / rm. -n, --dry-run — preview without writing. Listing needs no flag. |
| Limitations | Pages only: spaces are skipped and folders are refused. At most 100 paths and 10 label names per run. Writes always use the global label prefix (team: / my: are not supported). Uses the existing app permissions (no new scopes). |
Subcommands
Section titled “Subcommands”label [ls] [PATH...]— list labels on the current page or on eachPATH.label add NAME... PATH...— add one or more labels.label rm NAME... PATH...— remove one or more labels.find ... | label add NAME... -y— label every page path piped fromfind(noPATHon the command line when piping).
Label names come first, then paths. A word without / is read as a label name, so write page paths with a slash (./Page, /Space/Page). Flags may appear anywhere.
Find pages by label
Section titled “Find pages by label”find -label NAME lists pages that have that global label (CQL search). Repeat -label to require several labels (AND). Combine it with -mtime, -prune, -ls, or --format csv. The search index may lag by seconds to minutes right after label add / label rm.
Examples
Section titled “Examples”$ label ls ./Runbook$ label add -n needs-review ./Runbook$ label add needs-review ./Runbook -y$ label rm needs-review ./Runbook -y$ find ./MySpace -mtime +365 -prune | label add needs-review -n$ find ./MySpace -mtime +365 -prune | label add needs-review -y$ find -label needs-review$ find ./MySpace -label needs-review --format csvRecipe: Label stale pages for review.