# 使用 Homebrew, apk, apt, MacPorts, Nix, scoop 安装 sq

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

## 安装

```sh
sudo av install brew:sq
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sq
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install sq
```

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

### Linux

- apk (92%):

```sh
sudo apk add sq
```

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

- Debian apt (92%):

```sh
sudo apt install sq
```

  证据: Debian stable package indexes: sq from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#sq
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/sq
```

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

## 软件包事实

- **软件包键:** brew:sq
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/sq>
- **版本:** 0.54.1
- **来源摘要:** Data wrangler with jq-like query language
- **主页:** <https://sq.io>
- **仓库:** <https://github.com/neilotoole/sq>
- **上游文档:** <https://sq.io>
- **许可证:** MIT
- **源码归档:** <https://github.com/neilotoole/sq/archive/refs/tags/v0.54.1.tar.gz>
- **最后更新:** 2026-07-26T04:03:44+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- sq (cli)
- sq (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.54.1
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/neilotoole/sq
- 检测到的最新版本: v0.54.1 (当前)
## 项目历史与用法

sq is a Go command-line data wrangler that gives jq-style access to SQL databases and structured document formats such as CSV, Excel, JSON, and XML.

### 项目历史

The GitHub repository was created in 2016. The official README describes sq as the 'lovechild of SQL+jq', able to run jq-like queries or database-native SQL and to join across heterogeneous sources.

### 采用历史

sq is packaged across several package-manager ecosystems, including Homebrew, Debian, Ubuntu, Alpine, MacPorts, Nix, and Scoop according to the supplied package metadata. Its GitHub releases have continued through v0.54.1 in 2026, and the project maintains a dedicated documentation site at sq.io.

### 使用方式

Users add data sources with `sq add`, query them with jq-like syntax, inspect metadata, diff tables or databases, copy data between sources, and emit output formats such as JSON, CSV, Excel, HTML, Markdown, and XML. Source definitions live in `sq.yml`, with optional keyring, environment, file, or 1Password placeholders for secrets.

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

sq is interesting to package-manager users because it compresses a stack of ad hoc data-inspection tools into one portable CLI. It appeals to people who want jq-like interaction but need to cross the boundary between files, SQL engines, spreadsheets, and exports without setting up a full ETL system.

### 时间线

- 2016: GitHub repository created.
- 2020: v0.14.5 published on GitHub releases.
- 2026: v0.54.1 published on GitHub releases.

### Related projects

- sq is explicitly inspired by jq and SQL. Its driver set connects it to PostgreSQL, MySQL, SQL Server, SQLite, DuckDB, ClickHouse, Oracle, CSV, JSON, Excel, and other tabular or document sources.

### 来源

- GitHub API repository and releases metadata for neilotoole/sq, accessed 2026-07-02
- <https://github.com/neilotoole/sq>
- <https://sq.io/docs/cmd/add/>
- <https://sq.io/docs/config/>
- <https://sq.io/docs/secrets/>
- input source_facts.package-manager


## 安全说明

没有找到 sq 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 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

- Unix: $XDG_CONFIG_HOME/sq/sq.yml, ~/.config/sq/sq.yml

## Credential files

- Unix: $XDG_CONFIG_HOME/sq/sq.yml, ~/.config/sq/sq.yml
## 源数据库详情

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

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

- Debian apt - sq - 1.3.1-2+b2: normalized package name match | Debian stable package indexes: sq from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenPGP command-line tool from Sequoia | https://sequoia-pgp.org/
- Nix - sq: normalized package name match | nixpkgs package indexes: pkgs/by-name/sq/sq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - sq - 0.33.0-3: normalized package name match | Ubuntu 24.04 LTS package indexes: sq from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenPGP command-line tool from Sequoia | https://sequoia-pgp.org/
- apk - sq - 0.48.11-r5: normalized package name match | Alpine Linux edge package indexes: sq from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CLI tool that provides jq-style access to structured data sources | https://sq.io/
- apk - sq-bash-completion - 0.48.11-r5: normalized package name match | Alpine Linux edge package indexes: sq-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for sq | https://sq.io/
- apk - sq-doc - 0.48.11-r5: normalized package name match | Alpine Linux edge package indexes: sq-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CLI tool that provides jq-style access to structured data sources (documentation) | https://sq.io/
- apk - sq-fish-completion - 0.48.11-r5: normalized package name match | Alpine Linux edge package indexes: sq-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for sq | https://sq.io/
- apk - sq-zsh-completion - 0.48.11-r5: normalized package name match | Alpine Linux edge package indexes: sq-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for sq | https://sq.io/
- MacPorts - sq: normalized package name match | MacPorts ports tree: databases/sq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/sq: normalized package name match | Scoop official bucket manifest trees: bucket/sq.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [csvq](https://pkg.so/zh-hans/brew/csvq/) - Shares pkgdb curated category or tags: cli, data, query-language, sql.
- [prqlc](https://pkg.so/zh-hans/brew/prqlc/) - Shares pkgdb curated category or tags: cli, data, query-language, sql.
- [sqlite](https://pkg.so/zh-hans/brew/sqlite/) - Shares pkgdb curated category or tags: cli, data, sql.
- [mysql](https://pkg.so/zh-hans/brew/mysql/) - Shares pkgdb curated category or tags: cli, data, sql.
- [postgresql@14](https://pkg.so/zh-hans/brew/postgresql-14/) - Shares pkgdb curated category or tags: cli, data, sql.
- [postgresql@16](https://pkg.so/zh-hans/brew/postgresql-16/) - Shares pkgdb curated category or tags: cli, data, sql.
- [postgresql@17](https://pkg.so/zh-hans/brew/postgresql-17/) - Shares pkgdb curated category or tags: cli, data, sql.
- [postgresql@18](https://pkg.so/zh-hans/brew/postgresql-18/) - Shares pkgdb curated category or tags: cli, data, sql.
- [cayley](https://pkg.so/zh-hans/brew/cayley/) - Local package facts share a topical domain. Shared terms: cli, data, language, query, query-language.

## Combined YAML source

View the package source record on GitHub. [combined/sq.yml](https://github.com/mxcl/pkgdb/blob/main/combined/sq.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
