Skip to main content

Appflow CLI

note

Appflow CLI is available to our enterprise customers only. Please contact us for more information.

Appflow products can be used inside your own CI/CD platform (such as Azure DevOps, Gitlab, Jenkins, and more) through the use of our Appflow CLI.

What/who is the Appflow CLI for?

Appflow CLI allows enterprises with their own CI/CD platforms to have granular control of Appflow within their existing pipelines. Rather than setting up automations using Appflow Automations, enterprises can utilize the CLI to control exactly when builds are produced and deployed, so they insert their own processes in between these steps (e.g. code signing, QA testing, manager approvals, etc.)

Install

To install, run the following command

curl -fsSL https://ionic.io/get-appflow-cli | bash

Locking the Appflow CLI Version

If you'd like to lock the version of Appflow CLI in place for your pipeline, use the following command to install the Appflow CLI instead, replacing X.X.X with your desired version number:

export APPFLOW_VERSION=X.X.X; curl -fsSL https://ionic.io/get-appflow-cli | bash

Authentication

Before you use the Appflow CLI you'll first need a Personal Access Token.

Once you have your token, you can authenticate the Appflow CLI by setting the token to an environment variable in you CI/CD system.

export IONIC_TOKEN=mytoken

or you can create an Appflow CLI config file:

# .appflow.yaml
TOKEN: my-token

and run your commands from the directory the file is in, or by specifying the location with the --config=/some/path/to/.appflow.yaml flag.

Why a separate CLI?

It was a difficult decision, but ultimately we decided to split Appflow related CLI commands into its own CLI for three reasons:

  1. Simplification of CLIs. Ionic Framework and Capacitor commands make sense to have under one roof because they both serve the same use case (assisting a developer while they are developing), however the Appflow related commands serve a completely different use case (allowing an external CI/CD system to control when builds or deployments are made).

  2. Reduce installation size. Ionic CLI requires node (and npm) to install. For development, a user would already have those installed, however for a CI/CD system interacting with Appflow, a dependency like Node may be completely unnecessary and causes pipelines to take longer and use more resources. Appflow CLI is installed in one command and is around 10 MB in size.

  3. Better DevOps practices. We used moving to a separate CLI to increase clarity in the names of the commands and their function for more granular control of your DevOps pipeline e.g. deploy/package build to build <web,android,ios> and deploy <web,android,ios>.