For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a secret from a script

When a script rotates a password, generates an API key, or receives a new token, it can store the value straight in your vault with devo secret set. The new value comes from an environment variable or a file, never from the command line.

Write the new value

devo secret set takes the field, then the entry. Add --yes to approve the change: without it, nothing is written.

devo secret set password "<entry-name>" --value-env NEW_PASSWORD --yes

--value-env takes the name of the variable, not its value.

devo secret set password "<entry-name>" --value-file <path-to-file> --yes

Use exactly one of --value-env or --value-file. To select the entry by ID, write id:<entry-id> or add --id; --vault-id selects the vault. To write to another workspace than the current one, add --context <context-name>.

For example, generate a password and store it without ever displaying it:

NEW_PASSWORD="$(devo generate password)" devo secret set password "<entry-name>" --value-env NEW_PASSWORD --yes

What each workspace type can write

WORKSPACE
FIELDS YOU CAN WRITE

Devolutions Server

Any data property of the entry, such as password, username, domain, or host. Sections aren't supported.

Devolutions Cloud

password only.

Local Devolutions Remote Desktop Manager profile

password only, for a workspace protected by a shared passphrase. See below.

Any other field on Devolutions Cloud or a local profile is refused with an error that says the workspace accepts writes to the password field only. devo secret capabilities --output json describes these rules for each workspace type. See Compare workspace types.

Local profiles: the workspace passphrase

To write to a local profile, Devolutions CLI needs the passphrase of the workspace. By default, it reads it from the file <workspace file>.passphrase in the profile folder. To use another source, add --passphrase-file <path> or --passphrase-env <variable-name>. Without a passphrase, the command stops and says where it looked. These two options are for local profiles only.

Good to know

Next

Last updated

Was this helpful?