Skip to content

CLI and Developer Tools

tonythethompson edited this page Jul 28, 2026 · 3 revisions

CLI & Developer Tools

Section: Development · Local-Project-Persistence · Home · Benchmarking-Framework

Trackdub.Cli is the headless automation entrypoint. Trackdub.Tools covers developer utilities (manifest builders, artifact inspectors, stem lab). Both sit on Trackdub.Sdk. The Avalonia shell must not grow CLI parsers; keep headless entrypoints in Cli/Sdk.

Trackdub.Cli Architecture

The CLI is built using System.CommandLine and provides a headless alternative to the desktop application. It is designed to be cross-platform, supporting Windows, macOS, and Linux. The CLI interacts primarily with Trackdub.Sdk to execute pipeline operations.

Key Components

Component Responsibility
Program.cs Main entry point; handles command parsing and routing.
TrackdubTuiApp Orchestrates the TUI experience, potentially using Spectre.Console or Terminal.Gui patterns.
Trackdub.Sdk Provides the underlying session factory and automation surface.

Command Invocation Flow

The following diagram illustrates how a command is processed through the CLI into the SDK.

flowchart TD
    User[User Input] --> CLI[Trackdub.Cli]
    CLI --> Parser[System.CommandLine Parser]
    Parser --> Command[Execute Command]
    Command --> SDK[Trackdub.Sdk Session]
    SDK --> App[Trackdub.Application]
    App --> Domain[Trackdub.Domain Logic]
Loading

Developer Tools (Trackdub.Tools)

The Trackdub.Tools project contains specialized utilities for development and maintenance. These tools are separate from the production CLI to prevent bloating the end-user interface with debugging or management scripts.

Available Tooling Subcommands

Common tasks performed via Trackdub.Tools include:

  • Ingest: Prepares raw media for the pipeline.
  • Stem Lab: Utilities for stem separation and audio analysis.
  • Model Manifest Builder: Used to generate bundled-models.manifest.json entries, ensuring model governance.
  • Artifact Inspector: Inspects generated pipeline artifacts and SQLite database states.

Execution and Usage

CLI and Tool binaries are executed via the dotnet run command or built as standalone executables.

Common Commands

# From the app checkout
dotnet run --project external/Trackdub/src/Trackdub.Cli -- --help
dotnet run --project external/Trackdub/src/Trackdub.Tools -- --help
dotnet run --project external/Trackdub/src/Trackdub.Tools -- ingest --help
dotnet run --project external/Trackdub/src/Trackdub.Tools -- stem-lab --help

Execution Environment

The CLI and Tools must adhere to the same dependency rules as the rest of the project. Specifically:

  • Domain must remain dependency-free.
  • CLI depends only on Trackdub.Sdk.
  • Tools depend on Application, Domain, Infrastructure, and Media.

Summary

The CLI and TUI tools provide a robust foundation for headless automation and developer productivity within the Trackdub ecosystem. By utilizing Trackdub.Sdk, these tools ensure that the AI dubbing pipeline—ranging from transcription to translation and TTS—is executed identically whether triggered from the console or the desktop UI.

Clone this wiki locally