#!/usr/bin/env python3
"""
runner - Development wrapper for rungs
Located in the top-level rungs directory.
Allows running rungs from source for debugging with support for
command-line arguments.

Usage:
    ./runner                    # menu of all menus
    ./runner eos-update         # run a specific menu
    ./runner --dry-run eos-update   # show commands without running them
    ./runner --edit             # edit your config
    ./runner --help             # show all available options
"""

import os
import runpy
import sys

if __name__ == '__main__':
    # Set program name but preserve all command-line arguments
    sys.argv[0] = 'rungs'
    # Make the src/ package importable so `rungs.*` resolves from source
    sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src'))
    # Run the rungs.main module with alter_sys=True to propagate sys.argv
    runpy.run_module('rungs.main', run_name='__main__', alter_sys=True)
