CLI tool
ionic-team/ionic-cli avatar
ionic-team/ionic-cli

Ionic CLI: the @ionic/cli command-line tool for starting, serving and building Ionic apps

The Ionic command-line interface

2,001 stars679 forksTypeScriptMIT

At a glance

What is it?
Ionic CLI is the official command-line interface for the Ionic app platform, distributed as @ionic/cli on npm. Its README is minimal; the full command surface lives in the online documentation and the built-in --help output.
Who is it for?
Ionic CLI is the standard tool for starting, serving and building Ionic Framework projects, and it fits developers already committed to Ionic's platform with Cordova or Capacitor. Skip it if you are not using Ionic Framework, because the CLI has no purpose outside that ecosystem.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 93 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 11, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A unified command prefix for both Cordova and Capacitor Ionic workflows

Ionic CLI is described in the README as the go-to tool for developing Ionic apps. Both Cordova-based and Capacitor-based workflows are covered under a single ionic prefix, meaning project creation, local serving and device deployment happen from the same command entry point.

Developers building Ionic Framework applications are the intended audience. Those working outside Ionic's app platform have no reason to install it: the commands map directly to Ionic's own build tools and there is no general-purpose web development utility here. Documentation beyond what fits in the README lives at ionicframework.com/docs/cli. GitHub issues are reserved for bug reports and feature requests; general support goes to ionicframework.com/support.

Installing globally from npm and discovering commands through --help

Installing the CLI globally makes the ionic command available system-wide:

bash
npm install -g @ionic/cli

Once installed, the three main command trees can be listed with:

bash
ionic --help
ionic cordova --help
ionic capacitor --help

Each subcommand also exposes its own options:

bash
ionic start --help
ionic serve --help
ionic cordova run --help

The README directs readers to both --help and the online docs rather than listing commands or their flags inline. That design means the repository itself is not a self-contained reference: the --help output is the local documentation and ionicframework.com/docs/cli is the web version.

Telemetry and background update checks run by default, and the Dockerfile disables both

Two global configuration values appear in the Dockerfile before the container is used:

bash
ionic --no-interactive config set -g daemon.updates false
ionic --no-interactive config set -g telemetry false

Both use -g for global scope and --no-interactive to suppress prompts. In a default installation, the CLI starts a background daemon that polls for updates and sends telemetry data. Neither behavior is mentioned in the README, so a developer who reads only the README may not realize the CLI opts them into both automatically.

For CI pipelines and Docker-based builds, disabling those two is the pattern the Dockerfile models. CI=1 is also set as an environment variable in the Dockerfile before any ionic commands run, which suppresses interactive prompts across the npm ecosystem. The --no-interactive flag in the config commands does the same specifically at the CLI level.

A Lerna monorepo with TypeScript 4.8, Husky hooks and npm provenance publishing

At the repository root, the package.json marks the root package as private and manages the workspace through Lerna at version ^3.13.3. TypeScript is pinned to ~4.8.0. Packages live under packages/ and share a tsconfig.base.json at the root. A Husky pre-commit hook runs lint-staged across all packages to enforce linting before any commit goes through.

Publishing runs through a publish:ci script that calls lerna exec with npm publish --provenance. That flag produces a cryptographic attestation linking each published package to its source commit, which teams with supply-chain security requirements can verify on the npm registry. The last push was on 2026-07-10, and the GitHub tag list predates the current npm publishing workflow, showing only 2016-era entries that do not reflect the current state of the codebase.

A docs generation script exists but the output goes to the external site, not the repository

A docs task in package.json runs node packages/cli-scripts/bin/ionic-cli-scripts docs, which generates command reference documentation. A matching docs:watch task uses chokidar to rebuild that output on file changes. Neither task is mentioned in the README, and the README points to the hosted docs at ionicframework.com/docs/cli rather than to any locally generated file.

Whether that script generates content for the npm package, the Ionic website or both is not documented in the README. For contributors wanting to preview documentation changes, the workflow requires finding the docs task in package.json, which is not surfaced by --help. A CONTRIBUTING.md at the repository root covers development workflow and is the place to start for anyone modifying the codebase rather than consuming the CLI.

CI quality infrastructure visible from the README badges and repository layout

Two status badges appear at the top of the README: a Build badge pointing to GitHub Actions workflows and a Dependabot badge pointing to dependency update status. A .github/ directory at the repository root holds the workflow definitions, and the build.yml workflow is the one the CI badge tracks. Dependabot is wired to the repository, meaning dependency pull requests arrive automatically when newer package versions become available.

The Husky pre-commit configuration in package.json runs lerna exec --concurrency 1 --stream -- lint-staged, which executes lint-staged serially across all packages rather than in parallel. That choice avoids output interleaving when multiple packages report lint issues. Each package in the monorepo carries its own lint-staged configuration, established through the lint-staged.config.base.js at the repository root that individual packages extend. For contributors, this means a commit that introduces a lint error in any package will be blocked at the pre-commit stage before it reaches CI.

When to reach for Expo CLI or another framework CLI instead of Ionic CLI

Expo CLI is the comparable command-line tool for React Native projects that do not use Ionic. Both offer commands for starting, serving and building, but Expo targets bare React Native and managed workflow apps while Ionic CLI targets Ionic Framework apps with a Capacitor or Cordova layer. Mixing them is not a documented use case, and Ionic CLI has no commands for Expo-specific build steps.

For pure web projects without Ionic Framework in the stack, the Vite CLI, Angular CLI or Create React App cover project scaffolding and local serving without any Ionic dependency. Ionic CLI assumes an Ionic project structure and its commands fail or have no effect outside that context.

A Dockerfile at the repository root provides a container pattern for teams that want reproducible CLI builds pinned to a specific version. The IONIC_CLI_VERSION build argument selects the exact npm version to install, which is the safest approach for consistent CI output.

Editorial conclusion

Ionic CLI is the standard tool for starting, serving and building Ionic Framework projects, and it fits developers already committed to Ionic's platform with Cordova or Capacitor. Skip it if you are not using Ionic Framework, because the CLI has no purpose outside that ecosystem. Before deploying a Docker image, note that telemetry is on by default: run ionic --no-interactive config set -g telemetry false to disable it. For full command documentation, consult ionicframework.com/docs/cli, since the README itself points there rather than documenting commands inline.

Frequently asked questions

How do I install Ionic CLI?

Run npm install -g @ionic/cli to install it globally. Detailed installation instructions are at ionicframework.com/docs/installation/cli.

Does Ionic CLI support both Cordova and Capacitor?

Yes. Both runtimes have their own subcommand trees: ionic cordova and ionic capacitor. Running ionic cordova --help or ionic capacitor --help lists the available commands for each.

Does Ionic CLI send telemetry by default?

The Dockerfile in the repository runs ionic --no-interactive config set -g telemetry false before using the CLI, indicating that telemetry is enabled by default. Run that command to disable it.

How do I find the available options for an Ionic CLI command?

Add --help to any command. For example, ionic serve --help shows the options for serving a project locally, and ionic start --help lists the options for creating a new project.

Can I run Ionic CLI in a Docker container?

Yes. A Dockerfile at the repository root shows the pattern: install from npm with an IONIC_CLI_VERSION build argument, then run config commands to disable the update daemon and telemetry before using the container.

Official sources

  1. ionic-team/ionic-cli on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/ionic-team-ionic-cli.svg)](https://hysenlabs.com/projects/ionic-team-ionic-cli)