{"id":23740148,"url":"https://github.com/cobbzilla/do","last_synced_at":"2025-10-10T03:03:33.618Z","repository":{"id":12530793,"uuid":"15200739","full_name":"cobbzilla/do","owner":"cobbzilla","description":"Manage DigitalOcean droplets with ease from the command line","archived":false,"fork":false,"pushed_at":"2014-01-07T23:40:25.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-24T11:08:37.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cobbzilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-15T09:18:28.000Z","updated_at":"2014-01-08T00:14:34.000Z","dependencies_parsed_at":"2022-09-16T23:21:25.988Z","dependency_job_id":null,"html_url":"https://github.com/cobbzilla/do","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cobbzilla/do","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbzilla%2Fdo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbzilla%2Fdo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbzilla%2Fdo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbzilla%2Fdo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cobbzilla","download_url":"https://codeload.github.com/cobbzilla/do/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cobbzilla%2Fdo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002519,"owners_count":26083417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-31T09:47:16.750Z","updated_at":"2025-10-10T03:03:33.603Z","avatar_url":"https://github.com/cobbzilla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"do\n======\n\nManage Digital Ocean droplets with ease.\n\n### Setup\n\n* Copy the scripts in bin to wherever you want them. Ensure that \"do\" is on your path.\n* Create a ~/.digitalocean file, the contents should be:\n\n        export DO_CLIENT_ID=e15...\n        export DO_API_KEY=825a...\n        export DO_ROOT_KEY=/path/to/ssh/key   # private key that allows root to ssh into new droplets\n\n* Run the install-packages.sh script to install the required python modules (this uses apt-get; for other package managers it'll be a little different)\n\n### Machines\nDigital Ocean droplets have a number of parameters that must be specified at time of creation and can never change thereafter.\nThings like region, size, image (operating system), etc.\n\nThis utility uses simple yaml files, called machine files, to capture this data.\n\nAn example machine file is in machines/dev.yml, duplicated here:\n\n    size_id: 2GB\n    image_id: Ubuntu 13.10 x64\n    region_id: New York 2\n    ssh_key_ids: [ dev ]\n    virtio: false\n    private_networking: false\n\nCopy this machines directory somewhere, and set your DO_MACHINES environment variable to point to it.\nNote that you can create machines with an absolute path to a machine file (see \"do create\" below), but it's often easier to use a simple symbolic name.\n\n### Usage\n\n##### List all images\n\n        do images\n##### List all regions\n\n        do regions\n##### List all sizes\n\n        do sizes\n##### List all ssh keys\n\n        do keys\n##### List all droplets\nThese are equivalent:\n\n        do droplets\n        do list\n\n##### Create a new droplet\n\n        do create machine-type name\nFor example:\n\n        do create prod-nginx nginx14\n        do create /absolute/path/to/prod-nginx.yml nginx14\nThe first example above creates a new droplet named nginx14 based on the machine file ${DO_MACHINES}/prod-nginx.yml\n\nThe second example above creates a new droplet named nginx14 based on the machine file /absolute/path/to/prod-nginx.yml\n\n\n#####  Bootstrap a droplet (only tested on Ubuntu)\nBootstrapping will remove the root-access SSH key you used to create the machine, and replace\nit with a regular user who can login via ssh without using a password (but using the given ssh public key), and\nhas sudo access without requiring a password.\n\n        do bootstrap nginx14 myuser ~/path/to/myuser/.ssh/key.pub\nFor this command to work, you must have DO_ROOT_KEY defined in either ~/.digitalocean or your shell environment.\n\n##### View a droplet\nThese are all equivalent, and will show a pretty-printed JSON representation of the droplet:\n\n        do droplets nginx14\n        do droplet nginx14\n        do inspect nginx14\n        do view nginx14\n        do show nginx14\n\n##### Print a droplet's IP\nThis will print just the droplet's IP address, and is useful in script where you want to do something with $(do droplet-ip ${something})\n\n        do droplet-ip nginx14\n\n##### SSH to a droplet\nThis will only work if you bootstrapped the droplet using \"do bootstrap\":\n\n        do ssh nginx14\n\n##### Destroy a droplet\n!!! **There is no \"are you sure\" asked here, your droplet WILL BE DESTROYED when you hit Enter** !!!\nNote that this *does* pass the \"scrub_data\" parameter when calling the destroy API, so your disks will be wiped clean. This avoids an otherwise inherent security flaw that would allow the next person who uses the same underlying hardware to read your data from the raw disk.\n\n        do destroy nginx14\n\n##### Developer access\nEnter a python console with all functions/variables in context, for development and/or debugging purposes:\n\n        do console\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobbzilla%2Fdo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcobbzilla%2Fdo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcobbzilla%2Fdo/lists"}