Secret commands
This page lists every argument and option of the commands that read, inject, and write secrets (devo secret), connect SecretSpec (devo secretspec), and generate passwords and keys (devo generate). For an overview of all commands, see Commands. For step-by-step help, see Use secrets without exposing them, Run a command with its secrets, Use secrets in your current shell, Fill a configuration file from a template, Update a secret from a script, Use Devolutions CLI with SecretSpec and Generate passwords and SSH keys.
The options every command accepts, such as --context, --source, or --output json, are in Global options. The syntax of devo:// references is in Secret reference syntax.
devo secret run
Runs a command with references resolved into its environment only. Resolved values are replaced with <concealed by Devolutions> in what the command prints, unless you add --no-masking.
Workspace: All workspace types
devo secret run [--env-ref <NAME>=<reference>]... [--env-file <path>] [--stdin-reference <reference>] [--timeout-seconds <seconds>] -- <command> [<arguments>]
devo secret run --manifest <path>-- <command> [<arguments>]
The command to run and its arguments, after --. Required, unless you use --manifest. An argument that is a reference is refused: pass references with --env-ref, --stdin-reference, --env-file, or --manifest. A reference inside a longer argument, such as --password=devo://…, isn't refused but isn't resolved either.
--env-ref <NAME>=<reference>
Puts the value of a reference in the environment variable NAME of the command. Repeat for several variables. The name must use letters, digits, and underscores, and can't start with a digit. The value must be an exact devo:// reference.
--env-file <path>
Environment file of KEY=value lines. Empty lines and lines that start with # are ignored; quotes around a value are removed. Values can be references. A line without = stops the command with exit code 2. A variable of the file replaces a variable of your environment with the same name. See Take the passwords out of a .env file.
--stdin-reference <reference>
Reference whose value is written, exactly, to the command's standard input. It must be an exact devo:// reference; named and canonical references both work.
--manifest <path>
Launch manifest: a versioned JSON file that holds the command, its arguments, its references, and, optionally, a standard-input reference, a timeout, and a working folder (an absolute folder that exists). Can't be combined with --env-ref, --env-file, --stdin-reference, --timeout-seconds, or a command after --. With a manifest, variables of your environment that hold a reference aren't resolved.
--timeout-seconds <seconds>
None
Maximum run time of the command, greater than zero. When it's exceeded, the command is stopped and devo exits with code 124. Without it, there's no time limit.
--receipt-file <path>
Writes a receipt of the launch after the command ends: a JSON file with the launch plan, the variable names, the exit code, and the duration, without any value. The file must not exist yet. If it does, the command still runs, but the receipt isn't written and devo exits with code 1 instead of the exit code of your command.
--check
Off
Checks that the command exists and that the references are well formed, without reading any secret or starting the command. On a local profile, and for a named reference, it also checks that the vault and the entry exist; on Devolutions Cloud and Devolutions Server, a canonical reference isn't looked up. Can't be combined with --dry-run.
--dry-run
Off
Checks the launch plan and shows it, without contacting your workspace, looking for the command, reading any secret, or starting the command. Can't be combined with --check.
--no-masking
Off
Stops replacing resolved values with <concealed by Devolutions> in what the command prints on its standard output and error output.
Besides --env-ref and --env-file, any variable of your environment whose value is a devo:// reference is resolved for the command, unless you use --manifest. The same variable name can't come from two sources, for example an --env-ref and a variable of your environment: the command stops instead.
Exit codes: an invalid launch, such as a malformed --env-ref or both --check and --dry-run, exits with 2 before anything is read. A timeout exits with 124, a cancellation with Ctrl+C with 130. Otherwise, devo secret run exits with the exit code of your command. See Exit codes and errors.
devo secret read
Reads one reference and writes the value to the terminal or a file.
Workspace: All workspace types
<reference>
The reference to read, such as devo://<workspace>/<vault>/<entry>/password. Required. A malformed reference is refused before anything is read. See Secret reference syntax.
--attribute <attribute> (--attr)
What to read about the field: value, type, id, title, or purpose, in any case. otp is accepted but returns nothing. Any other value is refused. Without this option, the reference's own ?attribute= applies, or value. See Attributes.
--out-file <path> (-f)
Writes the value to a file instead of the terminal. The folder must exist and the path can't be a folder. With text output, nothing else is printed; with --output json, the result is printed without the value.
--force
Off
Overwrites the --out-file file if it exists. Without it, an existing file is refused.
--raw
Off
With text output, writes exactly the value to standard output, without a line break at the end. Without it, a line break follows the value.
devo secret get
Reads one field of an entry of the selected workspace, by entry name or ID, without writing a reference.
Workspace: All workspace types
<field>
The field to read, such as password, username, domain, host, otp, or privatekey. Required. Devolutions Server reads any data property of the entry.
<entry>
The entry name, or its ID with id:<value> or --id. Required.
--id
Off
Treats <entry> as an ID.
--workspace <workspace>
Current workspace
Workspace of the entry, by name or ID.
--vault <vault>
Current vault
Vault of the entry, by name or ID.
--vault-id <id>
Vault of the entry, by ID. Takes priority over --vault. With an entry ID and no vault option, the current vault is used; if no vault is selected, the command asks for --vault-id.
--section <section>
Section of the field, when the field is in a section. Can't be combined with an entry ID or with the passphrase options.
--attribute <attribute> (--attr)
value
What to read about the field: value, type, id, title, or purpose. otp is accepted but returns nothing. With a passphrase option, only value is accepted.
--passphrase-env <variable>
Local profile only: name of the environment variable that holds the passphrase of a protected workspace. Refused on Devolutions Cloud and Devolutions Server. Needs the entry ID (id:<value> or --id). With a passphrase option, only the password field can be read, only one of the two passphrase options can be given, only text output is accepted, and without --vault-id or --vault the default vault of the workspace is used.
--passphrase-file <path>
Local profile only: private file that holds the passphrase of a protected workspace. Same rules as --passphrase-env.
--out-file <path> (-f)
Writes the value to a file instead of the terminal. Same rules as for devo secret read.
--force
Off
Overwrites the --out-file file if it exists.
--raw
Off
With text output, writes exactly the value to standard output, without a line break at the end.
devo secret set
Writes one secret field of an entry, with the new value from an environment variable or a file. The new value is never printed.
Workspace: All workspace types. Devolutions Server writes any data property of the entry; Devolutions Cloud and local profiles write password only.
<field>
The field to write. Required. On Devolutions Cloud and a local profile, any field other than password is refused with an error that says the workspace accepts writes to the password field only.
<entry>
The entry name, or its ID with id:<value> or --id. Required.
--id
Off
Treats <entry> as an ID.
--vault-id <id>
Vault of the entry, by ID. On a local profile, with an entry ID and no --vault-id, the default vault of the workspace is used. On Devolutions Cloud, without it, the current vault is used.
--value-env <variable>
Name of the environment variable that holds the new value. Use exactly one of --value-env or --value-file.
--value-file <path>
File that holds the new value.
--passphrase-env <variable>
Local profile only: name of the environment variable that holds the passphrase of a protected workspace. Refused on Devolutions Cloud and Devolutions Server.
--passphrase-file <path>
<workspace file>.passphrase
Local profile only: private file that holds the passphrase of a protected workspace. Without either passphrase option, the file <workspace file>.passphrase in the profile folder is used. Refused on Devolutions Cloud and Devolutions Server.
--yes (-y, --confirmed)
Off
Confirms the change. Required: without it, nothing is written.
devo secret inject
Replaces the references in a text, from standard input or a file, with their values.
Workspace: All workspace types
--in-file <path> (-i)
Standard input
Template to read.
--out-file <path> (-f)
Standard output
File to write. The folder must exist and the path can't be a folder.
--force
Off
Overwrites the --out-file file if it exists. Without it, an existing file is refused.
If any reference in the template can't be resolved, nothing is written and the command exits with code 1. With --output json or --output yaml, the command prints a summary instead of the filled text: use --out-file to get the text. See Fill a configuration file from a template.
devo secret shell enter
Prints shell code that loads references into your current Bash or PowerShell session. Run that code with eval (Bash) or Invoke-Expression (PowerShell). See Use secrets in your current shell.
Workspace: All workspace types
--shell <shell>
Shell to write code for: bash, or pwsh (powershell works the same). Required. Any other value is refused.
--env-ref <NAME>=<reference>
Variable to load and its reference. Repeat for several variables. At least one is required. Each name must be unique, without regard to case. The command doesn't read your environment or .env files.
--check
Off
Checks the references, as devo secret run --check does, without reading any secret or writing shell code. Needs --output json.
Without --check, the command needs text output, so the shell can run what it prints. If a reference can't be read, nothing is printed on standard output and the command exits with a non-zero code.
devo secret shell leave
Prints shell code that undoes the most recent devo secret shell enter, restoring each variable as it was before.
Workspace: All workspace types
--shell <shell>
Shell to write code for: bash or pwsh (powershell works the same). Required. Use the same value as for enter. The command needs text output.
devo secret shell status
Shows whether a scope from devo secret shell enter is active in the current shell, how many scopes are nested, and the names of the variables set by the most recent one. It never shows values.
Workspace: All workspace types
--shell <shell>
Shell to inspect: bash or pwsh (powershell works the same). Required. The command needs --output json.
devo secret catalog entry
Lists the devo:// references of an entry's fields, ready to copy, without any value. Same as devo entry references. See Find the reference to a secret.
Workspace: All workspace types
<entry>
The entry name, or its ID with id:<value> or --id. Required.
--id
Off
Treats <entry> as an ID.
--vault-id <id>
Vault of the entry, by ID. On Devolutions Cloud, without a vault option, the current vault is used.
--vault-name <name>
Vault of the entry, by name.
devo secret capabilities
Describes, for Devolutions Cloud, Devolutions Server, and local profiles, what the secret commands support, such as which fields can be read and written. No value is returned, and no workspace is contacted.
Workspace: All workspace types
This command has no arguments or options of its own.
devo secretspec register
Registers this devo as the SecretSpec provider for devo:// provider URIs, by writing a devo.secretspec.json claim file. See Use Devolutions CLI with SecretSpec for where the file goes.
Workspace: All workspace types
--system
Off
Writes the claim for every user of the computer instead of only for you. This usually needs administrator rights.
--executable <path>
This devo
The devo executable to register. The path must be absolute and the file must exist. A path to the dotnet host is refused: register the published devo executable.
--environment <name> (--env)
Extra environment variable SecretSpec may pass to devo, by exact name or by prefix ending in *, such as DEVO_*. Repeat for several. A name uses letters, digits, and underscores and can't start with a digit; anything else is refused. RDM_CONFIG_PATH and DEVO_CLI_CONFIG_HOME are always included.
--force
Off
Replaces an existing claim that registers an executable that isn't a devo executable. A claim that points at another devo executable is replaced without --force.
--dry-run
Off
Shows the claim that would be written, without writing it.
If the same claim is already in place, nothing is written and the command reports it as unchanged.
devo secretspec unregister
Removes the devo.secretspec.json claim, so SecretSpec no longer starts Devolutions CLI. If there's no claim, the command reports it as absent.
Workspace: All workspace types
--system
Off
Removes the claim for every user of the computer instead of yours.
--dry-run
Off
Shows the claim that would be removed, without removing it.
devo secretspec status
Shows the claim for your user and the claim for the computer, and for each one whether it points at the devo you're running.
Workspace: All workspace types
This command has no arguments or options of its own.
devo secretspec uri
Prints the provider URI to put in secretspec.toml for the selected workspace: the one given with --source or --context, or the current context.
Workspace: All workspace types
--vault-id <id>
Default vault for the provider. A secret can still name its own vault. Without it, every secret must name its vault.
--workspace-id <id>
Local profile only, and required there: the workspace ID, written sqlite:<file-name>.db, such as sqlite:Connections.db. devo workspace current shows it. Refused for Devolutions Cloud and Devolutions Server, whose URIs select a context instead.
devo secretspec provider
Serves the SecretSpec provider protocol over standard input and output. SecretSpec starts it on its own through the registered claim; you don't run it yourself.
Workspace: All workspace types
This command has no arguments or options of its own.
devo generate password
Generates a strong random password on your computer. It always contains at least one lowercase letter, one uppercase letter, one digit, and one symbol from !@#$%^&*?. Like every devo generate command, it doesn't contact any workspace or start the background process.
Workspace: All workspace types (works on your computer only)
--length <length>
32
Length of the password, from 8 to 4096. 0 or a negative value means the default, 32. Any other value outside the range is refused.
devo generate human-readable
Generates a password that's easy to read: pronounceable lowercase syllables, then digits, then symbols.
Workspace: All workspace types (works on your computer only)
--syllables <count>
4
Number of syllables, each one a consonant and a vowel, from 1 to 64.
--numerics <count>
1
Number of digits added after the syllables, from 0 to 64.
--symbols <count>
1
Number of symbols from !@#$%^&*? added at the end, from 0 to 64.
devo generate passphrase
Generates a passphrase made of random words from a dictionary.
Workspace: All workspace types (works on your computer only)
--words <count>
5
Number of words, from 1 to 64.
--separator <text>
-
Text placed between the words. An empty value means the default, -.
--dictionary <dictionary>
English
Word list: English (or en), French (or fr), or German (or de), in any case. Any other value is refused.
devo generate pattern
Generates a password from a pattern, one character per letter of the pattern.
Workspace: All workspace types (works on your computer only)
<pattern>
The pattern. Required, up to 4096 letters. Each letter gives one character: u uppercase letter, l lowercase letter, d digit, s symbol from !@#$%^&*?, x any of these. Letters are accepted in any case; any other character is refused. For example, uulldds.
--shuffle
Off
Mixes the generated characters, so their order no longer follows the pattern.
devo generate ssh-key
Generates an RSA key pair on your computer: a private key in PEM format, encrypted when you give a passphrase, and a public key in OpenSSH format. The public key is also printed.
Workspace: All workspace types (works on your computer only)
--out-file <path>
Private key file. Required. The folder must exist. On macOS and Linux, only your user account can read the file.
--public-out-file <path>
<out-file>.pub
Public key file. It must be different from --out-file.
--algorithm <algorithm>
rsa
Key algorithm. rsa is the only supported value.
--bits <bits>
3072
RSA key size: 2048, 3072, or 4096. Any other value is refused.
--comment <text>
Your user name
Comment at the end of the public key. It can't contain control characters.
--passphrase-env <variable>
Name of the environment variable that holds the passphrase that protects the private key. The variable must be set and not empty. Use this option or --passphrase-file, not both. Without either one, the private key isn't encrypted.
--passphrase-file <path>
File that holds the passphrase. The file must exist and not be empty; line breaks at its end are ignored.
--force
Off
Overwrites the key files if they exist. Without it, an existing file is refused.
Next
Last updated
Was this helpful?