CLI command
skarbiec kinds
See which fields each item kind takes before writing one, read from the schema every write is checked against, so the list and a refusal never disagree.
Invocation#
skarbiec kinds [<kind>]Purpose#
See which fields each item kind takes before writing one, read from the schema every write is checked against, so the list and a refusal never disagree.
Required inputs and options#
- Nothing, for every kind, or one kind name. Opens no vault. POST /v1/operator/kinds takes an optional kind.
Output and state effects#
- Prints kinds: each kind with open (true for a kind that keeps whatever fields it is given, a bundle) and fields, each with name, required, one_of (the set of which a payload needs at least one, a login's authentication factor), holds (the value it keeps), secret (whether it holds a secret: a password, a seed, a key, a session token, a passphrase, a card's codes) and credential (whether it is the kind's one credential, what a provider:<provider> name hands out; an access key's is secret_access_key beside its secret session_token, a key pair's private_key beside its passphrase, a card's number, a token's token, and a login, an identity or a note declares none); with a kind, that kind's object alone. Writes nothing. Desktop's New item… and Set a field… offer the fields this answers for a kind.
Refusals#
- More than one kind exits 2 as arguments-extra under /docs/errors: `kinds takes one kind at most, and was given <rest> beyond it`; a flag exits 2 as arguments-flag-unknown: `kinds takes no --<flag>, so it cannot do what the flag asks`. A kind this Skarbiec does not have is kind-unknown, exit 1: `listing the fields of kind <kind>: this Skarbiec has no item kind <kind>; observed: kinds: <every kind>; fix: name one of the kinds listed, or run skarbiec kinds to see every kind with its fields`. POST /v1/operator/kinds refuses a kind that is not text, or is empty, as kind-unknown too, naming it as the JSON sent (`""`, `5`, `null`), never reading it as no kind, which would answer every kind nobody asked for.
- skarbiec.kinds kind-unknown — exit 1: listing the fields of kind {kind}; fix: name one of the kinds listed, or run skarbiec kinds to see every kind with its fields