Skip to content

Vault and credentials

When a conversation needs a password, an SSH key or a token, the value goes to Lyra and not to the model. The model gets a name, such as nas-root, and uses the credential by that name.

When the model needs a credential (it calls request_credential), a card marked Provide a credential appears above the composer. Its title is the model’s, such as “Root password for the NAS”.

The credential card in a conversation: to log in to the staging server, the model asks for the deploy account’s password. The title is the model’s, then its sentence on what it’s for, then Lyra’s line, “Password · Only for ssh://deploy@staging.atlas-api.dev”, the password field, No on the left, Save to vault and Submit on the right The credential card in a conversation: to log in to the staging server, the model asks for the deploy account’s password. The title is the model’s, then its sentence on what it’s for, then Lyra’s line, “Password · Only for ssh://deploy@staging.atlas-api.dev”, the password field, No on the left, Save to vault and Submit on the right
  • At the top is the model’s own sentence about what it’s for. The model wrote it, and it may be wrong.
  • The line under it is Lyra’s: the kind (Password, Login, Token or SSH key) and where it may be used, such as “Only for ssh://root@nas”. That line is what’s enforced.
  • Fill it in and press Submit. Tick Save to vault to keep it for later conversations; leave it unticked and it’s good for this conversation only.
  • If the Vault already holds one under the same name and kind, the card says Saved in the vault: press Use saved, or Enter a new one.
  • Press No to refuse. The model is told not to ask you to paste it into the chat.

For an SSH key, paste the whole private key (it starts with -----BEGIN), plus its passphrase if it has one. A wrong entry is named on the card: a public key, a wrong passphrase, or something that isn’t a private key.

Later, when you approve a command that uses a credential, its approval card lists Credentials it uses.

  • When ssh, scp, sudo or git asks for a password, Lyra answers.
  • An SSH key is lent to ssh, scp, rsync and git through Lyra’s own agent, so no -i is needed.
  • A token goes into an environment variable for the command that uses it.
  • In the built-in browser, the page is checked against Only for before anything is typed, and nothing is typed on any other site.
  • If the value finds its way back — a command prints it, a file the model reads contains it — the model sees [credential:nas-root].

The Vault is on the left-hand rail, under Studio. Everything saved from a card is here, and you can add your own.

The Vault: one credential of each kind — an SSH key, a token, a login and a password. Each row has the name and the kind, and under it the username and where it may be used, or “Any address” when it isn’t limited The Vault: one credential of each kind — an SSH key, a token, a login and a password. Each row has the name and the kind, and under it the username and where it may be used, or “Any address” when it isn’t limited
  1. Press Add and pick Password, Login, Token or SSH key.
  2. Give it a Name, such as “NAS admin”. The Reference name under it is made from the name and can be changed — lowercase letters, digits and hyphens only — until you save; after that it’s fixed.
  3. Enter the value.
  4. Under Only for, write ssh://user@host or https://site, or leave it empty for anywhere.
  5. Under Before a conversation uses it, choose when you’re asked: Ask once per conversation (the default), Ask every time it is used, or Don’t ask.

A saved value is never shown again. Click a row to change its name, Only for and Before a conversation uses it; to change the value, press Enter again and fill in every field of its kind.

The buttons on a row:

Button What it does
Copy reference Copies [credential:name]. Paste it into a message and that conversation can use the credential without a card (one set to Ask every time it is used still asks)
Copy password, Copy token Puts the value on the clipboard and clears it 30 seconds later, unless you’ve copied something else since
Copy public key For an SSH key, copies the public key line, which isn’t cleared
Delete Conversations using it lose it at once. This can’t be undone

Narrow Only for or delete an entry, and conversations already using it follow at once, not just new ones.

Ask “what’s the NAS password?” and the model still can’t see it. It can look up what the Vault holds with list_credentials, and name the right one in its reply. That name is drawn as a small chip: click it and the value is copied to the clipboard, then cleared 30 seconds later. A reference you paste into your own message becomes the same chip.

A chip for a name the Vault doesn’t have can’t be clicked.

If you paste a value the Vault holds, or one given on a card in this conversation, it’s swapped for its reference before the message is saved or sent. The model and the chat history only ever see [credential:name].

Credentials can only be entered on the computer. On the phone, a credential card can only be refused, and a chip in a reply only copies when clicked on the computer.

  • Values are stored encrypted in ~/.lyra/credentials.json, and the key to them is vault.key beside it. See Data and privacy.
  • Commands can’t read those two files: inside the sandbox they’re refused outright, and in full access you’re asked first, every time.