Skip to content

[FEATURE] Add --help / -h flag (currently exits with File not found) #34

Description

@alphacrack

python_maithili --help currently prints Error: File '--help' not found. and exits 3 (verified) — there is no help flag at all.

Fix: in maithili_dsl/cli.py main(), handle -h / --help before the file path (same pattern as the existing -V / --version branch). Print usage in both Maithili and English, listing:

  • invocation forms (python_maithili <file.dmai>, python -m maithili_dsl <file.dmai>)
  • available flags (--version, --help, plus any added by other issues)
  • the documented exit codes (EXIT_OK 0, usage 2, not-found 3, lint 4, import-blocked 5, runtime 6)

Tests: tests/test_cli.py — --help and -h return exit 0 and contain the usage string.

Good first issue: pure CLI plumbing, no transpiler knowledge needed. (If you prefer migrating the hand-rolled arg handling to argparse, propose it in a comment first — it touches --version behavior too.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority: nice to havearea:climaithili_dsl/cli.py and sandboxenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions