brushline

The package root and its command line. The public API grows one phase at a time; every public function is listed with its parameters, types, and return value.

Brushline: decision support for vegetation management along linear corridors.

The Brushline command line.

The command surface grows one phase at a time. Phase 0 establishes the entry point and the version contract; later phases add the build, simulate, plan, monitor, compare, validate, and serve commands described in ROADMAP.md.

brushline.cli.main(version: Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f3380>]=False) → None[source]

Run the Brushline command line.

brushline.cli.status() → None[source]

Print the package version and its pre-alpha status.

brushline.cli.fixture(out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f2a50>], force: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f20f0>] = False, seed: ~typing.Annotated[int, <typer.models.OptionInfo object at 0x7f5fca8f0710>] = 20261114) → None[source]

Generate the deterministic synthetic corridor fixture.

Parameters:
  • out (Path) – Destination directory.

  • force (bool, optional) – Overwrite the known fixture files. Defaults to False.

  • seed (int, optional) – Fixture seed. Defaults to DEFAULT_SEED.

Raises:

typer.Exit – With status 1 when the destination is not empty or a contract fails.

brushline.cli.instance_template(instance_root: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f1970>], force: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f0530>] = False) → None[source]

Install the Brushline template overlay on a FEMIC instance.

Parameters:
  • instance_root (Path) – FEMIC instance root. It is created when it does not exist.

  • force (bool, optional) – Overwrite existing template files. Defaults to False.

Raises:

typer.Exit – With status 1 when the packaged template is missing.

brushline.cli.instance_validate_aoi(aoi: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f0230>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f1f70>]) → None[source]

Validate an AOI GeoJSON and write the report.

brushline.cli.instance_segment_corridor(corridor: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f1a00>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f1910>]) → None[source]

Validate a corridor graph and write its segment table.

brushline.cli.instance_compile_dataset(fixture: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f09e0>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f0c50>], force: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f0830>] = False) → None[source]

Compile a fixture into a validated Brushline dataset.

brushline.cli.instance_seed_state(state: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f3830>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f0dd0>]) → None[source]

Validate a state contract and write the seed state artifact.

brushline.cli.instance_validate_scenario(scenario: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f1df0>], targets: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f2810>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f2930>]) → None[source]

Validate the scenario and targets YAML.

brushline.cli.instance_build_demo(demo: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f3b00>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f3d10>]) → None[source]

Validate a demo manifest and write the demo artifact.

brushline.cli.build(fixture: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8a61e0>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8a6b10>], force: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8a7440>] = False) → None[source]

Compile a fixture into a validated Brushline dataset.

Parameters:
  • fixture (Path) – Fixture directory.

  • out (Path) – Compiled dataset directory.

  • force (bool, optional) – Overwrite an existing dataset. Defaults to False.

Raises:

typer.Exit – With status 1 when the compile fails.

brushline.cli.simulate(dataset: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f45c0>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f4560>], plan: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f5fca8f4aa0>] = None, schedule: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f5fca8f4b00>] = None, years: ~typing.Annotated[int, <typer.models.OptionInfo object at 0x7f5fca8f4a40>] = 5, start_year: ~typing.Annotated[int, <typer.models.OptionInfo object at 0x7f5fca8f47a0>] = 2026, force: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f5610>] = False) → None[source]

Replay a plan or schedule against a compiled dataset.

Parameters:
  • dataset (Path) – Compiled dataset directory.

  • out (Path) – Run directory.

  • plan (Path or None, optional) – Plan artifact. Exactly one of plan and schedule is required.

  • schedule (Path or None, optional) – Schedule CSV. Exactly one of plan and schedule is required.

  • years (int, optional) – Simulation years. Defaults to 5.

  • start_year (int, optional) – First simulation year. Defaults to 2026.

  • force (bool, optional) – Overwrite an existing run. Defaults to False.

Raises:

typer.Exit – With status 1 when the simulation fails.

brushline.cli.prototype(fixture: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f25a0>], out: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f28d0>], years: ~typing.Annotated[int, <typer.models.OptionInfo object at 0x7f5fca8f0e00>] = 5) → None[source]

Compile and simulate the synthetic fixture end to end.

Parameters:
  • fixture (Path) – Fixture directory.

  • out (Path) – Output directory. The dataset is written under dataset and the run under run.

  • years (int, optional) – Simulation years. Defaults to 5.

Raises:

typer.Exit – With status 1 when the compile or simulation fails.

brushline.cli.validate(dataset: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8f32c0>], json_output: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f5130>] = False) → None[source]

Validate a compiled corridor dataset against its manifest.

Parameters:
  • dataset (Path) – Dataset directory that contains manifest.json.

  • json_output (bool, optional) – Print the JSON report instead of the text summary.

Raises:

typer.Exit – With status 1 when the dataset is invalid.

brushline.cli.field_validate(observations: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8a7e00>], plots: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8a6b70>], out: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f5fca8f0aa0>] = None, json_output: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8f2690>] = False) → None[source]

Validate field observations and optionally write normalized JSON.

Parameters:
  • observations (Path) – Field observations CSV.

  • plots (Path) – Planned plot references GeoJSON.

  • out (Path, optional) – Normalized JSON output.

  • json_output (bool, optional) – Print JSON instead of a text summary.

Raises:

typer.Exit – With status 1 when the observations are invalid.

brushline.cli.field_compare(observations: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8a77a0>], plots: ~typing.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7f5fca8a65d0>], out: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f5fca8a7ce0>] = None, json_output: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f5fca8a6240>] = False) → None[source]

Compare field observations with LiDAR plot targets.

Parameters:
  • observations (Path) – Validated field observation JSON.

  • plots (Path) – Planned plot targets as GeoJSON.

  • out (Path, optional) – Comparison JSON output.

  • json_output (bool, optional) – Print JSON instead of a text summary.

Raises:

typer.Exit – With status 1 when the inputs are invalid.

brushline.cli.demo_build(out: Path, <typer.models.OptionInfo object at 0x7f5fca8a7cb0>]=PosixPath('build/demo'), artifact_root: Path, <typer.models.OptionInfo object at 0x7f5fca8a7c50>]=PosixPath('examples/synthetic-corridor')) → None[source]

Build the static public demo site.