Create labels
Give owners, device types and departments one name each, so the rest of your config stops spelling the same thing three ways.
What this step does
A label is a declared value in a small vocabulary, identified by the pair (kind, id). There are exactly three kinds — owner, device-type, department — and each one feeds a single scalar on a [[devices]] entry: owner, device_type, department. The same id can exist under two different kinds; --kind is how you tell them apart.
Labels are advisory, not referential: the resolver never reads [[labels]], so they never decide what gets filtered. Their job is to keep your device inventory legible and greppable — one spelling of “kids”, not three. A value on a device that isn’t in the vocabulary still loads and still filters normally; it just logs a DEVICE_METADATA_UNKNOWN_LABEL warning once, and only once at least one label of that kind exists. An empty vocabulary means “not curated yet”, not “everything is wrong” — you can start using owner or department on devices before you’ve declared a single label for it.
Declare a vocabulary
Pick a handful of values per kind — a household or small office rarely needs more than three or four:
warden label add edoardo --kind owner --display-name "Edoardo"
warden label add anna --kind owner --display-name "Anna"
warden label add reception --kind owner --display-name "Reception desk"
warden label add laptop --kind device-type --display-name "Laptop"
warden label add phone --kind device-type --display-name "Phone"
warden label add tablet --kind device-type --display-name "Tablet"
warden label add family --kind department --display-name "Family"
warden label add guest --kind department --display-name "Guest"
warden label add reception --kind department --display-name "Reception"--description is stored but never read back by anything else — use it as a note to yourself, not a mechanism. warden label list prints the vocabulary grouped by kind:
owner edoardo Edoardo anna Anna reception Reception desk device-type laptop Laptop phone Phone tablet Tablet department family Family guest Guest reception Reception
Use it on a device
Once a kind has at least one label, set the matching field when you register a device:
warden device add kids-ipad --ip 192.168.1.44 --owner anna --device-type tablet --department familySee manage devices for the rest of the device fields — IP/MAC identity, profile assignment, overlays.
Disambiguate a shared id
reception was declared under both owner and department above. label show on its own is ambiguous; pass --kind to pick one:
warden label show reception --kind departmentRemoving a label
warden label remove refuses while any device still carries that value — clear or reassign the field on every device using it first, then remove the label:
warden label remove tablet --kind device-typeprofile, group, subnet and default_profile, none of which read [[labels]].The TOML form
warden label add writes a [[labels]] entry with the same fields as its flags:
[[labels]]
id = "anna"
kind = "owner"
display_name = "Anna"
[[labels]]
id = "reception"
kind = "department"
display_name = "Reception"
description = "Shared front-desk devices"CLI reference
| Verb | Does |
|---|---|
label list | Print the vocabulary, grouped by kind |
label show <id> [--kind <k>] | Show one label; --kind disambiguates an id declared under two kinds |
label add <id> --kind <owner|device-type|department> | Declare a vocabulary value (--display-name, --description, --into <path>) |
label set <id> <field> <value> | Edit display_name, description, or kind (--kind to select which entry, --into <path>) |
label remove <id> [--kind <k>] | Delete a value; refused while any device still uses it |
In the TUI
Configuration section (5) → Labels leaf (g b):
See also
- Manage devices — assign
owner,device-typeanddepartmenton a device, and the rest of its fields. - Devices entity reference — the full device schema.
- Create profiles — profiles decide filtering; labels only organize the inventory around them.