Skip to content

aimbat.app

AIMBAT command line interface entrypoint for all other commands.

This is the main command line interface for AIMBAT. It must be executed with a command (as specified below) to actually do anything. Help for individual commands is available by typing aimbat COMMAND --help.

IDs

Every record in AIMBAT (event, seismogram, station, snapshot, …) has a UUID. Tables display each UUID truncated to the shortest prefix that is unique within that table. When a command asks for an ID you may supply any prefix long enough to identify the record unambiguously, from the shortest displayed prefix up to the full UUID. Dashes are optional.

Functions:

Name Description
main

Run the AIMBAT CLI, printing a full traceback on an unhandled exception.

main

main() -> None

Run the AIMBAT CLI, printing a full traceback on an unhandled exception.

Uses a dedicated stderr console rather than the module-level console (stdout), matching every other error path in _cli/common/_decorators.py.

Configures logging first: importing AIMBAT deliberately leaves the process's loguru setup untouched, so the entrypoint that owns the process is where the log file is opened.

Source code in src/aimbat/app.py
def main() -> None:
    """Run the AIMBAT CLI, printing a full traceback on an unhandled exception.

    Uses a dedicated stderr console rather than the module-level `console`
    (stdout), matching every other error path in `_cli/common/_decorators.py`.

    Configures logging first: importing AIMBAT deliberately leaves the
    process's loguru setup untouched, so the entrypoint that owns the process
    is where the log file is opened.
    """
    from aimbat.logger import configure_logging

    configure_logging()

    try:
        app()
    except Exception:
        Console(stderr=True).print_exception(show_locals=True)
        sys.exit(1)