# 使用 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
- **版本:** 0.54.1
- **来源摘要:** Data wrangler with jq-like query language
- **主页:** <https://sq.io>
- **仓库:** <https://github.com/neilotoole/sq>
- **最后更新:** 2026-07-26T04:03:44+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sq (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.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。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

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

## Credential files

- Unix: $XDG_CONFIG_HOME/sq/sq.yml, ~/.config/sq/sq.yml
## 其他软件包管理器记录

- 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


## 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
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
