Skip to main content

Ionic Cloud CLI

note

This feature is only available on our Standard or Enterprise plans. Please contact us to enable this feature.

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

What/who is the Ionic Cloud CLI for?#

Ionic Cloud 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 -sL https://ionic.io/get-ionic-cloud-cli | bash

Authentication#

Before you use the Ionic Cloud CLI you'll first need a Personal Access Token, then you can follow along with the CLI documentation for the individual product that you'd like to use.

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

export IONIC_TOKEN=mytoken

or you can create an Ionic Cloud CLI config file:

# .ionic-cloud.yamlTOKEN: my-token

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

Personal Access Token

Before using the Ionic Cloud CLI, you must set up a Personal Access Token to authenticate with Ionic.

Live Update with the CLI

Update your app remotely in real-time using your own CI/CD pipelines.

Native Builds with the CLI

Build app binaries in the cloud for iOS and Android, even on your linux CI/CD runner.

App Publishing with the CLI

Publish directly to the iOS App Store and Google Play Store from your own CI/CD platform in one command.

Contact Us#

Why a separate CLI?#

It was a difficult decision, but ultimately we decided to split Cloud 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 Cloud 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. Ionic Cloud 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>.