# 🤖 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 ```bash # 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.