Using .bash_profile aliases to simplify Titanium CLI calls

By | August 4, 2014

You can use aliases on the Terminal to create shortcuts to those commands you use constantly. In this article you can take a look at how to create aliases.

I have aliases created for Titanium CLI, Alloy CLI and TiShadow, here is how my .bash_profile looks:
 


# Paths
alias goto_apps='cd ~/Documents/Apps'
alias goto_ts='cd ~/Documents/Apps/tishadowapp'
alias goto_widgets='cd ~/Documents/AlloyWidgets'

# TiShadow Alias
alias ts_server='tishadow server'
alias ts_run='tishadow run'
alias ts_update='tishadow run --update'

# Titanium CLI
alias run_iphone='titanium build -p ios -T simulator -Y iphone --tall --retina'
alias run_iphone4='titanium build -p ios -T simulator -Y iphone --retina'
alias run_ipad='titanium build -p ios -T simulator -Y ipad --retina'
alias run_ipadn='titanium build -p ios -T simulator -Y ipad '

# Alloy CLI
alias alloy_widget='alloy generate widget'
alias alloy_controller='alloy generate controller'

 

With my aliases in place, if I wanted for example to run the TiShadow server I can do this:
 

ts_server

 

And then run an iPad retina simulator with the TiShadow app:
 

goto_ts
run_ipad

 

Enjoy!

8 thoughts on “Using .bash_profile aliases to simplify Titanium CLI calls

  1. Pingback: This Week in Titanium Mobile Development: 11 Aug 2014 | TiDev

  2. Pingback: This Week in Titanium Mobile Development: 11 Aug 2014 | Geeks Inc.

  3. Pingback: Essa Semana em Titanium Mobile Development: 11 de Agosto de 2014 | TiDev

  4. Braden Powers

    Just a quick question…should the command be ts_server instead of ti_server?

    Reply

Leave a Reply