Skip to content

Instantly share code, notes, and snippets.

@titanous
Created June 28, 2012 15:10
Show Gist options
  • Save titanous/3011906 to your computer and use it in GitHub Desktop.
Save titanous/3011906 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
begin
require 'heroku-api'
rescue LoadError
puts "Requires the heroku-api gem.\nRun `gem install heroku-api`"
exit
end
unless api_key = (ARGV[0] || ENV['HEROKU_API_KEY'])
puts "usage: #{$0} api-key\napi key can be found at https://api.heroku.com/account"
exit
end
heroku = Heroku::API.new(:api_key => api_key)
heroku.get_apps.body.map { |a| a['name'] }.each do |app|
puts "-----> \033[1;32m#{app}\033[0m"
heroku.get_config_vars(app).body.each { |k,v| puts "#{k}=#{v}" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment