CLI command

skarbiec login get

Read one field of the login a site is signed in with, or its current one-time code, without knowing its item id, as a script that logs in somewhere asks.

Invocation#

Shell
skarbiec login get <host|address> --field <field|one-time-code> [--username <name>]

Purpose#

Read one field of the login a site is signed in with, or its current one-time code, without knowing its item id, as a script that logs in somewhere asks.

Required inputs and options#

  • One positional, a host or an address as login list takes it; --field, the field to read, such as username or password, or one-time-code for the code the login's seed gives now; --username to tell apart several logins offered on the site.

Output and state effects#

  • Chooses the login login list would offer on the site, narrowed by --username when given, opens it — or for one-time-code computes the code as totp code does — and prints ok, site, item, field and value, and appends a site-get audit entry naming the item, field and site, never the value. POST /v1/operator/items/site-get takes site, field and username; on a host that Stado routes to the vault owner the command is forwarded there as get is, so a product signs in by site from any host. Desktop's Logins for a site offers Copy password and Copy one-time code beside each login it lists, which read the same values onto the concealed clipboard.

Refusals#

  • A missing site or --field exits 2 with `usage: login get <host or address> --field <field|one-time-code> [--username <name>]`. No login offered on the site is refused with `no login is offered on <host>; login list <site> lists what is`, adding how many logins would not open to tell; several are refused naming each with its username and asking for --username. A field the login does not hold or one that is not text is refused in the vault's words, and a login with no working seed with `<id> gives no one-time code: <reason>`.