Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:416rehman DeepZero deepzero cli

From Leeroopedia
Knowledge Sources
Domains CLI, Entry_Point
Last Updated 2026-10-27 00:00 GMT

Overview

Click-based CLI providing subcommands for running pipelines, inspecting status, generating reports, validating configurations, and listing processors.

Description

The deepzero CLI is the primary user-facing entry point, installed as a console script via [project.scripts] deepzero = "deepzero.cli:main". It is built with the Click framework and uses rich for terminal output.

Subcommands:

  • run: runs a pipeline against a target. Loads the pipeline, binds the corpus, creates a StateStore, builds a PipelineRunner, and executes. Supports --clean (purge prior run), --retry-timeouts (retry timed-out stages), --preflight (verify LLM auth), --timeout-multiplier.
  • status: displays run status. Loads RunState and manifest, prints a table with run_id, target, model, per-stage counts, and per-verdict sample totals.
  • report: generates HTML/CSV/JSONL reports. Calls write_report() with optional --open to launch a browser.
  • validate: validates a pipeline without running. Calls validate_pipeline() and prints warnings.
  • list-processors: lists all registered built-in processors.
  • init: initializes a project structure.
  • interactive: interactive mode (WIP).
  • serve: starts the Starlette REST API (WIP, requires [serve] extra).

The CLI loads environment variables from a .env file via python-dotenv before any subcommand runs.

Usage

  • Running: deepzero run ./sample_files --pipeline demo
  • Status: deepzero status --pipeline demo
  • Report: deepzero report --pipeline demo --open
  • Validate: deepzero validate loldrivers

Code Reference

Source Location

  • Repository: DeepZero
  • File: src/deepzero/cli.py

Signature

@click.group()
def main(): ...

@main.command()
@click.argument("target", type=click.Path(exists=True))
@click.option("--pipeline", "-p", required=True)
@click.option("--model", "-m", default=None)
@click.option("--work-dir", "-w", default=None)
@click.option("--verbose", "-v", is_flag=True)
@click.option("--clean", is_flag=True)
@click.option("--preflight", is_flag=True)
@click.option("--retry-timeouts", is_flag=True)
@click.option("--timeout-multiplier", default=2.0)
def run(target, pipeline, model, work_dir, verbose, clean, preflight, retry_timeouts, timeout_multiplier): ...

@main.command()
def status(pipeline, work_dir, verbose): ...

@main.command()
def report(pipeline, work_dir, out, open_browser, verbose): ...

@main.command()
def validate(pipeline_ref): ...

@main.command()
def list_processors(): ...

Import

from deepzero.cli import main
# Or via console script: deepzero <subcommand>

I/O Contract

Inputs

Name Type Required Description
target Path Yes (run) File or directory to scan
pipeline str Yes (run) Pipeline name or path
model None No (run) LLM model override
work_dir None No (run/status/report) Work directory override
clean bool No (run) Purge prior run data
retry_timeouts bool No (run) Retry timed-out stages only

Outputs

Name Type Description
run Console Pipeline execution with rich progress output
status Console Table Run state and per-stage/verdict counts
report Files HTML/CSV/JSONL report in work_dir/report
validate Console Validation warnings

Usage Examples

Run the Demo Pipeline

# Install
pip install -e .

# Run the demo pipeline against a directory of .txt files
deepzero run ./sample_files --pipeline demo

# Check status
deepzero status --pipeline demo

# Generate and open the report
deepzero report --pipeline demo --open

Run the BYOVD Pipeline

# Set environment variables
export GHIDRA_INSTALL_DIR=/opt/ghidra
export JAVA_HOME=/usr/lib/jvm/default-java

# Run the flagship loldrivers pipeline
deepzero run ./driver_pack --pipeline loldrivers

# Retry stages that timed out with a longer budget
deepzero run ./driver_pack --pipeline loldrivers --retry-timeouts --timeout-multiplier 3.0

Validate a Pipeline

deepzero validate loldrivers
# Output: "pipeline is valid - no issues found" or warning lines

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment