2019-08-30 22:50:32 -04:00
.TH KEEPASSXC-CLI 1 "June 15, 2019"
2017-08-21 21:33:49 -04:00
.SH NAME
keepassxc-cli \- command line interface for the \fB KeePassXC\fP password manager.
.SH SYNOPSIS
.B keepassxc-cli
.I command
2019-10-25 14:45:38 -04:00
.B [
-I options
.B ]
2017-08-21 21:33:49 -04:00
.SH DESCRIPTION
2017-09-06 09:14:41 -04:00
\fB keepassxc-cli\fP is the command line interface for the \fB KeePassXC\fP password manager. It provides the ability to query and modify the entries of a KeePass database, directly from the command line.
2017-08-21 21:33:49 -04:00
.SH COMMANDS
2017-09-06 09:14:41 -04:00
.IP "add [options] <database> <entry>"
Adds a new entry to a database. A password can be generated (\fI -g\fP option), or a prompt can be displayed to input the password (\fI -p\fP option).
2019-08-30 22:50:32 -04:00
The same password generation options as documented for the generate command can be used when the \fI -g\fP option is set.
2017-09-06 09:14:41 -04:00
2019-06-24 18:03:42 -04:00
.IP "analyze [options] <database>"
2019-09-13 09:49:03 -04:00
Analyzes passwords in a database for weaknesses.
2019-06-24 18:03:42 -04:00
2017-08-21 21:33:49 -04:00
.IP "clip [options] <database> <entry> [timeout]"
2018-11-09 21:58:42 -05:00
Copies the password or the current TOTP (\fI -t\fP option) of a database entry to the clipboard. If multiple entries with the same name exist in different groups, only the password for the first one is going to be copied. For copying the password of an entry in a specific group, the group path to the entry should be specified as well, instead of just the name. Optionally, a timeout in seconds can be specified to automatically clear the clipboard.
2017-08-21 21:33:49 -04:00
2019-09-13 09:49:03 -04:00
.IP "close"
In interactive mode, closes the currently opened database (see \fI open\fP ).
2018-12-19 23:10:46 -05:00
.IP "create [options] <database>"
Creates a new database with a key file and/or password. The key file will be created if the file that is referred to does not exist. If both the key file and password are empty, no database will be created.
2018-01-31 05:15:23 -05:00
.IP "diceware [options]"
2019-09-13 09:49:03 -04:00
Generates a random diceware passphrase.
2018-01-19 09:48:40 -05:00
2017-09-06 09:14:41 -04:00
.IP "edit [options] <database> <entry>"
Edits a database entry. A password can be generated (\fI -g\fP option), or a prompt can be displayed to input the password (\fI -p\fP option).
2019-08-30 22:50:32 -04:00
The same password generation options as documented for the generate command can be used when the \fI -g\fP option is set.
2017-09-06 09:14:41 -04:00
2017-12-04 09:46:23 -05:00
.IP "estimate [options] [password]"
Estimates the entropy of a password. The password to estimate can be provided as a positional argument, or using the standard input.
2017-08-21 21:33:49 -04:00
2019-09-13 09:49:03 -04:00
.IP "exit"
Exits interactive mode. Synonymous with \fI quit\fP .
2019-06-16 21:33:13 -04:00
.IP "export [options] <database>"
Exports the content of a database to standard output in the specified format (defaults to XML).
2017-08-21 21:33:49 -04:00
2018-01-31 05:15:23 -05:00
.IP "generate [options]"
2019-09-13 09:49:03 -04:00
Generates a random password.
.IP "help [command]"
Displays a list of available commands, or detailed information about the specified command.
2018-01-31 05:15:23 -05:00
2019-10-14 08:37:26 -04:00
.IP "import [options] <xml> <database>"
Imports the contents of an XML database to the target database.
2017-08-21 21:33:49 -04:00
.IP "locate [options] <database> <term>"
Locates all the entries that match a specific search term in a database.
.IP "ls [options] <database> [group]"
Lists the contents of a group in a database. If no group is specified, it will default to the root group.
.IP "merge [options] <database1> <database2>"
Merges two databases together. The first database file is going to be replaced by the result of the merge, for that reason it is advisable to keep a backup of the two database files before attempting a merge. In the case that both databases make use of the same credentials, the \fI --same-credentials\fP or \fI -s\fP option can be used.
2019-09-12 11:08:28 -04:00
.IP "mkdir [options] <database> <group>"
Adds a new group to a database.
.IP "mv [options] <database> <entry> <group>"
Moves an entry to a new group.
2019-09-13 09:49:03 -04:00
.IP "open [options] <database>"
Opens the given database in a shell-style interactive mode. This is useful for performing multiple operations on a single database (e.g. \fI ls\fP followed by \fI show\fP ).
.IP "quit"
Exits interactive mode. Synonymous with \fI exit\fP .
2017-09-06 09:14:41 -04:00
.IP "rm [options] <database> <entry>"
Removes an entry from a database. If the database has a recycle bin, the entry will be moved there. If the entry is already in the recycle bin, it will be removed permanently.
2019-09-12 11:08:28 -04:00
.IP "rmdir [options] <database> <group>"
Removes a group from a database. If the database has a recycle bin, the group will be moved there. If the group is already in the recycle bin, it will be removed permanently.
2017-08-21 21:33:49 -04:00
.IP "show [options] <database> <entry>"
2018-11-09 21:58:42 -05:00
Shows the title, username, password, URL and notes of a database entry. Can also show the current TOTP. Regarding the occurrence of multiple entries with the same name in different groups, everything stated in the \fI clip\fP command section also applies here.
2017-08-21 21:33:49 -04:00
.SH OPTIONS
2017-09-06 09:14:41 -04:00
.SS "General options"
2019-02-18 20:17:28 -05:00
.IP "--debug-info"
Displays debugging information.
2017-08-21 21:33:49 -04:00
.IP "-k, --key-file <path>"
2019-09-13 09:49:03 -04:00
Specifies a path to a key file for unlocking the database. In a merge operation this option, is used to specify the key file path for the first database.
2017-08-21 21:33:49 -04:00
2019-03-24 08:51:40 -04:00
.IP "--no-password"
2019-09-13 09:49:03 -04:00
Deactivates the password key for the database.
2019-03-24 08:51:40 -04:00
2019-09-21 12:31:44 -04:00
.IP "-y, --yubikey <slot>"
Specifies a yubikey slot for unlocking the database. In a merge operation this option is used to specify the yubikey slot for the first database.
2018-11-28 11:24:12 -05:00
.IP "-q, --quiet <path>"
2019-09-13 09:49:03 -04:00
Silences password prompt and other secondary outputs.
2018-11-28 11:24:12 -05:00
2017-08-21 21:33:49 -04:00
.IP "-h, --help"
Displays help information.
.IP "-v, --version"
2019-02-18 20:17:28 -05:00
Displays the program version.
2017-08-21 21:33:49 -04:00
2017-09-06 09:14:41 -04:00
.SS "Merge options"
2019-06-18 21:45:24 -04:00
.IP "-d, --dry-run <path>"
2019-09-13 09:49:03 -04:00
Prints the changes detected by the merge operation without making any changes to the database.
2019-06-18 21:45:24 -04:00
2019-12-21 09:46:01 -05:00
.IP "--key-file-from <path>"
2019-09-13 09:49:03 -04:00
Sets the path of the key file for the second database.
2017-09-06 09:14:41 -04:00
2019-03-24 08:51:40 -04:00
.IP "--no-password-from"
2019-09-13 09:49:03 -04:00
Deactivates password key for the database to merge from.
2019-03-24 08:51:40 -04:00
2019-09-21 12:31:44 -04:00
.IP "--yubikey-from <slot>"
Yubikey slot for the second database.
2017-09-06 09:14:41 -04:00
.IP "-s, --same-credentials"
2019-09-13 09:49:03 -04:00
Uses the same credentials for unlocking both databases.
2017-09-06 09:14:41 -04:00
.SS "Add and edit options"
2019-08-30 22:50:32 -04:00
The same password generation options as documented for the generate command can be used
with those 2 commands when the -g option is set.
2017-09-06 09:14:41 -04:00
.IP "-u, --username <username>"
2019-09-13 09:49:03 -04:00
Specifies the username of the entry.
2017-09-06 09:14:41 -04:00
.IP "--url <url>"
2019-09-13 09:49:03 -04:00
Specifies the URL of the entry.
2017-09-06 09:14:41 -04:00
.IP "-p, --password-prompt"
2019-09-13 09:49:03 -04:00
Uses a password prompt for the entry's password.
2017-09-06 09:14:41 -04:00
.IP "-g, --generate"
2019-09-13 09:49:03 -04:00
Generates a new password for the entry.
2017-09-06 09:14:41 -04:00
.SS "Edit options"
.IP "-t, --title <title>"
2019-09-13 09:49:03 -04:00
Specifies the title of the entry.
2017-09-06 09:14:41 -04:00
2017-12-04 09:46:23 -05:00
.SS "Estimate options"
.IP "-a, --advanced"
2019-09-13 09:49:03 -04:00
Performs advanced analysis on the password.
2017-12-04 09:46:23 -05:00
2019-06-24 18:03:42 -04:00
.SS "Analyze options"
.IP "-H, --hibp <filename>"
2019-09-13 09:49:03 -04:00
Checks if any passwords have been publicly leaked, by comparing against the given
2019-06-24 18:03:42 -04:00
list of password SHA-1 hashes, which must be in "Have I Been Pwned" format. Such
files are available from https://haveibeenpwned.com/Passwords; note that they
are large, and so this operation typically takes some time (minutes up to an
hour or so).
2018-11-09 21:58:42 -05:00
.SS "Clip options"
.IP "-t, --totp"
2019-09-13 09:49:03 -04:00
Copies the current TOTP instead of current password to clipboard. Will report
an error if no TOTP is configured for the entry.
2018-11-09 21:58:42 -05:00
2017-12-16 19:14:39 -05:00
.SS "Show options"
.IP "-a, --attributes <attribute>..."
2019-09-13 09:49:03 -04:00
Shows the named attributes. This option can be specified more than once,
2017-12-16 19:14:39 -05:00
with each attribute shown one-per-line in the given order. If no attributes are
2018-11-09 21:58:42 -05:00
specified and \fI -t\fP is not specified, a summary of the default attributes is given.
2019-10-28 13:27:29 -04:00
Protected attributes will be displayed in clear text if specified explicitly by this option.
.IP "-s, --show-protected"
Shows the protected attributes in clear text.
2018-11-09 21:58:42 -05:00
.IP "-t, --totp"
2019-09-13 09:49:03 -04:00
Also shows the current TOTP, reporting an error if no TOTP is configured for
the entry.
2017-12-16 19:14:39 -05:00
2018-01-19 09:48:40 -05:00
.SS "Diceware options"
2018-01-31 05:15:23 -05:00
.IP "-W, --words <count>"
2019-09-13 09:49:03 -04:00
Sets the desired number of words for the generated passphrase. [Default: 7]
2018-01-31 05:15:23 -05:00
2018-01-20 20:32:46 -05:00
.IP "-w, --word-list <path>"
2019-09-13 09:49:03 -04:00
Sets the Path of the wordlist for the diceware generator. The wordlist must
have > 1000 words, otherwise the program will fail. If the wordlist has < 4000
words a warning will be printed to STDERR.
2018-01-19 09:48:40 -05:00
2019-06-16 21:33:13 -04:00
.SS "Export options"
.IP "-f, --format"
Format to use when exporting. Available choices are xml or csv. Defaults to xml.
2018-11-08 14:42:44 -05:00
.SS "List options"
.IP "-R, --recursive"
2019-09-13 09:49:03 -04:00
Recursively lists the elements of the group.
2018-11-08 14:42:44 -05:00
2019-06-18 20:42:19 -04:00
.IP "-f, --flatten"
Flattens the output to single lines. When this option is enabled, subgroups and subentries will be displayed with a relative group path instead of indentation.
2018-11-08 14:42:44 -05:00
2018-01-31 05:15:23 -05:00
.SS "Generate options"
.IP "-L, --length <length>"
2019-09-13 09:49:03 -04:00
Sets the desired length for the generated password. [Default: 16]
2018-01-19 09:48:40 -05:00
2019-08-30 22:50:32 -04:00
.IP "-l --lower"
2019-09-13 09:49:03 -04:00
Uses lowercase characters for the generated password. [Default: Enabled]
2018-01-19 09:48:40 -05:00
2019-08-30 22:50:32 -04:00
.IP "-U --upper"
2019-09-13 09:49:03 -04:00
Uses uppercase characters for the generated password. [Default: Enabled]
2018-01-19 09:48:40 -05:00
2019-08-30 22:50:32 -04:00
.IP "-n --numeric"
2019-09-13 09:49:03 -04:00
Uses numbers characters for the generated password. [Default: Enabled]
2018-01-19 09:48:40 -05:00
2019-08-30 22:50:32 -04:00
.IP "-s --special"
2019-09-13 09:49:03 -04:00
Uses special characters for the generated password. [Default: Disabled]
2018-01-19 09:48:40 -05:00
2019-08-30 22:50:32 -04:00
.IP "-e --extended"
2019-09-13 09:49:03 -04:00
Uses extended ASCII characters for the generated password. [Default: Disabled]
2018-01-19 09:48:40 -05:00
2019-08-30 22:50:32 -04:00
.IP "-x --exclude <chars>"
Comma-separated list of characters to exclude from the generated password. None is excluded by default.
.IP "--exclude-similar"
Exclude similar looking characters. [Default: Disabled]
.IP "--every-group"
Include characters from every selected group. [Default: Disabled]
2018-01-19 09:48:40 -05:00
2017-08-22 17:16:59 -04:00
.SH REPORTING BUGS
Bugs and feature requests can be reported on GitHub at https://github.com/keepassxreboot/keepassxc/issues.
2017-08-21 21:33:49 -04:00
.SH AUTHOR
2018-11-09 19:15:50 -05:00
This manual page was originally written by Manolis Agkopian <m.agkopian@gmail.com>,
and is maintained by the KeePassXC Team <team@keepassxc.org>.