Gå til hovedinnhold

kapi rules narrow

kapi narrow <id> --to <collection|folder>

Limit a kept rule to one collection. Name the collection, or a folder: a folder names the collection its files belong to, and the rule then holds in that whole collection. The rule holds at the profile, channel and coordinates the collection sits at, and in every collection that shares them. A folder whose files sit at the project's own point has no coordinate to tell it apart, and kapi says so.

Commandrules narrow
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi rules narrow 0n794e2gk7 --to docs
Flags
FlagTypeDefaultDescription
--note stringwhy
--project , -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--to stringthe collection the rule applies to, or a folder of it
More examples
kapi rules narrow 0n794e2gk7 --to web/src

← Back to the Command Reference