Skip to content

Listing the Current Services

Dave Walker edited this page Jan 28, 2025 · 1 revision

The following forms of the "list" command are accepted:

  • List all entries
  • List by Id
  • List by service name
  • List by service and account name

List all Entries

To list all entries in the database, use the following form of the command:

/path/to/OtpGenerator.Terminal --list

Where:

Argument Comments
/path/to/OtpGenerator.Terminal The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows

List a Service by ID

Listing by Id lists the details for a single service specified using its Id.

Each service is assigned a unique "Id" when it's added to the database. This is shown when 2FA codes are generated and when the contents of the database are listed. For example:

Service List

This Id can be used to specify a service to be listed as follows:

/path/to/OtpGenerator.Terminal --list id

Where:

Argument Comments
/path/to/OtpGenerator.Terminal The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows
id The unique Id for the service/account pair

List a Service by Service and Account Name

To list a single entry given its name and the associated account, use the following form of the command:

/path/to/OtpGenerator.Terminal --list "service" "account"

Where:

Argument Comments
/path/to/OtpGenerator.Terminal The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows
service The service name
account The account name

Values need only be quoted "..." if they contain special characters or spaces.

List All Entries for a Service

To list entries for all accounts at a specific service use the following form of the command:

/path/to/OtpGenerator.Terminal --list "service"

Where:

Argument Comments
/path/to/OtpGenerator.Terminal The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows
service The service name

Values need only be quoted "..." if they contain special characters or spaces.

Output

For all forms of the command, the output is similar to the following screen shot. Only the number of entries shown may differ.

List Services

Showing the Service Secrets

By default, the secrets for each service are masked, as shown in the previous screenshot. To show them, add "--show-secrets" to any of the above commands. For example:

/path/to/OtpGenerator.Terminal --list --show-secrets

Where:

Argument Comments
/path/to/OtpGenerator.Terminal The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows

This will list all entries in the database and will not mask the secrets:

List Services and Secrets

Clone this wiki locally