Skip to content

Add help text for the platform argument on pn run, logs, build, and app-id #55

Closed

Description

@owenthcarey

Problem

In src/pythonnative/cli/pn.py, _build_parser() gives the optional platform argument a help= string for pn doctor (line 1009) and pn devices (line 1027), but the required platform argument on four other subcommands has none:

parser_run.add_argument("platform", choices=["android", "ios"])      # line 1034
parser_logs.add_argument("platform", choices=["android", "ios"])     # line 1047
parser_build.add_argument("platform", choices=["android", "ios"])    # line 1051
parser_app_id.add_argument("platform", choices=["android", "ios"])   # line 1061

As a result, pn run --help, pn logs --help, pn build --help, and pn app-id --help list {android,ios} under "positional arguments" with an empty description, while every flag on the same subcommand is described.

Suggested fix

  • Add a short help= string to each of the four add_argument("platform", ...) calls, for example help="Target platform". Keep the wording consistent across the four and with the existing doctor / devices strings.
  • Extend the existing help-output tests in tests/test_cli.py (test_cli_run_help_lists_flags at line 299 and test_cli_build_help_lists_debug at line 311) to assert the new text appears, or add one small parametrized test over the four subcommands.

Verification

  • uv run pn run --help (and logs, build, app-id) shows a description next to {android,ios}.
  • ./scripts/check.sh passes.

Suggested commit message

docs(cli): add help text for positional platform arguments

Activity

  1. added
    documentation
    good first issue
    on Sep 2, 2026
  2. glenlouis8 commented on Sep 3, 2026

    @glenlouis8
    Contributor

    I'd like to take this one.

    Plan: add a consistent help="Target platform" string to the four add_argument("platform", ...) calls for pn run, logs, build, and app-id in src/pythonnative/cli/pn.py, matching the existing doctor/devices style. Extend the help-output tests in tests/test_cli.py to assert the new text appears. Verify with ./scripts/check.sh.

  3. glenlouis8 commented on Sep 5, 2026

    @glenlouis8
    Contributor

    PR: #81

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

Metadata

Metadata

Assignees

Labels

documentationgood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions