Guide · Open source
How to use xtool: build and install iOS apps without Xcode
Updated · written with AI from the project's own documentation and checked against our catalogue data
xtool is an open-source command-line tool that replaces parts of Xcode, Apple's iOS development app. It builds a Swift Package Manager (SwiftPM) project into an iOS app, signs it and installs it on an iPhone or iPad from Linux, Windows with WSL, or macOS. This guide explains what you need, how the main commands fit together and where the limits are, so you can decide whether it suits your workflow.
Quick start
- 1Check your system. Confirm you have Linux, Windows with WSL, or macOS, and an Apple ID for signing and device installation.
- 2Clone the repository. Run git clone https://github.com/xtool-org/xtool to get the source.
- 3Follow the install guide. Open the Linux/Windows or macOS installation guide from the README and complete setup for your platform.
- 4Run setup and review help. Run xtool setup for iOS development, then run xtool --help to see the available subcommands.
- 5Create a project. Use xtool new to create a SwiftPM project, following the first-app tutorial.
- 6Build and run. Use xtool dev to build and run the project, then use devices, install and launch to manage it on your device.
What you need before you start
xtool runs on Linux, on Windows through WSL, or on macOS. You also need an Apple ID, because the tool uses it for signing and for installing apps on a device.
xtool is a good fit if you already organize your Swift code with SwiftPM and are comfortable working in a terminal. Setup involves Apple developer accounts and signing, so it is not a beginner-friendly first step into programming.
- A Linux machine, Windows with WSL, or a Mac
- An Apple ID for signing and device installation
- Comfort with the command line
- A Swift project organized with SwiftPM, or willingness to create one
Install xtool on Linux, Windows or macOS
The project README points to separate installation guides for Linux and Windows, and for macOS. Follow the guide that matches your system. The README's own install command is only to clone the repository, so the platform guides are where the rest of the setup is described.
Clone the repository with the command below, then open the guide for your platform.
- Installation guide for Linux and Windows: xtool.sh documentation, installation-linux page
- Installation guide for macOS: xtool.sh documentation, installation-macos page
git clone https://github.com/xtool-org/xtoolLearn the main xtool commands
xtool groups its subcommands into configuration, development and device tasks. Run xtool help followed by a subcommand name to see detailed help for that command.
Configuration commands prepare the tool. Development commands create and run projects. Device commands work with iOS devices you have connected.
- setup: set up xtool for iOS development
- auth: manage Apple Developer Services authentication
- sdk: manage the Darwin Swift SDK
- new: create a new xtool SwiftPM project
- dev: build and run an xtool SwiftPM project
- ds: interact with Apple Developer Services
- devices: list devices
- install: install an ipa file to your device
- uninstall: uninstall an installed app
- launch: launch an installed app
$ xtool --help
OVERVIEW: Cross-platform Xcode replacement
USAGE: xtool <subcommand>
OPTIONS:
-h, --help Show help information.
CONFIGURATION SUBCOMMANDS:
setup Set up xtool for iOS development
auth Manage Apple Developer Services authentication
sdk Manage the Darwin Swift SDK
DEVELOPMENT SUBCOMMANDS:
new Create a new xtool SwiftPM project
dev Build and run an xtool SwiftPM project
ds Interact with Apple Developer Services
DEVICE SUBCOMMANDS:
devices List devices
install Install an ipa file to your device
uninstall Uninstall an installed app
launch Launch an installed app
See 'xtool help <subcommand>' for detailed help.Build, sign and run your first app
The project's tutorial walks through creating and running a first xtool-powered app. Use xtool new to create a SwiftPM project, and xtool dev to build and run it. The tutorial is the best reference for the exact steps and options.
The README describes xtool as able to build a SwiftPM package into an iOS app, sign it and install it. Check the tutorial for how signing is handled on your setup.
- Open the first-app tutorial on xtool.sh for the full walkthrough
Install and manage apps on a device
Once your app is built, the device subcommands handle the device side. Use devices to list connected devices, install to put an ipa file on a device, launch to start an installed app, and uninstall to remove it.
These steps are useful in scripts, which is one reason xtool suits a terminal-based workflow.
- List devices with devices
- Install an ipa with install
- Start an app with launch
- Remove an app with uninstall
Use the library in your own Swift code
xtool includes a library called XKit. You can use it to interact with Apple Developer Services, iOS devices and more from your own app. Add XKit as a SwiftPM dependency, using the package URL and product name from the README.
The README lists the package URL for xtool and the product name XKit, which you add as a target dependency. Check the README for the current version constraint before adding it.
- Package URL: https://github.com/xtool-org/xtool
- Product name: XKit
What people use it for
- Building an iOS app from a Linux machine when you do not use a Mac as your main computer
- Scripting a build-and-install workflow from the terminal
- Automating Apple Developer Services tasks from your own Swift code using XKit
- Managing installed apps on a connected iPhone or iPad with install, launch and uninstall
Frequently asked questions
Is xtool free to use?
xtool is released under the MIT licence, which is stated in the project's details. The README does not describe pricing for Apple developer accounts, which you may need for signing and installation.
Can I use xtool on Windows?
Yes, the README describes Windows support through WSL (Windows Subsystem for Linux). Follow the Linux/Windows installation guide linked from the README.
Do I need a Mac to build iOS apps with xtool?
No. The README lists Linux, Windows with WSL, and macOS as supported platforms. You also need an Apple ID for signing and device installation.
Does xtool replace the Xcode interface?
No. The README describes xtool as a command-line replacement, so it does not provide the graphical interface, storyboards or Interface Builder that Xcode offers.
What are alternatives to xtool?
The project lists Xcode, Theos and Fastlane as comparable projects. Xcode is Apple's full graphical development app, while xtool focuses on a command-line workflow for SwiftPM projects.
Why does xtool need an Apple ID?
The README says an Apple ID is required for signing and device installation. Signing is part of getting an iOS app onto a physical device, so plan for that setup before you start.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
xtool suits Swift developers who already use SwiftPM, are comfortable in a terminal, and want to build and install iOS apps without a Mac as their main machine. If you need the full Xcode graphical interface, storyboards or guaranteed compatibility with every Apple toolchain feature, or if you are new to programming, pick Xcode or another tool instead.
Install options & downloads