Oc
DigitalOcean commandline tools
Installation
Add this line to your application's Gemfile:
gem 'oc'
And then execute:
$ bundle
Or install it yourself as:
$ gem install oc
Droplets
Droplet List
$ oc droplets
Create New Droplet
$ oc droplets new [DROPLET_NAME] [SIZE_ID] [IMAGE_ID] [REGION_ID]
Reboot Droplet
$ oc droplets reboot [DROPLET_ID]
Droplet Power Cycle
$ oc droplets cycle [DROPLET_ID]
Power Down Droplet
$ oc droplets down [DROPLET_ID]
Power Off Droplet
$ oc droplets off [DROPLET_ID]
Power On Droplet
$ oc droplets on [DROPLET_ID]
Reset Droplet Password
$ oc droplets reset_password [DROPLET_ID]
Resize Droplet
$ oc droplets resize [DROPLET_ID] [SIZE_ID]
Create Snapshot
$ oc droplets create-snaphot [DROPLET_ID] [SNAPSHOT_NAME]
Show droplet snapshots
$ oc droplets snapshots [DROPLET_ID]
Restore Droplet
$ oc droplets restore [DROPLET_ID] [IMAGE_ID]
Rebuild Droplet
$ oc droplets rebuild [DROPLET_ID] [IMAGE_ID]
Rename Droplet
$ oc droplets rename [DROPLET_ID] [NEW_NAME]
Enable IPv6 for a droplet
$ oc droplets enable-ipv6 [DROPLET_ID]
Droplet Kernels
$ oc droplets kernels [DROPLET_ID]
Change Kernels
$ oc droplets change-kernel [DROPLET_ID] [KERNEL_ID]
Disable Droplet Backup
$ oc droplets disable-backup [DROPLET_ID]
Enable Private Network
$ oc droplets enable-private-network [DROPLET_ID]
SSH
SSH Key List
$ oc ssh keys
Add SSH Key
$ oc ssh add [KEY_NAME] [KEY_PUB]
Show SSH Key
$ oc ssh show [KEY_ID]
Edit SSH Key
$ oc ssh edit [KEY_ID] [KEY_NAME] [KEY_PUB]
Destroy SSH Key
$ oc ssh destroy [KEY_ID]
Regions
Region List
$ oc regions
Domains
Show all domains
$ oc domain
Show domain
$ oc domain show [DOMAIN_NAME]
Destroy domain
$ oc domain destroy [DOMAIN_NAME]
Create Domain
$ oc domain create [DOMAIN_NAME] [TYPE] [IP]
Sizes
Size List
$ oc sizes
Images
Show Images
$ co images [true]
Show Image
$ oc images show [IMAGE_ID]
Destroy Image
$ oc images destroy [IMAGE_ID]
Transfer Image
$ oc images transfer [IMAGE_ID] [REGION_ID]
Information
Show API Key and Client ID
$ oc info show
Change Information
$ oc info change
Contributing
- Fork it (http://github.com/0x73/oc/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request