#!/usr/bin/env python3
"""MBASIC 5.21 Interpreter - launcher for source checkouts.

The implementation lives in src/mbasic_main.py so that the same code can be
installed as the `mbasic` console script (see [project.scripts] in
pyproject.toml). This file only exists so that `python3 mbasic` and `./mbasic`
keep working from a git checkout, which is what the docs and tests use.

Usage:
    ./mbasic                                  # Interactive mode (curses screen editor)
    ./mbasic program.bas                      # Execute program
    ./mbasic --ui cli                         # CLI backend (line-based)
    ./mbasic --list-backends                  # Show which UIs are installed
"""

import sys
from pathlib import Path

# Make the checkout root importable so `src.mbasic_main` resolves.
_ROOT = str(Path(__file__).resolve().parent)
if _ROOT not in sys.path:
    sys.path.insert(0, _ROOT)

from src.mbasic_main import main

if __name__ == '__main__':
    main()
