# 使用 Homebrew, MacPorts, pacman, Nix, winget 安装 googleworkspace-cli

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

## 安装

```sh
sudo av install brew:googleworkspace-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install googleworkspace-cli
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install googleworkspace-cli
```

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

### Linux

- pacman (92%):

```sh
sudo pacman -S googleworkspace-cli
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#gws
```

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

### Windows

- winget (92%):

```sh
winget install --id Google.WorkspaceCLI -e
```

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

## 软件包事实

- **软件包键:** brew:googleworkspace-cli
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/googleworkspace-cli>
- **版本:** 0.22.5
- **来源摘要:** CLI for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more
- **主页:** <https://developers.google.com/workspace>
- **仓库:** <https://github.com/googleworkspace/cli>
- **上游文档:** <https://developers.google.com/workspace>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/googleworkspace/cli/archive/refs/tags/v0.22.5.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gws (cli)
- gws (别名)

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.22.5
- 本地数据: OK
- 上游仓库: https://github.com/googleworkspace/cli
- 检测到的最新版本: v0.22.5 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

Google Workspace CLI, invoked as `gws`, is a command-line tool for Google Workspace APIs such as Drive, Gmail, Calendar, Sheets, Docs, Chat, and Admin. Its README describes a dynamic command surface built from Google's Discovery Service, structured JSON output, and included agent skills.

### 项目历史

The GitHub repository was created in March 2026 and began with rapid 0.x releases. The README explicitly says the project is not an officially supported Google product while placing it in the Google Workspace developer ecosystem.

The tool is written for both human CLI users and AI-agent workflows. Its installation paths include prebuilt GitHub release binaries, npm distribution as `@googleworkspace/cli`, source builds with Cargo, Nix, and Homebrew.

### 采用历史

Because the project is young, its adoption history is mainly packaging and workflow positioning rather than a long ecosystem record. The official README documents Homebrew installation, npm installation, a Nix flake, Gemini CLI extension setup, and Skills installation from the repository.

### 使用方式

Typical use starts with `gws auth setup` or `gws auth login`, then commands such as listing Drive files, creating Sheets resources, sending Chat messages, or inspecting generated schemas. The README documents OAuth credential files, exported credentials for headless use, pre-obtained access tokens, and environment-variable precedence.

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

For package nerds, gws is interesting because it packages a broad API family as a generated CLI rather than hand-written subcommands. It also reflects a 2026-era packaging pattern: one binary, npm bootstrap, Homebrew formula, Nix flake, structured JSON output, and agent skill bundles.

### 时间线

- 2026: GitHub repository created under googleworkspace/cli.
- 2026: 0.1.2 published on GitHub Releases in March.
- 2026: 0.22.5 published on GitHub Releases in March after a rapid 0.x release series.
- 2026: Homebrew formula and npm installation documented in the README.

### Related projects

- The README relates gws to Google Workspace APIs, Google's Discovery Service, Google Cloud OAuth setup, the gcloud CLI, Gemini CLI extensions, and repository-provided agent skills.

### 来源

- <https://api.github.com/repos/googleworkspace/cli>
- <https://developers.google.com/workspace>
- <https://github.com/googleworkspace/cli>
- <https://github.com/googleworkspace/cli#readme>
- <https://github.com/googleworkspace/cli/releases>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## 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.


## Credential files

- Unix: ~/.config/gws/client_secret.json, ~/.config/gws/credentials.json, $GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** googleworkspace-cli
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** gws
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- pacman - googleworkspace-cli - 0.22.5-1: normalized package name match | Arch Linux sync databases: googleworkspace-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more | https://developers.google.com/workspace
- MacPorts - googleworkspace-cli: normalized package name match | MacPorts ports tree: office/googleworkspace-cli/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- MacPorts - gws: installed executable or alias match | MacPorts ports tree: devel/gws/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Nix - gws: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/gw/gws/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- winget - Google.WorkspaceCLI: installed executable or alias match | Windows Package Manager source index: Google.WorkspaceCLI from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Documentation packages](https://pkg.so/zh-hans/documentation-tools/) - Matched documentation, manual, or publishing metadata.
- [Productivity CLI packages](https://pkg.so/zh-hans/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [gogcli](https://pkg.so/zh-hans/brew/gogcli/) - Shares pkgdb curated category or tags: automation, cli, gmail, google-workspace, productivity.
- [gyb](https://pkg.so/zh-hans/brew/gyb/) - Shares pkgdb curated category or tags: cli, gmail, google-workspace, productivity.
- [gmailctl](https://pkg.so/zh-hans/brew/gmailctl/) - Shares pkgdb curated category or tags: automation, cli, gmail, productivity.
- [tmuxinator](https://pkg.so/zh-hans/brew/tmuxinator/) - Shares pkgdb curated category or tags: automation, cli, productivity.
- [dockutil](https://pkg.so/zh-hans/brew/dockutil/) - Shares pkgdb curated category or tags: automation, cli, productivity.
- [gdrive](https://pkg.so/zh-hans/brew/gdrive/) - Shares pkgdb curated category or tags: cli, google-drive, productivity.
- [flexget](https://pkg.so/zh-hans/brew/flexget/) - Shares pkgdb curated category or tags: automation, cli, productivity.
- [tuios](https://pkg.so/zh-hans/brew/tuios/) - Shares pkgdb curated category or tags: automation, cli, productivity.
- [gws-with-audit-log](https://pkg.so/zh-hans/npm/gws-with-audit-log/) - Executable or command metadata overlaps with this package. Shared terms: cli, drive, gmail, google, google-workspace.

## Combined YAML source

View the package source record on GitHub. [combined/googleworkspace-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/googleworkspace-cli.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
