Skip to main content

CLI Commands

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

testbench-defect-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.
startStart the defect 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. Client selection (JSONL or Jira)
  4. Client-specific configuration
testbench-defect-service init [--path PATH]

Options

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

Examples

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

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

configure

Update an existing configuration file interactively.

testbench-defect-service configure [OPTIONS]

Options

OptionDescription
--path PATHPath to the configuration file to update (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)
--client-onlyConfigure client settings only
--viewView the current configuration

Examples

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

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

# View current configuration
testbench-defect-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-defect-service set-credentials [OPTIONS]

Options

OptionDescription
--config PATHPath to the 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-defect-service set-credentials

# Non-interactive
testbench-defect-service set-credentials --username admin --password "s3cret!"
Security

Avoid passing passwords as command-line arguments in shared or audited environments, as they may appear in shell history. Prefer the interactive prompt or use an environment variable pipeline.


start

Start the defect service.

testbench-defect-service start [OPTIONS]

Options

OptionDescriptionDefault
--config PATHPath to the configuration fileconfig.toml
--client-class TEXTClient class name or module path (overrides config)from config
--client-config PATHPath to client configuration file (overrides config)from config
--host HOSTHost to bind to127.0.0.1
--port PORTPort to listen on8030
--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 client class names

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

  • JsonlDefectClient — for JSONL file storage
  • JiraDefectClient — for Jira Cloud / Data Center

Or provide a custom client (e.g. custom_client.py or custom_client.CustomClass).

Examples

# Start with defaults
testbench-defect-service start

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

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

# Use a different client
testbench-defect-service start --client-class JiraDefectClient --client-config jira.toml

# Use a custom client class
testbench-defect-service start --client-class custom_client.CustomDefectClient

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

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

Getting help

# General help
testbench-defect-service --help

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