public
Description: Officlal repo is now at: http://github.com/heroku/heroku-client
Homepage: http://heroku.com/
Clone URL: git://github.com/adamwiggins/heroku-client.git
heroku-client / README
100644 126 lines (82 sloc) 3.903 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
= Heroku API - deploy apps to Heroku from the command line
 
This library wraps the REST API for managing and deploying Rails apps to the
Heroku platform. It can be called as a Ruby library, or invoked from the
command line. Code push and pull is done through Git.
 
For more information about Heroku, see: http://heroku.com
 
== Sample Workflows
 
Start a new app from scratch, work on it locally, then deploy the changes:
 
  heroku create newapp
  git clone git@heroku.com:newapp.git
  cd newapp
  rake db:migrate
  script/server
  [..work locally for a while..]
  git add .
  git commit -m "some changes made locally"
  git push
 
Deploy an existing Rails app:
 
  cd ~/projects/existingapp
  # skip the next three commands if the app already has a git repo
  git init
  git add .
  git commit -m "init"
  heroku create existingapp-deploy
  git remote add heroku git@heroku.com:existingapp-deploy.git
  git push -f heroku
 
== Setup
 
  gem install heroku
 
If you wish to push or pull code, you must also have a working install of Git
("apt-get install git-core" on Ubuntu or "port install git-core" on OS X), and
an ssh public key ("ssh-keygen -t rsa").
 
The first time you run a command, such as "heroku list," you will be prompted
for your Heroku username and password. These are saved to ~/heroku/credentials
for future requests. Your public key (~/.ssh/id_[rd]sa.pub) will be uploaded
to Heroku after you enter your credentials. Use heroku keys --add if you wish
to upload additional keys or specify a key in a non-standard location.
 
== Command-Line Usage
 
  heroku list
 
Get a list of your apps.
 
  heroku create [<appname>]
 
Create a new app. If you don't provide a name, one will be assigned (you can
change it later with the update --name command). The web url and git repo url
will be shown as the command's output.
 
  git clone git@heroku.com:<appname>.git
 
Clone the repository of the Heroku app for local work. Note that this fetches
only code that has been committed to the repo; uncommitted changes inside the
web code editor will not be pulled.
 
  git push
 
Deploy local changes back to Heroku. You must commit to your local repository
first (e.g., git commit -a). Use -f if you are pushing for the first time to
force overwriting the repo.
 
  heroku info
 
Show info about the app like the web url, git repo, and sharing settings.
 
  heroku update [--name <newname>] [--public (true|false)] [--mode (production|development)]
 
Update settings on the app, providing one or more of the options shown.
 
  heroku sharing --add <email>
  heroku sharing --remove <email>
 
Manage collaborators on the app. An invitation will be sent by email for the
new collaborator to view or edit the app.
 
  heroku rake <command>
 
Execute a rake command on the Heroku app.
 
  heroku destroy <app>
 
Permenantly destroy the app.
 
  heroku keys
  heroku keys --add [<path to keyfile>]
  heroku keys --remove [keyname]
  heroku keys --remove all
 
Manage your ssh public keys for git push/pull on your apps. The default key
(~/.ssh/id_[rd]sa.pub) is uploaded automatically when you enter your
credentials. If you wish to add additional keys, or you have a key in a
nonstandard location, you can use heroku keys --add. Without any arguments,
this will list all the keys attached to your Heroku user account.
 
== Further Reading
 
The Heroku::Client class wraps the REST API. You can instantiate this class to
access the API from within a Ruby program, such as a Capistrano script.
 
Documentation for the underlying REST resources: link:files/REST.html
 
== Meta
 
Written by Adam Wiggins
 
Major modifications by Pedro Belo
 
Patches contributed by: Chris O'Sullivan, Blake Mizerany
 
Released under the MIT license: http://www.opensource.org/licenses/mit-license.php
 
Send feedback and questions to the Heroku mailing list: http://groups.google.com/group/heroku
 
http://github.com/adamwiggins/heroku-client