# 使用 Homebrew, Nix, dnf, MacPorts, zypper 安装 graphqurl

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

## 安装

```sh
sudo av install brew:graphqurl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install graphqurl
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gq
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#graphqurl
```

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

- dnf (92%):

```sh
sudo dnf install gq
```

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

- zypper (92%):

```sh
sudo zypper install gq
```

  证据: openSUSE Tumbleweed package metadata: gq from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:graphqurl
- **软件包管理器:** Homebrew
- **版本:** 2.0.0
- **来源摘要:** Curl for GraphQL with autocomplete, subscriptions and GraphiQL
- **主页:** <https://github.com/hasura/graphqurl>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gq (别名)
- graphqurl (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.0.0
## 项目历史与用法

graphqurl is Hasura's curl-like CLI and JavaScript client for GraphQL. It provides the `gq` and `graphqurl` executables for sending queries, using headers and variables, running autocomplete from introspection, executing subscriptions, and exporting schemas.

### 项目历史

Hasura built graphqurl to make GraphQL endpoint interaction feel closer to curl while preserving GraphQL-specific affordances such as introspection, query autocomplete, subscriptions, and schema export.

The v1.0 announcement emphasized reducing bundle size by moving away from Apollo Client for basic query and subscription work, positioning graphqurl as a lighter tool for users who wanted GraphQL requests without broader client-side caching machinery.

### 采用历史

graphqurl's adoption is closely tied to Hasura users and to developers who need a terminal-friendly way to inspect or exercise arbitrary GraphQL endpoints. It is packaged by Homebrew and several other package managers under names such as `graphqurl` or `gq`.

Its README and npm package highlight two surfaces: a CLI for shell workflows and a Node/browser library through `createClient`. That dual identity made it useful both as a quick manual testing tool and as a small dependency for scripts.

### 使用方式

The common CLI pattern is `gq ENDPOINT -H 'Authorization: Bearer <token>' -q 'query { ... }'`. Users can also omit the query and use TAB-driven autocomplete based on schema introspection.

For schema work, `gq <endpoint> --introspect` can emit GraphQL SDL or JSON. For realtime APIs, graphqurl can execute subscriptions and stream responses to stdout. Earlier documented workflows also exposed a local GraphiQL UI; the GitHub README notes that GraphiQL support was removed from version 2.0.0 onward.

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

graphqurl is the GraphQL answer to the perennial packaging question: why do I need a whole SDK to send one API request? It packages the 80 percent terminal workflow into a single executable while still understanding GraphQL concepts curl cannot infer.

It is also interesting because package managers expose both the long package name and the short `gq` executable, making it show up in CLI namespace conversations alongside generic HTTP clients, GraphQL IDEs, and API-specific CLIs.

### 时间线

- Initial package era: graphqurl appeared as a Hasura-maintained CLI and JavaScript client for GraphQL endpoint access.
- v1.0: Hasura announced a lighter implementation and promoted CLI queries, local GraphiQL, subscriptions, browser/Node use, and schema export.
- v2.0.0: The project removed GraphiQL UI support, with the README directing users to v1.0.3 for that feature.

### Related projects

- Hasura GraphQL Engine is the ecosystem project most closely associated with graphqurl.
- curl is the conceptual model for graphqurl's terminal user experience.
- GraphiQL is an adjacent UI workflow that graphqurl supported in earlier versions.
- GraphQL Inspector and GraphQL CLI sit nearby as schema-management tools rather than request clients.

### 来源

- <https://github.com/hasura/graphqurl>
- <https://github.com/hasura/graphqurl#readme>
- <https://github.com/hasura/graphqurl/releases>
- <https://hasura.io/blog/graphqurl-v1-curl-for-graphql>
- <https://www.npmjs.com/package/graphqurl>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - graphqurl: normalized package name match | nixpkgs package indexes: pkgs/by-name/gr/graphqurl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - gq: installed executable or alias match | MacPorts ports tree: net/gq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- dnf - gq - 1.3.4-58.fc45: installed executable or alias match | Fedora Rawhide package metadata: gq from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Graphical LDAP directory browser and editor | http://sourceforge.net/projects/gqclient/
- zypper - gq - 1.2.3-94.7: installed executable or alias match | openSUSE Tumbleweed package metadata: gq from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | An LDAP Client for GTK | http://gq-project.org/


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
