Skip to main content
Version: 1.3.1

CLI Commands

The executable is testbench-requirement-service. All commands support --help for detailed usage.

testbench-requirement-service [COMMAND] [OPTIONS]

Commands overview​

CommandDescription
initInteractive wizard to create a new configuration file from scratch.
configureCreate or update an existing configuration interactively.
set-credentialsSet the service username and password.
migrateConvert a legacy .conf / .properties configuration into a TOML configuration.
startStart the requirement service.

init​

Create a new configuration file with an interactive wizard.

The wizard guides you through:

  1. Service settings (host, port)
  2. Credential setup (username, password)
  3. Reader selection (JSONL, Excel, Jira, or Custom)
  4. Reader-specific configuration
testbench-requirement-service init [--path PATH]

Options​

OptionDescriptionDefault
--path PATHPath to the configuration file to createconfig.toml

Examples​

# Create config.toml in the current directory
testbench-requirement-service init

# Create config at a custom path
testbench-requirement-service init --path /etc/requirement-service/config.toml

configure​

Update an existing configuration file interactively.

testbench-requirement-service configure [OPTIONS]

Options​

OptionDescription
--path PATHPath to the app configuration file (default: config.toml)
--fullRun the full configuration wizard (skip the menu)
--service-onlyConfigure service settings only (host, port, debug)
--credentials-onlyConfigure credentials only (username, password)
--reader-onlyConfigure reader settings only
--viewView the current configuration

Examples​

# Interactive menu (default)
testbench-requirement-service configure

# Update only service settings
testbench-requirement-service configure --service-only

# View current configuration
testbench-requirement-service configure --view

set-credentials​

Set or update the HTTP Basic Auth credentials used to protect API endpoints. This command generates a secure password hash and salt and stores them in your configuration file.

testbench-requirement-service set-credentials [OPTIONS]

Options​

OptionDescription
--path PATHPath to the app configuration file (default: config.toml)
--username TEXTUsername (prompts interactively if not provided)
--password TEXTPassword (prompts interactively if not provided)

Examples​

# Interactive (prompts for credentials)
testbench-requirement-service set-credentials

# Non-interactive
testbench-requirement-service set-credentials --username admin --password mypassword

migrate​

Convert a legacy .conf / .properties configuration into a TOML configuration file.

The previous TestBench requirement wrappers were configured with a Jira .conf file or an Excel .properties file. migrate reads one of those, asks for the settings the legacy format never carried - how to authenticate against Jira, and the credentials that protect the service's own API - and writes a ready-to-use configuration file.

The converted values are validated against the same reader models the service uses at startup, so anything the service would reject is reported during the migration instead of on the first start. A legacy file the converter cannot read is rejected with the file and line number — and, when the line is separated the other format's way, with the --type to use instead. Legacy entries that have no equivalent in the new configuration are listed before the file is written, so a partial migration cannot pass for a complete one.

testbench-requirement-service migrate --from PATH [OPTIONS]
tip

The Migration guide walks through the whole procedure — which legacy keys are carried over, what you are asked for, and how to reconnect TestBench afterwards.

Options​

OptionDescriptionDefault
--from PATHLegacy .conf or .properties file to convert (required)-
--path PATHPath to the configuration file to writeconfig.toml
--type [excel|jira]Legacy source typedetected from the file extension

The source type follows from the extension: .conf is a Jira wrapper configuration, .properties an Excel one. Pass --type when the file has been renamed and the extension no longer says which format it is.

Examples​

# Convert a legacy Jira wrapper configuration
testbench-requirement-service migrate --from jira.conf

# Convert a legacy Excel wrapper configuration to a custom path
testbench-requirement-service migrate --from genericexcel.properties --path /etc/requirement-service/config.toml

# Convert a wrapper file whose extension no longer identifies the format
testbench-requirement-service migrate --from wrapper.txt --type jira
Existing configurations

If the target file already exists you are asked to confirm, and it is renamed to config.toml.backup (timestamped when a backup is already present) before the new file is written. The conversion runs to completion first, so cancelling any prompt leaves your existing configuration exactly as it was.

note

Only the Jira and Excel readers have a legacy wrapper format to migrate from. Configure the JSONL and SQL readers with init or configure.


start​

Start the TestBench Requirement Service.

testbench-requirement-service start [OPTIONS]

Options​

OptionDescriptionDefault
--config PATHPath to the app configuration fileconfig.toml
--reader-class TEXTReader class name or module path (overrides config)from config
--reader-config PATHPath to reader configuration file (overrides config)from config
--host HOSTHost to bind to127.0.0.1
--port PORTPort to listen on8020
--devRun in development mode (debug + auto reload)off
--ssl-cert PATHPath to SSL certificate file for HTTPS—
--ssl-key PATHPath to SSL private key file for HTTPS—
--ssl-ca-cert PATHPath to CA certificate file for client verification (mTLS)—

Command-line arguments take precedence over configuration file settings.

Built-in reader class names

When using --reader-class, you can specify:

  • JsonlRequirementReader — for JSONL files
  • ExcelRequirementReader — for Excel/CSV files
  • JiraRequirementReader — for Jira API

Or provide a custom reader (e.g. custom_reader.py or custom_reader.CustomClass).

Examples​

# Start with defaults
testbench-requirement-service start

# Development mode
testbench-requirement-service start --dev

# Override host and port
testbench-requirement-service start --host 0.0.0.0 --port 9000

# Use a different reader
testbench-requirement-service start --reader-class JiraRequirementReader --reader-config jira_config.toml

# Use a custom reader class
testbench-requirement-service start --reader-class custom_reader.CustomRequirementReader

# Start with HTTPS
testbench-requirement-service start --ssl-cert certs/server.crt --ssl-key certs/server.key

# Start with mutual TLS (mTLS)
testbench-requirement-service start --ssl-cert certs/server.crt --ssl-key certs/server.key --ssl-ca-cert certs/ca.crt

Getting help​

# General help
testbench-requirement-service --help

# Help for a specific command
testbench-requirement-service start --help
testbench-requirement-service configure --help