# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, scoop, winget 安装 doctl

查看 doctl 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:doctl
```

## 代理安全回答

doctl controls DigitalOcean resources from local credentials.

- **凭据访问:** Reads DigitalOcean tokens, kubeconfig, and environment credentials.
- **远程变更:** Can create, delete, and modify droplets, clusters, registries, and apps.
- **发布/制品风险:** Can deploy apps and push container registry artifacts.
- **推荐控制:** Gate mutating doctl commands and credential access.
- **代理使用指南:** Allow read-only listings; require approval for writes, deletes, deploys, and token changes.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install doctl
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install doctl
```

  证据: MacPorts ports tree: www/doctl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add doctl
```

  证据: Alpine Linux edge package indexes: doctl from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install doctl
```

  证据: Fedora Rawhide package metadata: doctl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#doctl
```

  证据: nixpkgs package indexes: pkgs/by-name/do/doctl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S doctl
```

  证据: Arch Linux sync databases: doctl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/doctl
```

  证据: Scoop official bucket manifest trees: bucket/doctl.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id DigitalOcean.Doctl -e
```

  证据: Windows Package Manager source index: DigitalOcean.Doctl from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:doctl
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/doctl>
- **版本:** 1.163.0
- **来源摘要:** Command-line tool for DigitalOcean
- **主页:** <https://docs.digitalocean.com/reference/doctl/>
- **仓库:** <https://github.com/digitalocean/doctl>
- **上游文档:** <https://docs.digitalocean.com/reference/doctl>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/digitalocean/doctl/archive/refs/tags/v1.163.0.tar.gz>
- **最后更新:** 2026-06-25T12:48:13Z
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- doctl (cli)
- doctl (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.163.0
- 管理器更新时间: 2026-06-25
- 本地数据: OK
- 上游仓库: https://github.com/digitalocean/doctl
- 检测到的最新版本: v1.163.0 (当前)
## 项目历史与用法

doctl is DigitalOcean's official command-line interface for the DigitalOcean API. It is the package-manager-facing form of DigitalOcean cloud automation: a Go binary that exposes account, compute, database, Kubernetes, registry, app, VPC, and billing workflows from a terminal.

### 项目历史

DigitalOcean created the public GitHub repository in May 2015. The README identifies doctl as a CLI for the DigitalOcean API and lists a broad command tree covering both early compute primitives and later platform services such as Kubernetes, Apps, databases, monitoring, registries, and VPCs.

### 采用历史

doctl has broad package-manager adoption. The official README documents Homebrew on macOS, Snap on supported Linux systems, Arch Linux, Fedora, Nix, Docker Hub images, GitHub release downloads, and source builds. Homebrew analytics show tens of thousands of annual installs, which is high for a provider-specific cloud CLI.

### 使用方式

Users authenticate with `doctl auth init`, which stores API tokens and defaults in a YAML config file. The CLI is used both interactively and in scripts, often with JSON output, shell completion, multiple authentication contexts, and resource commands such as droplet listing, domain record creation, registry login, and Kubernetes configuration.

### 为什么软件包爱好者会关心

doctl matters to package nerds because it is a well-maintained example of the cloud-provider CLI pattern: a single static Go program, packaged across Homebrew, Linux distros, Snap, Windows managers, Docker images, and GitHub releases, with API authentication and shell ergonomics as first-class concerns.

### 时间线

- 2015: Public GitHub repository created.
- 2010s: README documents install routes across Homebrew, Snap, distro packages, Docker Hub, and GitHub releases.
- 2026-06: v1.163.0 published with release assets for macOS, Linux, Windows, checksums, and source.

### Related projects

- doctl is tied to the DigitalOcean API and Control Panel. Its README also documents integration points with kubectl, Docker registry credentials, shell completion, and Docker Hub images.

### 来源

- <https://github.com/digitalocean/doctl>
- <https://raw.githubusercontent.com/digitalocean/doctl/main/README.md>
- <https://api.github.com/repos/digitalocean/doctl>
- <https://github.com/digitalocean/doctl/releases/tag/v1.163.0>
- <https://formulae.brew.sh/api/formula/doctl.json>


## 安全说明

没有找到 doctl 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- macOS: ~/Library/Application Support/doctl/config.yaml
- Unix: $XDG_CONFIG_HOME/doctl/config.yaml, ~/.config/doctl/config.yaml

## Credential files

- macOS: ~/Library/Application Support/doctl/config.yaml
- Unix: $XDG_CONFIG_HOME/doctl/config.yaml, ~/.config/doctl/config.yaml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** doctl
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - doctl: normalized package name match | nixpkgs package indexes: pkgs/by-name/do/doctl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - doctl - 1.160.1-r0: normalized package name match | Alpine Linux edge package indexes: doctl from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Official command line interface for the DigitalOcean API | https://github.com/digitalocean/doctl
- apk - doctl-bash-completion - 1.160.1-r0: normalized package name match | Alpine Linux edge package indexes: doctl-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for doctl | https://github.com/digitalocean/doctl
- apk - doctl-fish-completion - 1.160.1-r0: normalized package name match | Alpine Linux edge package indexes: doctl-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for doctl | https://github.com/digitalocean/doctl
- apk - doctl-zsh-completion - 1.160.1-r0: normalized package name match | Alpine Linux edge package indexes: doctl-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for doctl | https://github.com/digitalocean/doctl
- dnf - doctl - 1.160.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: doctl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | The official command line interface for the DigitalOcean API | https://github.com/digitalocean/doctl
- pacman - doctl - 1.159.0-1: normalized package name match | Arch Linux sync databases: doctl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The official command line interface for the DigitalOcean API | https://github.com/digitalocean/doctl
- MacPorts - doctl: normalized package name match | MacPorts ports tree: www/doctl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/doctl: normalized package name match | Scoop official bucket manifest trees: bucket/doctl.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - DigitalOcean.Doctl: normalized package name match | Windows Package Manager source index: DigitalOcean.Doctl from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Cloud CLI packages](https://www.automicvault.com/zh-hans/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Documentation packages](https://www.automicvault.com/zh-hans/pkg/documentation-tools/) - Matched documentation, manual, or publishing metadata.
- [go](https://www.automicvault.com/zh-hans/pkg/brew/go/) - Build dependency declared by Homebrew.
- [hcloud](https://www.automicvault.com/zh-hans/pkg/brew/hcloud/) - Shares av.db curated category or tags: api-client, cli, cloud, cloud-infrastructure.
- [osc-cli](https://www.automicvault.com/zh-hans/pkg/brew/osc-cli/) - Shares av.db curated category or tags: api-client, cli, cloud, cloud-infrastructure.
- [triton](https://www.automicvault.com/zh-hans/pkg/brew/triton/) - Shares av.db curated category or tags: cli, cloud-infrastructure, cloud-management.
- [ucloud](https://www.automicvault.com/zh-hans/pkg/brew/ucloud/) - Shares av.db curated category or tags: api-client, cli, cloud, cloud-infrastructure, cloud-management.
- [aiven-client](https://www.automicvault.com/zh-hans/pkg/brew/aiven-client/) - Shares av.db curated category or tags: cli, cloud, cloud-infrastructure.
- [aliyun-cli](https://www.automicvault.com/zh-hans/pkg/brew/aliyun-cli/) - Shares av.db curated category or tags: cli, cloud, cloud-infrastructure.
- [azion](https://www.automicvault.com/zh-hans/pkg/brew/azion/) - Shares av.db curated category or tags: cli, cloud, cloud-infrastructure.
- [cloudmonkey](https://www.automicvault.com/zh-hans/pkg/brew/cloudmonkey/) - Shares av.db curated category or tags: cli, cloud, cloud-infrastructure.

## Combined YAML source

View the package source record on GitHub. [combined/doctl.yml](https://github.com/automic-vault/db/blob/main/combined/doctl.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
