Framework choice guide

August 9, 2026 ยท View on GitHub

base-cli is intentionally a lifecycle layer, not a replacement parser. The right choice depends on whether a project needs only argument parsing or also needs a repeatable operational contract around every invocation.

Comparison

ConcernClickTyperbase-cli
Argument parsing and command treesCore capabilityClick-based, type-hint-friendly layerUses Click and can attach to Typer trees
Consistent per-run contextConsumer-definedConsumer-definedContext carries paths, config, logging, and cleanup
Logging and diagnosticsApplication-definedApplication-definedStructured stderr logging and persistent run metadata
Configuration policyApplication-definedApplication-definedConsumer-owned CliProfile boundary with optional batteries
Cleanup and temporary stateApplication-definedApplication-definedDeterministic lifecycle hooks and per-run paths
Machine-readable contractsApplication-definedApplication-definedVersioned JSON and record/output contracts
Best fitA small or custom command surfaceTyped Click applicationsProduction CLIs that need consistent operations across commands

This is a boundary comparison, not a feature-count ranking. Click and Typer remain the parser and command-definition choices; base-cli composes with them when the application also needs lifecycle, diagnostics, and compatibility contracts.

Five-minute evaluation

  1. Install the wheel in a clean environment:

    python -m pip install base-cli
    
  2. Copy the minimal command and run its test suite.

  3. Add one command-specific option and confirm that logs remain on stderr while command output remains on stdout.

  4. Run the same command with --debug and --keep-temp, then inspect the run context and retained log paths.

  5. If the application already uses Typer, install base-cli[typer] and follow the Typer adapter guide.

For a production migration checklist, continue with the adopter readiness guide.