Add --dry-run option to preview download operations without downloading
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-runThe 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
--purchaseis 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
-
downloadaccepts a--dry-runflag. - 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.
-
--purchasedoes not trigger a purchase when--dry-runis enabled. - Dry-run exits successfully when the target can be resolved.
- Existing download behavior is unchanged when
--dry-runis 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.
Source: majd/ipatool