A CLI for Rackspace
Clone or download
Jamie Hannaford
Jamie Hannaford Merge pull request #458 from ebeeson/master
Fix typos
Latest commit 0141d25 Sep 13, 2017
Failed to load latest commit information.
acceptance Add stackcommands acceptance tests Oct 26, 2015
auth fix out of memory when downloading big file Jan 22, 2017
commandoptions 'profile activate' and 'profile list' commands May 6, 2016
commands Fix typos in command help text Aug 16, 2017
docs Fix typos in `servers.rst` docs Aug 15, 2017
handler remove redundant error check Oct 21, 2015
internal create image from server May 9, 2016
output Migrate to github.com/rackspace/rack Aug 5, 2015
script Move chocolatey packaging build to appveyor Mar 15, 2017
setup Migrate to github.com/rackspace/rack Aug 5, 2015
util change flag:admin->enable-profile-activate May 16, 2016
.appveyor.yml Move chocolatey packaging build to appveyor Mar 15, 2017
.gitignore BlockStorage Jun 29, 2015
.travis.yml and to come full circle, back to v1.4 Mar 7, 2016
CONTRIBUTING.md remove reference to sdk email address from CONTRIBUTING Mar 28, 2017
LICENSE First pass of a license for rack Aug 12, 2015
README.md Add build badges to README May 2, 2016
RELEASE_NOTES.md 1.0.0-beta.1 release notes Aug 19, 2015
commandsuggest.go Migrate to github.com/rackspace/rack Aug 5, 2015
configure.go 'profile deactivate' command; verbiage explaining 'profile activate' May 10, 2016
design.md Cleanup from code review Jun 12, 2015
help.go Migrate to github.com/rackspace/rack Aug 5, 2015
main.go change flag:admin->enable-profile-activate May 16, 2016
man.go remove reference to sdk email address from manpage Mar 28, 2017
profile.go change flag:admin->enable-profile-activate May 16, 2016



Code: Build Status | Documentation: Doc Build Status

The official command line interface for the Rackspace Cloud.

rack provides a consistent interface for interacting with the Rackspace Cloud. For example, creating a new server:

$ rack servers instance create \
    --name my-server \
    --image-id 5ed162cc-b4eb-4371-b24a-a0ae73376c73 \
    --flavor-id general1-1 \
    --keypair my-laptop

ID		9818861f-2f14-437f-89b0-a36dfa1831b7
AdminPass	4vLb2PiqUGdP

For complete documentation, see the docs.


rack binaries are available for OSX, Linux, and Windows. Download rack now.

Build From Source

Make sure you have Go installed and the GOPATH environment variable set.

go get github.com/rackspace/rack
cd $GOPATH/src/github.com/rackspace/rack

Setting Authentication Credentials

rack has a number of ways of getting credentials configured. The easiest way is to use rack configure to setup a profile:

$ rack configure

    This interactive session will walk you through creating
    a profile in your configuration file. You may fill in all or none of the

    Rackspace Username: iamacat
    Rackspace API key: secrets
    Rackspace Region: IAD
    Profile Name (leave blank to create a default profile):

This will create a configuration file at ~/.rack/config which will store your credentials. When using the default profile, you don't need to specify the profile:

rack servers instance list

However, if you've named a profile, you can use the --profile flag to specify it explicitly:

rack servers instance list --profile staging

Environment Variables

In addition to using the config file, you can also use environment variables. The following environment variables are supported:

RS_USERNAME (Your Rackspace username)
RS_API_KEY (Your Rackspace API key)


Lastly, you can also set your authentication credentials as flags:

$ rack servers instance list --username user1 --api-key 123456789 --region DFW


rack will first look for credentials as flags. Secondly, rack will use a named profile, or default if there is a default profile. Lastly, rack will look for environment variables.

Bash Completion

At any time, you can run rack init which will create the auto-completion file in ~/.rack/bash_autocomplete and add it to ~/.bash_profile. You'll need to restart your terminal session to enable auto-completion.

For command completion on Windows, please see the command completion section on the configuration page of our documentation.


Below is a tentative list of services to be added. Though currently ordered by priority, the list can and will change:

  1. Cloud Load Balancers
  2. Cloud DNS *
  3. Cloud Databases *
  4. Cloud Identity
  5. Cloud Images *
  6. Rackspace CDN
  7. RackConnect
  8. Cloud Big Data *
  9. Cloud Monitoring *
  10. Cloud Orchestration
  11. Cloud Queues *
  12. Cloud Backup *
  13. Autoscale *
  14. Cloud Metrics *

* Services not supported in Gophercloud at present.