App Engine helpers for ZSH

Here are some zsh helpers for Google App Engine will save you lot of typing in the long run. I’ve extendend the oh-my-zsh project with my own plugin for Google App Engine, but you can easily just add these to your .zshrc.

Uploading app

To use this alias you need to define GAE_EMAIL and GAE_PASS in your .zshrc. This saves you typing them in the first time.
alias gaeup="echo $GAE_PASS|$GAE_SDK/appcfg.py update . --email=$GAE_EMAIL --passin"

Helpers for bulkloader

Using bulkloader to download/restore multiple entities can be painful with all the manual steps. This helper is for downloading raw entity data from a live site for given Kind. Usage: gaebulkdl Kind app_id. Note: the _ah/remote_api is default for Python SDK 1.3.8 builtins.
function gaebulkdl() { echo $GAE_PASS|$GAE_SDK/bulkloader.py --dump --kind $1 --filename=$1.bin \ --url=http://$2.appspot.com/_ah/remote_api --email=$GAE_EMAIL --passin }

This function is for restoring downloaded data. Usage: gaebulkup Kind localhost.fi:8080 app_id email password
function gaebulkup() { echo $5|$GAE_SDK/bulkloader.py --restore --kind=$1 --filename=$1.bin \ --url=http://$2/_ah/remote_api --app_id=$3 --email=$4 --passin }

OSX ZSH magic

Terminal is perfect tool for hackers but it can increase anyones productivity.

ZSH is my default shell in Mac now. Read My Extravagant Zsh Prompt or zsh: The last shell you’ll ever need! why you should choose ZSH over OSX’s default Bash.

Tip 1: Use key bindings.

Here are some of my favourites:

Moving around:

Note: you must configure Terminal key bindings to make Crtl+arrows work for OSX.

Clearing:

Searching & History:

Tip 2: use preconfigured environments

Use shell framework such as oh-my-zsh or dotfiles. They give you helpers and preconfigured, easily customized environment which can be shared easily with all your computers. I chose oh-my-zsh and my configuration is available on GitHub.

Tip 3: replace Terminal.app

Replace Terminal.app with improved terminals with added features. Some options are iTerm or Visor, which I’m using.

Fork me on GitHub