Skip to content
Wallace Ricardo edited this page Jun 6, 2026 · 7 revisions

gqlcli

A command-line client for any GraphQL API. Discover operations, run queries and mutations, and explore schemas — all from the terminal.

go install github.com/wricardo/gqlcli/cmd/gqlcli@latest

What you can do

# See what queries are available
gqlcli queries

# Run a query
gqlcli query '{ users { id name email } }'

# Run a mutation
gqlcli mutation \
  --mutation 'mutation CreateUser($input: CreateUserInput!) { createUser(input: $input) { id } }' \
  --input '{"name":"Alice","email":"alice@example.com"}'

# Stream subscription events
gqlcli subscribe 'subscription { messageAdded { id text } }'

# Explore a type
gqlcli describe User --args

# Point at any server
gqlcli queries --url https://api.example.com/graphql

Documentation

Using the CLI

  • Installation — Install the binary or add the library to your project
  • CLI-Usage — Queries, mutations, schema exploration, and common patterns
  • Command-Reference — Complete flag reference for every command
  • Configuration.gqlcli.json environments, auth headers, URL precedence
  • Authentication — HTTP login/logout flows backed by .gqlcli.json environments
  • Output-Formatstoon, json, table, llm, compact
  • Batch-Operations — Execute multiple operations in one request with jq filtering
  • Subscriptions — Stream GraphQL subscription events over WebSocket
  • Claude-Integration — Install the gqlcli skill for Claude Code
  • FAQ — Common questions and answers
  • Glossary — Domain terms, abbreviations, and concepts

Using gqlcli as a Go library

If you're building a Go CLI tool and want to use gqlcli as a library:

Clone this wiki locally