<commit_before>daniel(1)
=========

NAME
----
daniel - easy-to-use password generator

SYNOPSIS
--------
[verse]
'daniel' [-r] [-p] [-v <version>] [-f <flags>] [-l <length>] [-P <format>]
'daniel' [-r] [-p] [-v <version>] [-P <format>] -m
'daniel' [-r] [-f <flags>] [-l <length>] -e
'daniel' [-r] [-p] [-P <format>] <reminder>...
'daniel' [-r] -a <reminder>...

DESCRIPTION
-----------
daniel produces passwords based on a master password, a set of parameters
(password version, length, and flags), and a code which identifies the
particular password.  As part of the password generation process, a short
reminder is produces that encodes the parameters and code; with this reminder
and the master password, the generated password can be reproduced.


'daniel' [-r] [-p] [-v <version>] [-f <flags>] [-l <length>] [-P <format>]::
	Generate one or more passwords and their corresponding reminders.
+
The user is prompted for the master password on startup, and can change it using
the `!password` command at any code prompt.  After the password is entered,
daniel produces a 6-character checksum to reassure the user that the password is
correct.
+
After this, daniel prompts for a code that indicates the purpose of the
password.  For web site passwords, this is traditionally a shortened form of the
domain name (e.g. _github.com_ for GitHub), although an UTF-8 input is
acceptable.  Once the code is entered, a password is generated and output either
to standard output or, with `-p`, to the clipboard.  This is followed by a
reminder that can be used to recreate the password only with the correct master
password.
+
If the provided code starts with an exclamation point, it is taken as a bang
command. `!!` repeats the last non-command code.

'daniel' [-r] [-p] [-v <version>] [-P <format>] -m::
	Similar to the first form, but after the code prompt, the user is prompted to
	enter an existing password.  This password is encoded into the reminder, which
	is then output.  As with the first form, the reminder is useless without the
	correct master password.
+
This form is useful to encode existing credentials.

'daniel' [-r] [-f <flags>] [-l <length>] -e::
  Instead of generating a password, output statistics about the entropy of a
	password generated with those parameters.

'daniel' [-r] [-p] [-P <format>] <reminder>...::
  Use the specified reminders to regenerate and output their corresponding
	passwords.
+
After the user enters their master password, each password is output without
pausing.

'daniel' [-r] -a <reminder>...::
	Parse the given reminders and display the parameters and code encoded in them.

FLAG VALUES
~~~~~~~~~~~
Flags values are specified using the `-f` option.  The flags value can be
specified in decimal, octal, or hexadecimal (using standard C notation), or by
using a string indicating the permitted symbols.  Numerical interpretations have
priority.  The bits have the following meaning:

|===
|Flag |Meaning
|1    |Exclude all digits
|2    |Exclude spaces
|4    |Exclude those punctuation marks above the digits on a US keyboard
|8    |Exclude other symbols
|16   |Exclude letters
|===

Alternately, the string can be composed of the following:

|===
|Character                  |Meaning
|`0`                        |Include digits
|`A` or `a`                 |Include letters
|`s` or the space character |Include spaces
|`!`												|Include punctuation marks above the digits on a US
keyboard
|`:`, `+`, or `-`           |Include other symbols
|===

The `-m` option is represented using a flags value of exactly 32 (0x20).

COMMANDS
~~~~~~~~
Any string starting with an exclamation point that is entered at the code prompt
is considered a command.

|===
|Command              | Meaning
|`!!`                 | Repeat the previous code entry
|`!passphrase`        | Enter a new master password
|+!flags=_<value>_+   | Set a new flags value
|+!version=_<value>_+ | Change the password version
|+!length=_<value>_+  | Change the password length
|===

The `!!` command can be useful with the `-p` option if something else has been
copied to the clipboard in the mean time.

OPTIONS
-------
-f <flags>::
	Specify the set of characters permitted in the password.  A flags value of 0
	permits all printable ASCII characters (ASCII 32–ASCII 126).  The default, 10,
	is to exclude spaces and most punctuation marks, as these are forbidden by
	many sites.  Changing the flags value results in a completely different
	password.  To change the password at the code prompt, use `!flags=<flags>`.
