{"id":13511690,"url":"https://github.com/digitalocean/doctl","last_synced_at":"2026-06-03T07:01:10.798Z","repository":{"id":32933918,"uuid":"36529854","full_name":"digitalocean/doctl","owner":"digitalocean","description":"The official command line interface for the DigitalOcean API.","archived":false,"fork":false,"pushed_at":"2026-05-29T11:33:38.000Z","size":59942,"stargazers_count":3424,"open_issues_count":134,"forks_count":462,"subscribers_count":125,"default_branch":"main","last_synced_at":"2026-05-29T17:18:33.256Z","etag":null,"topics":["cloud","command-line","digitalocean","hacktoberfest","infrastructure"],"latest_commit_sha":null,"homepage":"https://docs.digitalocean.com/reference/doctl/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Spomky-Labs/jose","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalocean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-05-29T21:24:39.000Z","updated_at":"2026-05-29T12:18:25.000Z","dependencies_parsed_at":"2025-12-08T15:07:08.048Z","dependency_job_id":"aa17b052-c5fd-4498-95a7-441c086b14da","html_url":"https://github.com/digitalocean/doctl","commit_stats":{"total_commits":1820,"total_committers":201,"mean_commits":9.054726368159203,"dds":0.793956043956044,"last_synced_commit":"42fc8b6fa6661d72a0b93c7a5dbc4b71243bc669"},"previous_names":[],"tags_count":260,"template":false,"template_full_name":null,"purl":"pkg:github/digitalocean/doctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/doctl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdoctl/sbom","scorecard":{"id":342585,"data":{"date":"2025-08-11","repo":{"name":"github.com/digitalocean/doctl","commit":"dd23f802ba01e39f27efbb2762dcbf9153c65f1b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.1,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/snapcraft-candidate.yml:1","Warn: no topLevel permission defined: .github/workflows/typos.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/digitalocean/.github/SECURITY.md:1","Info: Found linked content: github.com/digitalocean/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/digitalocean/.github/SECURITY.md:1","Info: Found text in security policy: github.com/digitalocean/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.138.0 not signed: https://api.github.com/repos/digitalocean/doctl/releases/238533856","Warn: release artifact v1.137.0 not signed: https://api.github.com/repos/digitalocean/doctl/releases/238491725","Warn: release artifact v1.135.0 not signed: https://api.github.com/repos/digitalocean/doctl/releases/234860901","Warn: release artifact v1.134.0 not signed: https://api.github.com/repos/digitalocean/doctl/releases/233966011","Warn: release artifact v1.133.0 not signed: https://api.github.com/repos/digitalocean/doctl/releases/231437905","Warn: release artifact v1.138.0 does not have provenance: https://api.github.com/repos/digitalocean/doctl/releases/238533856","Warn: release artifact v1.137.0 does not have provenance: https://api.github.com/repos/digitalocean/doctl/releases/238491725","Warn: release artifact v1.135.0 does not have provenance: https://api.github.com/repos/digitalocean/doctl/releases/234860901","Warn: release artifact v1.134.0 does not have provenance: https://api.github.com/repos/digitalocean/doctl/releases/233966011","Warn: release artifact v1.133.0 does not have provenance: https://api.github.com/repos/digitalocean/doctl/releases/231437905"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/snapcraft-candidate.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/snapcraft-candidate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/snapcraft-candidate.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/snapcraft-candidate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/snapcraft-candidate.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/snapcraft-candidate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/typos.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/typos.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/typos.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/digitalocean/doctl/typos.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:22: pin your Docker image by updating alpine:3.12 to alpine:3.12@sha256:c75ac27b49326926b803b9ed43bf088bc220d22556de1bc5f72d742c91398f69","Warn: containerImage not pinned by hash: Dockerfile.goreleaser:1: pin your Docker image by updating alpine:3.8 to alpine:3.8@sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14","Warn: goCommand not pinned by hash: vendor/github.com/json-iterator/go/build.sh:10","Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/benchmark.sh:10","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   1 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3829 / GHSA-4vq8-7jfc-9cvp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T06:14:30.902Z","repository_id":32933918,"created_at":"2025-08-18T06:14:30.902Z","updated_at":"2025-08-18T06:14:30.902Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33852295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"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":["cloud","command-line","digitalocean","hacktoberfest","infrastructure"],"created_at":"2024-08-01T03:01:06.452Z","updated_at":"2026-06-03T07:01:10.754Z","avatar_url":"https://github.com/digitalocean.png","language":"Go","funding_links":[],"categories":["Go","Tools for Self-Hosting","Clients","Software \u003ca name=\"software\"\u003e\u003c/a\u003e","OSS CLIs","Uncategorized","Open source projects","Cloud and Infrastructure"],"sub_categories":["Cloud","Uncategorized"],"readme":"\u003ch1 align=\"center\"\u003edoctl\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" height=\"170\" src=\"https://api-engineering.nyc3.cdn.digitaloceanspaces.com/doctl-mascot.png\" alt=\"The doctl mascot.\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/digitalocean/doctl/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/digitalocean/doctl/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://godoc.org/github.com/digitalocean/doctl\"\u003e\n    \u003cimg src=\"https://godoc.org/github.com/digitalocean/doctl?status.svg\" alt=\"GoDoc\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/digitalocean/doctl\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/digitalocean/doctl\" alt=\"Go Report Card\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n```\ndoctl is a command-line interface (CLI) for the DigitalOcean API.\n\nUsage:\n  doctl [command]\n\nAvailable Commands:\n  1-click         Display commands that pertain to 1-click applications\n  account         Display commands that retrieve account details\n  apps            Display commands for working with apps\n  auth            Display commands for authenticating doctl with an account\n  balance         Display commands for retrieving your account balance\n  billing-history Display commands for retrieving your billing history\n  completion      Modify your shell so doctl commands autocomplete with TAB\n  compute         Display commands that manage infrastructure\n  databases       Display commands that manage databases\n  help            Help about any command\n  invoice         Display commands for retrieving invoices for your account\n  kubernetes      Displays commands to manage Kubernetes clusters and configurations\n  monitoring      [Beta] Display commands to manage monitoring\n  projects        Manage projects and assign resources to them\n  registry        Display commands for working with container registries\n  version         Show the current version\n  vpcs            Display commands that manage VPCs\n\nFlags:\n  -t, --access-token string   API V2 access token\n  -u, --api-url string        Override default API endpoint\n  -c, --config string         Specify a custom config file (default \"$HOME/.config/doctl/config.yaml\")\n      --context string        Specify a custom authentication context name\n  -h, --help                  help for doctl\n  -o, --output string         Desired output format [text|json] (default \"text\")\n      --trace                 Show a log of network activity while performing a command\n  -v, --verbose               Enable verbose output\n\nUse \"doctl [command] --help\" for more information about a command.\n```\n\nSee the [full reference documentation](https://www.digitalocean.com/docs/apis-clis/doctl/reference/) for information about each available command.\n\n- [Installing `doctl`](#installing-doctl)\n  - [Using a Package Manager (Preferred)](#using-a-package-manager-preferred)\n    - [MacOS](#macos)\n    - [Snap supported OS](#snap-supported-os)\n      - [Use with `kubectl`](#use-with-kubectl)\n      - [Using `doctl compute ssh`](#using-doctl-compute-ssh)\n      - [Use with Docker](#use-with-docker)\n    - [Arch Linux](#arch-linux)\n    - [Fedora](#fedora)\n    - [Nix supported OS](#nix-supported-os)\n  - [Docker Hub](#docker-hub)\n  - [Downloading a Release from GitHub](#downloading-a-release-from-github)\n  - [Building with Docker](#building-with-docker)\n  - [Building the Development Version from Source](#building-the-development-version-from-source)\n  - [Dependencies](#dependencies)\n- [Authenticating with DigitalOcean](#authenticating-with-digitalocean)\n  - [Logging into multiple DigitalOcean accounts](#logging-into-multiple-digitalocean-accounts)\n- [Configuring Default Values](#configuring-default-values)\n  - [Environment Variables](#environment-variables)\n- [Enabling Shell Auto-Completion](#enabling-shell-auto-completion)\n  - [Linux Auto Completion](#linux-auto-completion)\n  - [MacOS](#macos-1)\n- [Uninstalling `doctl`](#uninstalling-doctl)\n  - [Using a Package Manager](#using-a-package-manager)\n    - [MacOS Uninstall](#macos-uninstall)\n- [Examples](#examples)\n- [Tutorials](#tutorials)\n\n\n## Installing `doctl`\n\n### Using a Package Manager (Preferred)\n\nA package manager allows you to install and keep up with new `doctl` versions using only a few commands.\nOur community distributes `doctl` via a growing set of package managers in addition to the officially\nsupported set listed below; chances are good a solution exists for your platform.\n\n#### MacOS\n\nUse [Homebrew](https://brew.sh/) to install `doctl` on macOS:\n\n```\nbrew install doctl\n```\n\n`doctl` is also available via [MacPorts](https://www.macports.org/ports.php?by=name\u0026substr=doctl). Note that\nthe port is community maintained and may not be on the latest version.\n\n#### Snap supported OS\n\nUse [Snap](https://snapcraft.io/) on [Snap-supported](https://snapcraft.io/docs/core/install) systems to\ninstall `doctl`:\n\n```\nsudo snap install doctl\n```\n\n##### Use with `kubectl`\n\nUsing `kubectl` requires the `kube-config` personal-files connection for `doctl`:\n\n    sudo snap connect doctl:kube-config\n\n##### Using `doctl compute ssh`\n\nUsing `doctl compute ssh` requires the core [ssh-keys interface](https://docs.snapcraft.io/ssh-keys-interface):\n\n    sudo snap connect doctl:ssh-keys :ssh-keys\n\n##### Use with Docker\n\nUsing `doctl registry login` requires the `dot-docker` personal-files connection for `doctl`:\n\n    sudo snap connect doctl:dot-docker\n\nThis allows `doctl` to add DigitalOcean container registry credentials to your Docker configuration file.\n\n#### Arch Linux\n\n`doctl` is available in the official Arch Linux repository:\n\n    sudo pacman -S doctl\n\n#### Fedora\n\n`doctl` is available in the official Fedora repository:\n\n    sudo dnf install doctl\n\n#### Nix supported OS\n\nUsers of NixOS or other [supported\nplatforms](https://nixos.org/nixpkgs/) may install ```doctl``` from\n[Nixpkgs](https://nixos.org/nixos/packages.html#doctl). Please note\nthis package is also community maintained and may not be on the latest\nversion.\n\n### Docker Hub\n\nContainers for each release are available under the `digitalocean`\norganization on [Docker Hub](https://hub.docker.com/r/digitalocean/doctl).\nLinks to the containers are available in the GitHub releases.\n\n### Downloading a Release from GitHub\n\nVisit the [Releases\npage](https://github.com/digitalocean/doctl/releases) for the\n[`doctl` GitHub project](https://github.com/digitalocean/doctl), and find the\nappropriate archive for your operating system and architecture.\nDownload the archive from your browser or copy its URL and\nretrieve it to your home directory with `wget` or `curl`.\n\nFor example, with `wget`:\n\n```\ncd ~\nwget https://github.com/digitalocean/doctl/releases/download/v\u003cversion\u003e/doctl-\u003cversion\u003e-linux-amd64.tar.gz\n```\n\nOr with `curl`:\n\n```\ncd ~\ncurl -OL https://github.com/digitalocean/doctl/releases/download/v\u003cversion\u003e/doctl-\u003cversion\u003e-linux-amd64.tar.gz\n```\n\nExtract the binary:\n\n```\ntar xf ~/doctl-\u003cversion\u003e-linux-amd64.tar.gz\n```\n\nOr download and extract with this oneliner:\n```\ncurl -sL https://github.com/digitalocean/doctl/releases/download/v\u003cversion\u003e/doctl-\u003cversion\u003e-linux-amd64.tar.gz | tar -xzv\n```\n\nwhere `\u003cversion\u003e` is the full semantic version, e.g., `1.17.0`.\n\nOn Windows systems, you should be able to double-click the zip archive to extract the `doctl` executable.\n\nMove the `doctl` binary to somewhere in your path. For example, on GNU/Linux and OS X systems:\n\n```\nsudo mv ~/doctl /usr/local/bin\n```\n\nWindows users can follow [How to: Add Tool Locations to the PATH Environment Variable](https://msdn.microsoft.com/en-us/library/office/ee537574(v=office.14).aspx) in order to add `doctl` to their `PATH`.\n\n### Building with Docker\n\nIf you have\n[Docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04)\nconfigured, you can build a local Docker image using `doctl`'s\n[Dockerfile](https://github.com/digitalocean/doctl/blob/main/Dockerfile)\nand run `doctl` within a container.\n\n```\ndocker build --tag=doctl .\n```\n\nThen you can run it within a container.\n\n```\ndocker run --rm --interactive --tty --env=DIGITALOCEAN_ACCESS_TOKEN=\"your_DO_token\" doctl any_doctl_command\n```\n\n### Building the Development Version from Source\n\nIf you have a [Go environment](https://www.digitalocean.com/community/tutorials/how-to-install-go-1-6-on-ubuntu-16-04)\nconfigured, you can install the development version of `doctl` from\nthe command line.\n\n```\ngo install github.com/digitalocean/doctl/cmd/doctl@latest\n```\n\nWhile the development version is a good way to take a peek at\n`doctl`'s latest features before they get released, be aware that it\nmay have bugs. Officially released versions will generally be more\nstable.\n\n### Dependencies\n\n`doctl` uses Go modules with vendoring.\n\n## Authenticating with DigitalOcean\n\nTo use `doctl`, you need to authenticate with DigitalOcean by providing an access token, which can be created from the [Applications \u0026 API](https://cloud.digitalocean.com/account/api/tokens) section of the Control Panel. You can learn how to generate a token by following the [DigitalOcean API guide](https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2).\n\nDocker users will have to use the `DIGITALOCEAN_ACCESS_TOKEN` environmental variable to authenticate, as explained in the Installation section of this document.\n\nIf you're not using Docker to run `doctl`, authenticate with the `auth init` command.\n\n```\ndoctl auth init\n```\n\nYou will be prompted to enter the DigitalOcean access token that you generated in the DigitalOcean control panel.\n\n```\nDigitalOcean access token: your_DO_token\n```\n\nAfter entering your token, you will receive confirmation that the credentials were accepted. If the token doesn't validate, make sure you copied and pasted it correctly.\n\n```\nValidating token: OK\n```\n\nThis will create the necessary directory structure and configuration file to store your credentials.\n\n### Logging into multiple DigitalOcean accounts\n\n`doctl` allows you to log in to multiple DigitalOcean accounts at the same time and easily switch between them with the use of authentication contexts.\n\nBy default, a context named `default` is used. To create a new context, run `doctl auth init --context \u003cnew-context-name\u003e`. You may also pass the new context's name using the `DIGITALOCEAN_CONTEXT` [environment variable](#environment-variables). You will be prompted for your API access token which will be associated with the new context.\n\nTo use a non-default context, pass the context name to any `doctl` command. For example:\n\n```\ndoctl compute droplet list --context \u003cnew-context-name\u003e\n```\n\nTo set a new default context, run `doctl auth switch --context \u003cnew-context-name\u003e`. This command will save the current context to the config file and use it for all commands by default if a context is not specified.\n\nThe `--access-token` flag or `DIGITALOCEAN_ACCESS_TOKEN` [environment variable](#environment-variables) are acknowledged only if the `default` context is used. Otherwise, they will have no effect on what API access token is used. To temporarily override the access token if a different context is set as default, use `doctl --context default --access-token your_DO_token ...`.\n\n## Configuring Default Values\n\nThe `doctl` configuration file is used to store your API Access Token as well as the defaults for command flags. If you find yourself using certain flags frequently, you can change their default values to avoid typing them every time. This can be useful when, for example, you want to change the username or port used for SSH.\n\nOn OS X, `doctl` saves its configuration as `${HOME}/Library/Application Support/doctl/config.yaml`. The `${HOME}/Library/Application Support/doctl/` directory will be created once you run `doctl auth init`.\n\nOn Linux, `doctl` saves its configuration as `${XDG_CONFIG_HOME}/doctl/config.yaml` if the `${XDG_CONFIG_HOME}` environmental variable is set, or `~/.config/doctl/config.yaml` if it is not. On Windows, the config file location is `%APPDATA%\\doctl\\config.yaml`.\n\nThe configuration file is automatically created and populated with default properties when you authenticate with `doctl` for the first time. The typical format for a property is `category.command.sub-command.flag: value`. For example, the property for the `force` flag with tag deletion is `tag.delete.force`.\n\nTo change the default SSH user used when connecting to a Droplet with `doctl`, look for the `compute.ssh.ssh-user` property and change the value after the colon. In this example, we changed it to the username **sammy**.\n\n```\n. . .\ncompute.ssh.ssh-user: sammy\n. . .\n```\n\nSave and close the file. The next time you use `doctl`, the new default values you set will be in effect. In this example, that means that it will SSH as the **sammy** user (instead of the default **root** user) next time you log into a Droplet.\n\n### Environment variables\n\nIn addition to specifying configuration using `config.yaml` file or program arguments, it is also possible to override values just for the given session with environment variables:\n\n```\n# Use instead of --context argument\nDIGITALOCEAN_CONTEXT=my-context doctl auth list\n```\n\n```\n# Use instead of --access-token argument\nDIGITALOCEAN_ACCESS_TOKEN=my-do-token doctl\n```\n\n## Enabling Shell Auto-Completion\n\n`doctl` also has auto-completion support. It can be set up so that if you partially type a command and then press `TAB`, the rest of the command is automatically filled in. For example, if you type `doctl comp\u003cTAB\u003e\u003cTAB\u003e drop\u003cTAB\u003e\u003cTAB\u003e` with auto-completion enabled, you'll see `doctl compute droplet` appear on your command prompt.\n\n**Note:** Shell auto-completion is not available for Windows users.\n\nHow you enable auto-completion depends on which operating system you're using. If you installed `doctl` via Homebrew, auto-completion is activated automatically, though you may need to configure your local environment to enable it.\n\n`doctl` can generate an auto-completion script with the `doctl completion your_shell_here` command. Valid arguments for the shell are Bash (`bash`), ZSH (`zsh`), and fish (`fish`). By default, the script will be printed to the command line output.  For more usage examples for the `completion` command, use `doctl completion --help`.\n\n### Linux Auto Completion\n\nThe most common way to use the `completion` command is by adding a line to your local profile configuration. At the end of your `~/.profile` file, add this line:\n\n```\nsource \u003c(doctl completion your_shell_here)\n```\n\nIf you are using ZSH, add this line to your `~/.zshrc` file:\n\n```\ncompdef _doctl doctl\n```\n\nThen refresh your profile.\n\n```\nsource ~/.profile\n```\n\n### MacOS (bash)\n\nmacOS users will have to install the `bash-completion` framework to use the auto-completion feature.\n\n```\nbrew install bash-completion\n```\n\nAfter it's installed, load `bash_completion` by adding the following line to your `.profile` or `.bashrc` file.\n\n```\nsource $(brew --prefix)/etc/bash_completion\n```\n\nThen refresh your profile using the appropriate command for the bash configurations file.\n\n```\nsource ~/.profile\nsource ~/.bashrc\n```\n\n### MacOS (zsh)\n\nAdd the following line to your `~/.zshrc` file:\n\n```zsh\nautoload -U +X compinit; compinit\n```\n\nThen refresh your profile.\n\n## Uninstalling `doctl`\n\n### Using a Package Manager\n\n#### MacOS Uninstall\n\nUse [Homebrew](https://brew.sh/) to uninstall all current and previous versions of the `doctl` formula on macOS:\n\n```\nbrew uninstall -f doctl\n```\n\nTo completely remove the configuration, also remove the following directory:\n\n```\nrm -rf \"$HOME/Library/Application Support/doctl\"\n```\n\n\n## Examples\n\n`doctl` is able to interact with all of your DigitalOcean resources. Below are a few common usage examples. To learn more about the features available, see [the full tutorial on the DigitalOcean community site](https://www.digitalocean.com/community/tutorials/how-to-use-doctl-the-official-digitalocean-command-line-client).\n\n* List all Droplets on your account:\n```\ndoctl compute droplet list\n```\n* Create a Droplet:\n```\ndoctl compute droplet create \u003cname\u003e --region \u003cregion-slug\u003e --image \u003cimage-slug\u003e --size \u003csize-slug\u003e\n```\n* Assign a Floating IP to a Droplet:\n```\ndoctl compute floating-ip-action assign \u003cip-addr\u003e \u003cdroplet-id\u003e\n```\n* Create a new A record for an existing domain:\n```\ndoctl compute domain records create --record-type A --record-name www --record-data \u003cip-addr\u003e \u003cdomain-name\u003e\n```\n\n`doctl` also simplifies actions without an API endpoint. For instance, it allows you to SSH to your Droplet by name:\n```\ndoctl compute ssh \u003cdroplet-name\u003e\n```\n\nBy default, it assumes you are using the `root` user. If you want to SSH as a specific user, you can do that as well:\n```\ndoctl compute ssh \u003cuser\u003e@\u003cdroplet-name\u003e\n```\n\n## Tutorials\n\n* [How To Use Doctl, the Official DigitalOcean Command-Line Client](https://www.digitalocean.com/community/tutorials/how-to-use-doctl-the-official-digitalocean-command-line-client)\n* [How To Work with DigitalOcean Load Balancers Using Doctl](https://www.digitalocean.com/community/tutorials/how-to-work-with-digitalocean-load-balancers-using-doctl)\n* [How To Secure Web Server Infrastructure With DigitalOcean Cloud Firewalls Using Doctl](https://www.digitalocean.com/community/tutorials/how-to-secure-web-server-infrastructure-with-digitalocean-cloud-firewalls-using-doctl)\n* [How To Work with DigitalOcean Block Storage Using Doctl](https://www.digitalocean.com/community/tutorials/how-to-work-with-digitalocean-block-storage-using-doctl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fdoctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fdoctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fdoctl/lists"}