Skip to content

Add --dry-run option to preview download operations without downloading #539

Description

@nayar-900

Description

Description

Add a --dry-run flag to the download command that allows users to preview the download operation without actually downloading the IPA file or modifying the local filesystem.

For example:

ipatool download --app-id 123456789 --dry-run

The command should resolve and display the relevant download information, such as the app ID, selected platform, external version ID (when provided), and destination path, but stop before starting the actual download.

Motivation

This would be useful for scripting, CI environments, and users who want to verify that their command-line arguments resolve to the expected app/version and output location before performing a potentially large download.

Expected behavior

When --dry-run is specified:

  • Validate the supplied download arguments normally.
  • Resolve the target app/version as the regular download flow would.
  • Display the resolved download parameters.
  • Do not download or write an IPA file.
  • Do not purchase the app, even when --purchase is also supplied.
  • Return a successful exit status if validation and resolution succeed.

Without --dry-run, existing download behavior should remain unchanged.

Example

$ ipatool download --app-id 123456789 --dry-run

Dry run:
  App ID: 123456789
  Platform: iphone
  Version: <resolved version>
  Output: <resolved output path>

No download performed.

Acceptance criteria

  • download accepts a --dry-run flag.
  • Dry-run mode performs the same argument validation and target resolution required for a normal download.
  • No IPA file is created or modified in dry-run mode.
  • --purchase does not trigger a purchase when --dry-run is enabled.
  • Dry-run exits successfully when the target can be resolved.
  • Existing download behavior is unchanged when --dry-run is not provided.
  • Unit tests cover the dry-run behavior.

Constraints

The feature should not change the existing download flow or authentication behavior for normal downloads. Dry-run should only prevent side effects associated with purchasing and downloading the IPA.

Contribution

I am willing to open a PR for this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions