HTTPS SSH
= ec2cli

== Description

ec2cli is an interactive command-line client of Amazon EC2.

== Source Code

https://bitbucket.org/winebarrel/ec2cli

== Install

  shell> gem install ec2cli
  shell> export AWS_ACCESS_KEY_ID='...'
  shell> export AWS_SECRET_ACCESS_KEY='...'
  shell> export EC2_REGION=ap-northeast-1
  shell> ec2cli -h
  Usage: ec2cli [options]
      -k, --access-key=ACCESS_KEY
      -s, --secret-key=SECRET_KEY
      -r, --region=REGION_OR_ENDPOINT
          --debug
      -h, --help
      ...
  shell> ec2cli # show prompt
  ap-northeast-1> desc instances;
  [
    ["cthulhu","i-01bd4903","stopped","10.0.114.178","t1.micro",["default"],{"Name":"cthulhu"},"ap-northeast-1a"],
    ["hastur","i-e78d79e5","stopped","10.0.130.129","m1.large",["default"],{"Name":"hastur","aaa":"1100"},"ap-northeast-1b"],
    ["nyar","i-a5e119a7","stopped","10.0.254.210","c1.xlarge",["default"],{"aaa":"1100","Name":"nyar"},"ap-northeast-1b"],
  ]
  // 3 rows in set (0.23 sec)

== Help

  ##### Query #####
  
  DESC[RIBE] INSTANCES [WHERE name = '...' AND ...]
    Describes one or more of your instances.
  
  DESC[RIBE] IMAGES [WHERE name = '...' AND ...]
  DESC[RIBE] ALL IMAGES [WHERE [Owner = {amazon|aws-marketplace|self} AND] name = '...' AND ...]
    Describes the images.
  
  RUN INSTANCES image_id
    Launches instances
  
  START INSTANCES id_or_name
  START INSTANCES (id_or_name, ...)
    Starts an Amazon EBS-backed AMI that you've previously stopped.
  
  STOP INSTANCES id_or_name
  STOP INSTANCES (id_or_name, ...)
    Stops an Amazon EBS-backed instance
  
  SET TAGS name = value, ...  [WHERE name = '...' AND ...]
    Adds or overwrites one or more tags for the specified EC2 resource or resources.
  
  USE region_or_endpoint
    changes an endpoint
  
  SHOW REGIONS
    displays a region list
  
  ##### Command #####
  
  .help                           displays this message
  .quit | .exit                   exits sdbcli
  .debug           (true|false)?  displays a debug status or changes it
  .version                        displays a version