Skip to content

Quick Start

Welcome to Patchwing! 👋

In this guide, we’ll walk you through setting up Patchwing and integrating it into your app in just a few minutes.

The first thing you’ll need to do is sign up for a Patchwing account. It’s free to do and you can signup in a manner of seconds.

Create an Account

While a full install may not be required to access and use all of our product offerings, we recommend installing everything locally to make debugging easier as you continue using our services.

To install the Patchwing command line interface (CLI):

curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/AstralWing/install/main/install.sh -sSf | bash

This installs patchwing into ~/.patchwing/bin and adds it to your PATH. It also installs a copy of Flutter and Dart inside ~/.patchwing/bin/cache/flutter. The copy of Flutter is slightly modified to add Patchwing code push and is not intended to be added to your PATH. You can continue to use the versions of Flutter and Dart you already have installed.

Patchwing can also be manually installed, allowing users to choose where the installation will be placed.

In order to do so, in a terminal, inside the folder where Patchwing should be installed at, run:

git clone -b stable https://github.com/AstralWing/patchwing.git

Add the bin folder from the repository you just cloned into your PATH.

Once the installation has completed, patchwing should be available in your terminal:

$ patchwing
The patchwing command-line tool

Usage: patchwing <command> [arguments]

Global options:
-h, --help            Print this usage information.
    --version         Print the current version.
-v, --[no-]verbose    Noisy logging, including all shell commands executed.

Available commands:
  cache      Manage the Patchwing cache.
  doctor     Show information about the installed tooling.
  flutter    Manage your Patchwing Flutter installation.
  init       Initialize Patchwing.
  login      Login as a new Patchwing user.
  login:ci   Login as a CI user.
  logout     Logout of the current Patchwing user
  patch      Creates a patchwing patch for the provided target platforms
  patches    Manage Patchwing patches
  preview    Preview a specific release on a device.
  release    Creates a patchwing release for the provided target platforms
  releases   Manage Patchwing releases
  upgrade    Upgrade your copy of Patchwing.

Run "patchwing help <command>" for more information about a command.

You can use the patchwing doctor to ensure things are setup correctly:

patchwing doctor

Example output:

$ patchwing doctor
Patchwing 1.5.1 • git@github.com:AstralWing/patchwing.git
Flutter 3.27.0 • revision 1e0e5760eeaf534c280cf59ee0504d0e2ba12a7b
Engine • revision 59571a1190752bc1740bff652ce5f0ba7c9413f8

URL Reachability
✓ https://api.patchwing.net OK (0.1s)
✓ https://console.patchwing.net OK (0.1s)
✓ https://oauth2.googleapis.com OK (60ms)
✓ https://storage.googleapis.com OK (0.2s)
✓ https://cdn.patchwing.net OK (0.1s)

✓ Patchwing is up-to-date (1.4s)
✓ Flutter install is correct (0.4s)

No issues detected!

Finally, you can log in to your Patchwing account on your machine:

patchwing login

Your now ready to add Patchwing to your app.

You can start by creating a new Flutter app or navigating to the directory of your already created Flutter app.

To create a new Flutter app:

patchwing create my_patchwing_app
cd my_patchwing_app

Or, to enable Patchwing for an existing Flutter app run:

patchwing init

This will create a patchwing.yaml file in the root of your project. This file contains your Patchwing app_id. Your app_id is not secret and can be checked into source control and freely shared.

This will also run patchwing doctor to ensure everything is set up correctly.

Now that your account is set up and your app is initialized, you’re all set to begin.

Create a Release Build and submit your app to Patchwing.
Create a Patch Push over-the-air updates to your users.
Preview Locally Test your release on a local device before publishing.