Cordova oh-my-zsh Plugin

April 16, 2026 ยท View on GitHub

A simple oh-my-zsh plugin that provides handy aliases for Apache Cordova commands, inspired by git-style shortcuts (gco, gcb, etc).

Aliases

CommandAlias
cordovacdv
cordova buildcdvb
cordova runcdvr
cordova emulatecdve
cordova build androidcdvba
cordova build ioscdvbi
cordova run androidcdvra
cordova run ioscdvri
cordova emulate androidcdvea
cordova emulate ioscdvei
cordova preparecdvp
cordova compilecdvc
cordova servecdvs
cordova platformcdvpf
cordova platform addcdvpfa
cordova platform rmcdvpfr
cordova platform updatecdvpfu
cordova plugincdvpl
cordova plugin addcdvpla
cordova plugin rmcdvplr
cordova plugin updatecdvplu
cordova plugin listcdvpll
cordova requirementscdvreq
cordova requirements androidcdvreqa
cordova requirements ioscdvreqi
cordova createcdvcre
cordova cleancdvclean
cordova infocdvinfo
cordova telemetrycdvtel

Tab Completion

This plugin includes a _cordova completion file that enables tab-completion for both the cdv alias and the cordova command.

Supported completions:

  • Subcommands (build, run, platform, plugin, etc.)
  • Platform names (android, ios, browser)
  • Platform subcommands (add, rm, update, list, check)
  • Plugin subcommands (add, rm, update, list, search)
  • Global flags (--verbose, --no-telemetry, --version, --help)

Completion is loaded automatically when the plugin directory is on your $fpath (handled by oh-my-zsh and most plugin managers). If completions are not working, run:

rm -f ~/.zcompdump && exec zsh

Installation

oh-my-zsh

Clone this repo into your oh-my-zsh custom plugins folder:

git clone https://github.com/andredestro/cordova-zsh-plugin.git ~/.oh-my-zsh/custom/plugins/cordova

Then enable it in your ~/.zshrc:

plugins=(git cordova)

Reload zsh:

source ~/.zshrc

Zinit

If you use Zinit:

zinit light andredestro/cordova-zsh-plugin

Antigen

If you use Antigen:

antigen bundle andredestro/cordova-zsh-plugin

Zplug

If you use Zplug:

zplug "andredestro/cordova-zsh-plugin"

Homebrew

If you use Homebrew:

brew tap andredestro/tap
brew install cordova-zsh-plugin

Then add the following to your ~/.zshrc:

source "$(brew --prefix)/share/cordova-zsh-plugin/cordova.plugin.zsh"

Reload zsh:

source ~/.zshrc

Tab completion is installed automatically to $(brew --prefix)/share/zsh/site-functions/_cordova.


Troubleshooting

cordova: command not found

Cordova is not installed or not in your $PATH. Install it via npm:

npm install -g cordova

cdv: command not found

The plugin is not loaded. Verify that:

  1. The plugin is cloned to ~/.oh-my-zsh/custom/plugins/cordova/
  2. cordova is listed in your plugins array in ~/.zshrc
  3. You have reloaded your shell with source ~/.zshrc

Aliases not working after installation

Open a new terminal or run:

source ~/.zshrc

Tab completion not working

Rebuild the zsh compdump file:

rm -f ~/.zcompdump && exec zsh

Contributing

Pull requests are welcome! Feel free to suggest new aliases or improvements.


License

MIT