+
Since daniel employs a cryptographically-secure PRNG to generate bytes and
selects the first bytes that match, a generated password might not contain a
particular type of character needed as part of a site's security policy.  In
this case, simply increase the version number until a suitable password is
chosen.

-l <length>::
	Specify the length of the password to be generated in characters.  The default
	is 16.  If two passwords are generated with identical parameters except for
	their length, one will start with the other.  That is, changing only the
	length does not produce a completely different password.  To change the length
	at the code prompt, use `!length=<length>`.

-P <format>::
	Produce output in an alternate format.  Besides the default format, _plain_,
	_bubblebabble_ is also accepted (for BubbleBabble format).

-p::
	If the clipboard gem is installed, copy the passwords to the clipboard instead
	of printing them to standard output.

-r::
	Produce machine-readable output.  Each non-empty line output starts with a
	colon, a message, a space, and one or more space-separated URI-encoded values.
	Messages ending with question marks are prompts for information; those with
	exclamation marks, an error; and the unmarked, a statement.

-v <version>::
	Specify a particular password version.  The default is 0.  This can be useful
	for institutions or websites that require frequently changing passwords.
	Changing the version number produces a completely different password unrelated
	to any others.  To change the password version at the code prompt, use
	`!version=<version>`.<commit_msg>Document the machine readable output format.<commit_after>daniel(1)
=========

NAME
----
daniel - easy-to-use password generator

SYNOPSIS
--------
[verse]
'daniel' [-r] [-p] [-v <version>] [-f <flags>] [-l <length>] [-P <format>]
'daniel' [-r] [-p] [-v <version>] [-P <format>] -m
'daniel' [-r] [-f <flags>] [-l <length>] -e
'daniel' [-r] [-p] [-P <format>] <reminder>...
'daniel' [-r] -a <reminder>...

DESCRIPTION
-----------
daniel produces passwords based on a master password, a set of parameters
(password version, length, and flags), and a code which identifies the
particular password.  As part of the password generation process, a short
reminder is produces that encodes the parameters and code; with this reminder
and the master password, the generated password can be reproduced.


'daniel' [-r] [-p] [-v <version>] [-f <flags>] [-l <length>] [-P <format>]::
	Generate one or more passwords and their corresponding reminders.
+
The user is prompted for the master password on startup, and can change it using
the `!password` command at any code prompt.  After the password is entered,
daniel produces a 6-character checksum to reassure the user that the password is
correct.
+
After this, daniel prompts for a code that indicates the purpose of the
password.  For web site passwords, this is traditionally a shortened form of the
domain name (e.g. _github.com_ for GitHub), although an UTF-8 input is
acceptable.  Once the code is entered, a password is generated and output either
to standard output or, with `-p`, to the clipboard.  This is followed by a
reminder that can be used to recreate the password only with the correct master
password.
+
If the provided code starts with an exclamation point, it is taken as a bang
command. `!!` repeats the last non-command code.

'daniel' [-r] [-p] [-v <version>] [-P <format>] -m::
	Similar to the first form, but after the code prompt, the user is prompted to
	enter an existing password.  This password is encoded into the reminder, which
	is then output.  As with the first form, the reminder is useless without the
	correct master password.
+
This form is useful to encode existing credentials.

'daniel' [-r] [-f <flags>] [-l <length>] -e::
  Instead of generating a password, output statistics about the entropy of a
	password generated with those parameters.

'daniel' [-r] [-p] [-P <format>] <reminder>...::
  Use the specified reminders to regenerate and output their corresponding
	passwords.
+
After the user enters their master password, each password is output without
pausing.

'daniel' [-r] -a <reminder>...::
	Parse the given reminders and display the parameters and code encoded in them.

FLAG VALUES
~~~~~~~~~~~
Flags values are specified using the `-f` option.  The flags value can be
specified in decimal, octal, or hexadecimal (using standard C notation), or by
using a string indicating the permitted symbols.  Numerical interpretations have
priority.  The bits have the following meaning:

