brain_deer.app.cli

Command-line interface for launching BrainDeer with external payloads.

Lead-DBS and other hosts can start BrainDeer with files, BIDS datasets, atlas structures, and DBS electrode reconstructions already queued for load:

brain-deer --skip-intro \
    --leaddbs-root ~/Documents/Toolboxes/leadDBS/leaddbs \
    --leaddbs-patient ~/datasets/study/derivatives/leaddbs/sub-010005 \
    --leaddbs-template --structures STN_r,GPi_l --load-dbs-electrodes

A JSON startup recipe (--commands-json or BRAIN_DEER_STARTUP_RECIPE) can append or replace the built-in plan with arbitrary registry commands — the same actions available in the Cmd/Ctrl+K palette and BrainDeer AI.

Classes

StartupCommand

One deferred registry dispatch after the GUI is ready.

LaunchConfig

Parsed launch options for BrainDeer.

Functions

parse_launch_args(→ tuple[LaunchConfig, list[str]])

Parse argv into a LaunchConfig and Qt-safe sys.argv tail.

Module Contents

class brain_deer.app.cli.StartupCommand

One deferred registry dispatch after the GUI is ready.

class brain_deer.app.cli.LaunchConfig

Parsed launch options for BrainDeer.

apply_env_defaults() → None

Merge common host environment variables (Lead-DBS / shell wrappers).

build_startup_commands() → list[StartupCommand]

Ordered plan executed after MainWindow and the registry exist.

brain_deer.app.cli.parse_launch_args(argv: list[str] | None = None) → tuple[LaunchConfig, list[str]]

Parse argv into a LaunchConfig and Qt-safe sys.argv tail.