Project

thor-aws

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Thor extension for building CLI to deal with AWS.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
>= 0
~> 10.0
>= 0

Runtime

>= 0
 Project Readme

Thor::Aws

Gem Version Build Status

Thor extension for building CLI to deal with AWS.

Installation

Add this line to your application's Gemfile:

gem 'thor-aws'

And then execute:

$ bundle

Or install it yourself as:

$ gem install thor-aws

Usage

Just add include Thor::Aws to your CLI class. Then you can use private methods such as #ec2 or #rds to call a instance of Aws::EC2::Resource or so in your CLI.

Also, --access-key-id, --secret-access-key, --region and --profile options will be added to your CLI (of course, these credentials are used by Aws clients).

Example

require "thor"
require "thor/aws"

class MyAwsCLI < Thor
  include Thor::Aws

  desc :list, "Show list of EC2 instance"

  def list
    p ec2.instances.to_a
  end
end

Changelog

0.0.3: Add --shared-credentials-path option.

Testing

bundle install --path vendor/bundle
bundle exec rake spec

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request