Getting Started & Installation
Relevant source files
The following files were used as context for generating this wiki page:
ipatool is a command-line interface (CLI) tool written in Go that facilitates searching for iOS applications on the Apple App Store and downloading their corresponding encrypted app packages (IPA files). This guide covers the prerequisites, installation methods, and initial configuration required to use the tool effectively.
The tool provides several core functionalities, including account authentication, application searching, license purchasing, and version-specific metadata retrieval. It operates by interacting with private Apple App Store APIs, mimicking the behavior of official Apple clients.
Sources: README.md:1-10, AGENTS.md:5-8
Prerequisites
Before installing ipatool, ensure the following requirements are met:
- Operating System: Supported on Windows, Linux, and macOS.
- Apple ID: A valid Apple ID must be configured for use with the App Store.
- Go Toolchain: Required only if you intend to compile the tool from source.
Sources: README.md:21-25
Installation Methods
Package Manager (macOS)
The recommended way to install ipatool on macOS is via Homebrew:
$ brew install ipatool
Sources: README.md:32-34
Manual Installation
Binary releases are available for all supported platforms. You can download the latest version directly from the GitHub releases page.
Sources: README.md:28-30
Compiling from Source
If you have the Go toolchain installed, you can build the binary manually from the repository root:
$ go build -o ipatool
Unit tests can be verified before installation using:
go generate ./...
go test ./...
Sources: README.md:139-141, AGENTS.md:18-20
Initial Configuration & Architecture
Upon the first execution of a command, ipatool initializes its dependency graph and local environment. This includes setting up logging, a persistent cookie jar, and a local keychain for credential storage.
Directory Structure
The tool creates a hidden configuration directory within the user's home directory to persist session data and settings.
| Item | Path/Name | Description |
|---|---|---|
| Config Directory | ~/.ipatool | Root directory for tool persistence. |
| Cookie Jar | cookiejar.json | Stores session cookies for App Store API requests. |
| Keychain | keychain | Secure storage for Apple ID credentials and tokens. |
Sources: cmd/common.go:51-53, cmd/common.go:122-132
Dependency Flow
The following diagram illustrates how the CLI initializes its core components when a command is invoked.
The initialization process ensures that the machine's MAC address is available, as it is used to generate a unique guid required for various App Store API requests.
Sources: cmd/common.go:94-115, pkg/appstore/appstore_download.go:31-35
Authentication & Usage Flow
To use most features, such as downloading or purchasing apps, users must first authenticate. The auth login command triggers an interaction with the Apple authentication endpoint.
Authentication Commands
ipatool auth login: Authenticates the user and stores credentials.ipatool auth info: Displays current account details.ipatool auth revoke: Removes stored credentials from the local keychain.
Sources: README.md:38-53, pkg/appstore/appstore_download.go:37-53
Summary
ipatool provides a streamlined installation process through Homebrew or manual binary management. Once installed, it sets up a local environment in ~/.ipatool to manage persistent state. The primary workflow involves authenticating once via the auth command, after which users can search for and download IPA files directly from Apple's servers.
Sources: README.md:1-20, cmd/common.go:122-132