grokkit/docs/user-guide/query.md
Greg Gauthier cd47686679
All checks were successful
CI / Test (pull_request) Successful in 42s
CI / Lint (pull_request) Successful in 27s
CI / Build (pull_request) Successful in 23s
docs: refactor README and docs structure for better organization
- Simplified README.md by moving detailed command docs, workflows, and development info to dedicated user-guide/ and developer-guide/ directories.
- Created index.md files for both guides to improve navigation.
- Extracted individual command guides (e.g., chat.md, edit.md) into user-guide/ for focused, maintainable documentation.
- Moved architecture, configuration, and troubleshooting to developer-guide/.
- Updated README links to point to the new docs structure.
2026-03-07 22:42:43 +00:00

1.2 KiB

🤖 Query Guide

The query command is a one-shot, non-interactive interface for asking Grok programming-focused questions. It's ideal for quick inquiries where you don't need a full chat history.

Why use Query?

  • Fast: Get a direct answer to a single question.
  • Minimalist: No chat history or context overhead.
  • Focused: Perfect for "How do I do X in Go?" or "Explain this regex."

Usage

# Basic usage
grokkit query "How do I sort a slice of structs by a field in Go?"

# Longer, more detailed answer
grokkit query --wordy "Explain how Go's context package works with cancellation"

Features

  • Default mode is concise, factual, and actionable.
  • --wordy flag gives longer, more explanatory answers.
  • Fast model used by default for speed (non-reasoning).
  • No persistent history or interactive chat UI.

Options

Flag Description
--wordy Give a longer, more detailed answer
--model, -m Override the default model (e.g., grok-4)

When to use Query vs. Chat

  • Use Query for simple, independent questions that don't require follow-up.
  • Use Chat when you need to have a back-and-forth conversation or want Grok to remember previous context.