Appflow CLI
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.
Before using the Appflow CLI, you must set up a Personal Access Token to authenticate with Ionic.
Update your app remotely in real-time using your own CI/CD pipelines.
Build app binaries in the cloud for iOS and Android, even on your linux CI/CD runner.
Publish directly to the iOS App Store and Google Play Store from your own CI/CD platform in one command.
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:
-
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).
-
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.
-
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
tobuild <web,android,ios>
anddeploy <web,android,ios>
.