Repository navigation
Output Formats
Most result-printing commands (such as query, mutation, queries, mutations, and types) accept -f / --format to control how results are printed. The default format varies by command but is usually toon.
Token-optimized output. Strips noise from the response to reduce character count by 40–60%. Designed for piping to LLMs or storing in context windows.
gqlcli queries -f toonFull JSON output with indentation. Useful for reading or debugging.
gqlcli query --query "{ users { id name } }" -f json-prettyCompact JSON, no indentation.
gqlcli query --query "{ users { id name } }" -f jsonMinimal JSON — the same fields as the regular JSON response, but without indentation. Useful when you want a small payload but still keep the full structure. If you also want to strip null values from the response envelope, use json/json-pretty, which apply a light cleanup.
gqlcli types -f compactAligned columns, human-readable in the terminal.
gqlcli queries -f table
gqlcli mutations --filter user -f tableMarkdown-formatted output intended for feeding into AI systems.
gqlcli queries --desc -f llm
gqlcli mutations --desc --args -f llm| Use Case | Recommended Format |
|---|---|
| Terminal reading | table |
| Script/pipeline |
json or compact
|
| LLM context |
toon or llm
|
| Debugging | json-pretty |
| File storage | json |
Any command can write its output to a file with --output:
gqlcli types -f json --output schema-types.json
gqlcli queries --desc -f llm --output queries.mdGiven a queries response with a users field:
toon:
users: [User]
getUser(id: ID!): User
table:
NAME TYPE DESCRIPTION
users [User] List all users
getUser User Get user by ID
json-pretty:
{
"data": {
"users": {
"name": "users",
"type": "[User]",
"description": "List all users"
}
}
}