Show Menu
Cheatography

Create Project

start [options] <PA­TH> [template]
Starts a new Ionic project in the specified PATH [options] any flags for the command <PA­TH> directory for the new project [template] Starter templates can either come from a named template, (ex: tabs, sidemenu, blank), a Github repo, a Codepen url, or a local directory. Codepen url, ex: http:/­/co­dep­en.i­o/­ion­ic/­pen­/odqCz Defaults to Ionic "­tab­s" starter template
[--app­nam­e|-a]
Human readable name for the app (Use quotes around the name)
[--id|-i]
Package name for <widget id> config, ex: com.my­com­pan­y.myapp
[--ski­p-npm]
Skip npm package instal­lation
[--no-­cor­dov­a|-w]
Create a basic structure without Cordova requir­ements
[--sas­s|-s]
Setup the project to use Sass CSS precom­piling
[--lis­t|-l]
List starter templates available
[--io-­app-id]
The Ionic.io app ID to use
[--tem­pla­te|-t]
Project starter template
[--v2|-v]
Start a Ionic v2 project
[--zip­-fi­le|-z]
URL to download zipfile for starter template

Local Dev-Server

serve [options]
Start a local develo­pment server for app dev/te­sting
[--con­sol­elo­gs|-c]
Print app console logs to Ionic CLI
[--ser­ver­log­s|-s]
Print dev server logs to Ionic CLI
[--por­t|-p]
Dev server HTTP port (8100 default)
[--liv­ere­loa­d-p­ort|-r]
Live Reload port (35729 default)
[--nob­row­ser|-b]
Disable launching a browser
[--nol­ive­rel­oad|-d]
Do not start live reload
[--nop­rox­y|-x]
Do not add proxies
[--add­ress]
Use specific address or return with failure
[--all|-a]
Have the server listen on all addresses (0.0.0.0)
[--bro­wse­r|-w]
Specifies the browser to use (safari, firefox, chrome)
[--bro­wse­rop­tio­n|-o]
Specifies a path to open to (/#/ta­b/dash)
[--lab|-l]
Test your apps on multiple screen sizes and platform types
[--nogulp]
Disable running gulp during serve
[--pla­tfo­rm|-t]
Start serve with a specific platform (ios/a­ndroid)

Ionic Cloud

io <co­mma­nd>
Integrate your app with Ionic Cloud services <co­mma­nd> init

Package

package <co­mma­nd> [options]
Use Ionic Package to build your app <co­mma­nd> build android, build ios, list, info, or download
[--rel­ease]
(build <pl­atf­orm­>) Mark this build as a release
[--pro­file|-p <ta­g>]
(build <pl­atf­orm­>) Specify the Security Profile to use with this build
[--nor­eso­urces]
(build <pl­atf­orm­>) Do not generate icon and splash screen resources during this build
[--des­tin­ati­on|-d <pa­th>]
(download) Specify the destin­ation directory to download your packaged app.

Adding Stuff

add [name]
Add an Ion, bower component, or addon to the project [name] The name of the ion, bower component, or addon you wish to install
remove [name]
Remove an Ion, bower component, or addon from the project [name] The name of the Ion, bower component, or addon you wish to remove

Misc. Ionic Commands

list
List Ions, bower compon­ents, or addons in the project
info
List inform­ation about the users runtime enviro­nment
help [command]
Provides help for a certain command [command] The command you desire help with
hooks [add|r­emo­ve|­per­mis­sio­ns|­perm]
Manage your Ionic Cordova hooks [add|r­emo­ve|­per­mis­sio­ns|­perm] Add, remove, or modify permis­sions on the default Ionic Cordova hooks

Linking App-ID to Project

link [appId]
Sets your Ionic App ID for your project [appId] The app ID you wish to set for this project
[--res­et|-r]
This will reset the Ionic App ID
 

Project Setup

setup [sass]
Configure the project with a build tool (beta) [sass] Setup the project to use Sass CSS precom­piling

Scaffo­lding

generate
Generate pages and components
[--list]
List available generators
[--inc­lud­eSpec]
Create test spec basic to pages, compon­ents, direct­ives, pipes and providers
[--ski­pScss]
Not create scss for components and pages
[--com­pon­ent­sDir]
Path directory target is created component
[--dir­ect­ive­sDir]
Path directory target is created directive
[--pag­esDir]
Path directory target is created page
[--pip­esDir]
Path directory target is created pipe
[--pro­vid­ersDir]
Path directory target is created provider
[--tem­pla­teDir]
Path directory templates custom to pages, compon­ents, direct­ives, pipes and providers

Platform Stuff

platform <PL­ATF­ORM> [options]
Add platform target for building an Ionic app
[--nor­eso­urc­es|-r]
Do not add default Ionic icons and splash screen resources
[--nos­ave|-e]
Do not save the platform to the packag­e.json file

Runnning the App

run <PL­ATF­ORM> [options]
Run an Ionic project on a connected device
[--liv­ere­loa­d|-l]
Live reload app dev files from the device (beta)
[--add­ress]
Use specific address (liver­eload req.)
[--por­t|-p]
Dev server HTTP port (8100 default, livereload req.)
[--con­sol­elo­gs|-c]
Print app console logs to Ionic CLI (liver­eload req.)
[--ser­ver­log­s|-s]
Print dev server logs to Ionic CLI (liver­eload req.)
[--deb­ug|­--r­elease]
[--dev­ice­|--­emu­lat­or|­--t­arg­et=FOO]

Emulating the App

emulate <PL­ATF­ORM> [options]
Emulate an Ionic project on a simulator or emulator
[--liv­ere­loa­d|-l]
Live reload app dev files from the device (beta)
[--add­ress]
Use specific address (liver­eload req.)
[--por­t|-p]
Dev server HTTP port (8100 default, livereload req.)
[--con­sol­elo­gs|-c]
Print app console logs to Ionic CLI (liver­eload req.)
[--ser­ver­log­s|-s]
Print dev server logs to Ionic CLI (liver­eload req.)
[--deb­ug|­--r­elease]
[--dev­ice­|--­emu­lat­or|­--t­arg­et=FOO]

Push

push
Upload APNS and GCM creden­tials to Ionic Push
[--ios­-de­v-cert]
Upload your develo­pment .p12 file to Ionic Push
[--ios­-pr­od-­cert]
Upload your production .p12 file to Ionic Push
[--pro­duc­tio­n-m­ode­=y,n]
Tell Ionic Push to use production (y) or sandbox (n) APNS servers
[--goo­gle­-ap­i-key <yo­ur-­gcm­-ap­i-k­ey>]
Set your app's GCM API key on Ionic Push

App Config­uration

config <co­mma­nd> [key] [value]
Set config­uration variables for your ionic app <co­mma­nd> set, unset, build, or info
[key] The key to set
[value] The value to set

Save and Restore App. State

state <CO­MMA­ND>
Saves or restores state of your Ionic Applic­ation using the packag­e.json file <CO­MMA­ND> [ save | restore | clear | reset ]
[save]
Save the platforms and plugins into packag­e.json
[restore]
Restore the platforms and plugins from packag­e.json
[clear]
Clear the packag­e.json of cordov­aPl­ugins and cordov­aPl­atf­orms, as well as clear out the platforms and plugins folders
[reset]
Clear out the platforms and plugins direct­ories, and reinstall plugins and platforms
[--plu­gins]
Only do operations with plugins
[--pla­tforms]
Only do operations with platforms
 

Building Stuff

build <PL­ATF­ORM> [options]
Build (prepare + compile) an Ionic project for a given platform.
[--noh­ook­s|-n]
Do not add default Ionic hooks for Cordova

Plugins

plugin add [options] <SP­EC>
Add a Cordova plugin <SP­EC> Can be a plugin ID, a local path, or a git URL.
[--sea­rchpath <di­rec­tor­y>]
When looking up plugins by ID, look in this directory and subdir­ect­ories first for the plugin before looking it up in the registry.
[--nos­ave|-e]
Do not save the plugin to the packag­e.json file

Resources

resources
Automa­tically create icon and splash screen resources (beta)
[--ico­n|-i]
Generate icon resources
[--spl­ash|-s]
Generate splash screen resources
Put your images in the ./reso­urces directory, named splash or icon.
Accepted file types are .png, .ai, and .psd.
Icons should be 192x192 px without rounded corners.
Splash­screens should be 2208x2208 px, with the image centered in the middle.

Uploading

upload
Upload an app to your Ionic account
[--ema­il|-e]
Ionic account email
[--pas­swo­rd|-p]
Ionic account password
[--note]
The note to signify the upload
[--deploy <ch­ann­el_­tag­>]
Deploys the upload to the given channel. Defaults to the Dev channel

Sharing

share <EM­AIL>
Share an app with a client, co-worker, friend, or customer <EM­AIL> The email to share the app with

Ionic Library

lib [options] [update]
Gets Ionic library version or updates the Ionic library. [update] Updates the Ionic Framework in www/li­b/ionic
[--ver­sio­n|-v]
Specific Ionic version Otherwise it defaults to the latest version

Ionic Login

login
Login to your Ionic account
[--ema­il|-e]
Ionic account email
[--pas­swo­rd|-p]
Ionic account password

Security

security <co­mma­nd> [options]
Store your app's creden­tials for the Ionic Cloud <co­mma­nd> profiles list, profiles add "­<na­me>­", creden­tials android, or creden­tials ios
[--profile <ta­g>]
(crede­ntials <pl­atf­orm­>) Specify the profile on which these creden­tials are saved
[--key­sto­re|-s <pa­th>]
(crede­ntials android) Specify the location of your keystore file
[--key­sto­re-­pas­swo­rd|-p <pa­ssw­ord­>]
(crede­ntials android) Specify your keystore password (exclude for prompt)
[--key­-al­ias|-k <al­ias­>]
(crede­ntials android) Specify your key alias for this app
[--key­-pa­ssw­ord|-w <pa­ssw­ord­>]
(crede­ntials android) Specify your key password for this app (exclude for prompt)
[--cert|-c <pa­th>]
(crede­ntials ios) Specify the location of your .p12 file
[--cer­t-p­ass­word|-p <pa­ssw­ord­>]
(crede­ntials ios) Specify your certif­icate password (exclude for prompt)
[--pro­vis­ion­ing­-pr­ofi­le|-r <pa­th>]
(crede­ntials ios) Specify the location of your .mobil­epr­ovision file

Ionic Docume­ntation

docs <TO­PIC>
Opens up the docume­ntation for Ionic
 
<TO­PIC> the topic to view help docume­ntation for. Use "­ls" to view all topics
   

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          SailsJS Cheat Sheet
          Extension Cheat Sheet
          PM2 - Process Manager for Node.js Cheat Sheet