# AF The AppFog CLI. This is the command line interface to AppFog.com af is based on vmc but will have features specific to the AppFog service as well as having the default target set to AppFog's service ## Installation There are two ways to install af. Most users should install the RubyGem. $ sudo gem install af You can also check out the source for development. You will need [Bundler](http://gembundler.com/) to build af. $ git clone https://github.com/appfog/af.git $ cd af $ bundle install ## Usage _Copyright 2010-2012, VMware, Inc. Licensed under the MIT license, please see the LICENSE file. All rights reserved._ Usage: af [options] command [] [command_options] Try 'af help [command]' or 'af help options' for more information. Currently available af commands are: Getting Started target [url] Reports current target or sets a new target login [email] [--email, --passwd] Login info System and account information Applications apps List deployed applications Application Creation push [appname] Create, push, map, and start a new application push [appname] --infra Push application to specified infrastructure push [appname] --path Push application from specified path push [appname] --url Set the url for the application push [appname] --instances Set the expected number of instances push [appname] --mem M Set the memory reservation for the application push [appname] --no-start Do not auto-start the application Application Download pull [path] Downloads last pushed source to or [path] Application Operations start Start the application stop Stop the application restart Restart the application delete Delete the application Application Updates update [--path] Update the application bits mem [memsize] Update the memory reservation for an application map Register the application to the url unmap Unregister the application from the url instances Scale the application instances up or down rename Change the application's name Application Information crashes List recent application crashes crashlogs Display log information for crashed applications logs [--all] Display log information for the application files [path] [--all] Display directory listing or file download for path stats Display resource usage for the application instances List application instances Application Environment env List application environment variables env-add Add an environment variable to an application env-del Delete an environment variable to an application Services services Lists of services available and provisioned create-service [--name,--bind] Create a provisioned service create-service --infra Create a provisioned service on a specified infrastructure create-service Create a provisioned service and assign it create-service Create a provisioned service and assign it , and bind to delete-service [servicename] Delete a provisioned service bind-service Bind a service to an application unbind-service Unbind service from the application clone-services Clone service bindings from application to tunnel [--port] Create a local tunnel to a service tunnel Create a local tunnel to a service and start a local client Administration user Display user account information passwd Change the password for the current user logout Logs current user out of the target system add-user [--email, --passwd] Register a new user (requires admin privileges) delete-user Delete a user and all apps and services (requires admin privileges) System runtimes Display the supported runtimes of the target system frameworks Display the recognized frameworks of the target system infras Display the available infrastructures Micro Cloud Foundry micro status Display Micro Cloud Foundry VM status micro offline Configure Micro Cloud Foundry VM for offline mode micro online Configure Micro Cloud Foundry VM for online mode [--vmx file] Path to micro.vmx [--vmrun executable] Path to vmrun executable [--password cleartext] Cleartext password for guest VM vcap user [--save] Save cleartext password in ~/.vmc_micro Misc aliases List aliases alias Create an alias for a command unalias Remove an alias targets List known targets and associated authorization tokens Help help [command] Get general help or help on a specific command help options Get help on available options ## Sample Usage (for PHP apps) $ af login developer@example.com Attempting login to [https://api.appfog.com] Password: ********* Successfully logged into [https://api.appfog.com] $ af push Would you like to deploy from the current directory? [Yn]: Y Application Name: myapp Detected a PHP Application, is this correct? [Yn]: 1: AWS US East - Virginia 2: AWS EU West - Ireland 3: AWS Asia SE - Singapore 4: Rackspace AZ 1 - Dallas 5: HP AZ 2 - Las Vegas Select Infrastructure: 1 Application Deployed URL [myapp.aws.af.cm]: Memory reservation (128M, 256M, 512M, 1G, 2G) [128M]: How many instances? [1]: Bind existing services to 'myapp'? [yN]: Create services to bind to 'myapp'? [yN]: Would you like to save this configuration? [yN]: Creating Application: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (6K): OK Push Status: OK Staging Application 'myapp': OK Starting Application 'myapp': OK