Introducing the AppHarbor Command Line Utility


We’re happy to announce the release of the AppHarbor CLI. This utility gives you complete control over your applications using simple commands. After logging in, you can create new applications, retrieve build history, and manage configuration variables and host names.

Get started by downloading and installing the utility. The installer will add it to your system path.

Download AppHarbor CLI

In the first version, the following commands are supported. The commands at the end in parentheses are shortcuts that you can use directly. This will be demonstrated in the examples below.

app                         #  List your applications
app create [name]           #  Create an application ("create")
app delete                  #  Delete application
app info                    #  Get application details
app link [slug]             #  Link directory to an application ("link")
app unlink                  #  Unlink application from directory ("unlink")
build                       #  List latest builds
config add [key=value]      #  Add configuration variable to application
config                      #  List all configuration variables
config remove [key1 key2..] #  Remove configuration variable
help                        #  Display help summary
hostname add [hostname]     #  Add a hostname
hostname                    #  List all associated hostnames
hostname remove [hostname]  #  Remove hostname from application
user login                  #  Login to AppHarbor ("login")
user logout                 #  Logout of AppHarbor ("logout")
user                        #  Show currently logged in user

Example: Create a new application

Begin by opening a command prompt and logging with your AppHarbor user information.

c:dev>appharbor user login
Username: js
Password: **********************
Successfully logged in as js

Create a new directory for your app and use the create shortcut to create the app with AppHarbor and initialize the directory with the Git settings your application needs to push and deploy your code to AppHarbor’s servers.

c:dev>mkdir MyFancyApp
c:dev>cd MyFancyApp

c:devMyFancyApp>appharbor create MyFancyApp
Created application "myfancyapp" | URL:

Git repository is not initialized in this folder. 
Do you want to initialize it (type "y")? y

Git repository was initialized with default .gitignore file.
Added "appharbor" as a remote repository. 
Push to AppHarbor with git push appharbor master.

Example: Link an existing application

If you already have an app in a folder configured for use with AppHarbor, you can link it to the existing application so that you can use the CLI commands to manage configuration variables and hostnames.

Navigate to the folder that contains your application and use the link command to tie it to the specified AppHarbor application slug. If the appharbor remote doesn’t exist, it will be created for you.

c:dev>mkdir MyExistingApp

c:dev>cd MyExistingApp

c:devMyExistingApp>appharbor link myexistingapp
Added "appharbor" as a remote repository. 
Push to AppHarbor with git push appharbor master.