|===
|Flag |Meaning
|1    |Exclude all digits
|2    |Exclude spaces
|4    |Exclude those punctuation marks above the digits on a US keyboard
|8    |Exclude other symbols
|16   |Exclude letters
|===

Alternately, the string can be composed of the following:

|===
|Character                  |Meaning
|`0`                        |Include digits
|`A` or `a`                 |Include letters
|`s` or the space character |Include spaces
|`!`												|Include punctuation marks above the digits on a US
keyboard
|`:`, `+`, or `-`           |Include other symbols
|===

The `-m` option is represented using a flags value of exactly 32 (0x20).

COMMANDS
~~~~~~~~
Any string starting with an exclamation point that is entered at the code prompt
is considered a command.

|===
|Command              | Meaning
|`!!`                 | Repeat the previous code entry
|`!passphrase`        | Enter a new master password
|+!flags=_<value>_+   | Set a new flags value
|+!version=_<value>_+ | Change the password version
|+!length=_<value>_+  | Change the password length
|===

The `!!` command can be useful with the `-p` option if something else has been
copied to the clipboard in the mean time.

MACHINE-READABLE FORMAT
~~~~~~~~~~~~~~~~~~~~~~~
In the machine-readable format, each non-empty line output starts with a colon,
a message, a space, and one or more space-separated URI-encoded values.
Messages ending with question marks are prompts for information; those with
exclamation marks, an error; and the unmarked, a statement.

The prompts are as follows:
|===
|Prompt              | Response
|`:code?`            | Enter the code
|`:existing?`        | Enter an existing password
|`:master-password?` | Enter the master password
|===

The statements are as follows:
|===
| Statement          | Meaning
|`:bits-per-char`    | The number of bits of entropy per character
|`:bits-total`       | Total number of bits of entropy
|`:checksum`         | The checksum
|`:code`             | The code from a reminder
|`:flags`            | The flags in decimal and described in text
|`:length`           | The password length
|`:mask`             | The mask used to encode an existing password
|`:password-version` | The reminder's password version
|`:possible-char`    | The number of possible characters
|`:reminder`         | The reminder
|`:version`          | The password algorithm version (always 0)
|===

OPTIONS
-------
-f <flags>::
	Specify the set of characters permitted in the password.  A flags value of 0
	permits all printable ASCII characters (ASCII 32–ASCII 126).  The default, 10,
	is to exclude spaces and most punctuation marks, as these are forbidden by
	many sites.  Changing the flags value results in a completely different
	password.  To change the password at the code prompt, use `!flags=<flags>`.
+
Since daniel employs a cryptographically-secure PRNG to generate bytes and
selects the first bytes that match, a generated password might not contain a
particular type of character needed as part of a site's security policy.  In
this case, simply increase the version number until a suitable password is
chosen.

-l <length>::
	Specify the length of the password to be generated in characters.  The default
	is 16.  If two passwords are generated with identical parameters except for
	their length, one will start with the other.  That is, changing only the
	length does not produce a completely different password.  To change the length
	at the code prompt, use `!length=<length>`.

-P <format>::
	Produce output in an alternate format.  Besides the default format, _plain_,
	_bubblebabble_ is also accepted (for BubbleBabble format).

-p::
	If the clipboard gem is installed, copy the passwords to the clipboard instead
	of printing them to standard output.

-r::
	Produce machine-readable output.

-v <version>::
	Specify a particular password version.  The default is 0.  This can be useful
	for institutions or websites that require frequently changing passwords.
	Changing the version number produces a completely different password unrelated
	to any others.  To change the password version at the code prompt, use
	`!version=<version>`.
{'fraction_non_alphanumeric': 0.09466074252579261, 'fraction_numerical': 0.003991264402439943, 'mean_word_length': 3.6826516220028207, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '455919', 'n_tokens_mistral': 3760, 'n_tokens_neox': 3558, 'n_words': 1884}