Output Formats
π Understanding ReasonKitβs output options for different use cases.
ReasonKit supports multiple output formats for human readability, machine processing, and documentation.
Available Formats
| Format | Flag | Best For |
|---|---|---|
| Pretty | --output pretty | Interactive use, terminals |
| JSON | --output json | Scripts, APIs, processing |
| Markdown | --output markdown | Documentation, reports |
Pretty Output (Default)
Human-readable output with colors and box drawing.
rk-core think "Should I learn Rust?" --output pretty
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BALANCED ANALYSIS β
β Time: 1 minute 32 seconds β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π‘ GIGATHINK: 10 Perspectives β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 1. CAREER: Rust is in high demand for systems/WebAssembly β
β 2. LEARNING: Steep initial curve, strong long-term value β
β 3. COMMUNITY: Excellent docs, helpful community β
β 4. ECOSYSTEM: Growing rapidly, some gaps remain β
β 5. ALTERNATIVES: Consider Go, Zig as alternatives β
β ... β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β‘ LASERLOGIC: Reasoning Check β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β FLAW 1: "Rust is hard" β
β β Difficulty is front-loaded, not total β
β β Initial investment pays off in fewer bugs later β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SYNTHESIS:
Yes, learn Rust if you're interested in systems programming,
WebAssembly, or want to level up your understanding of memory
management. The steep learning curve is worth the payoff.
CONFIDENCE: 85%
Disabling Colors
# Via flag
rk-core think "question" --no-color
# Via environment
export NO_COLOR=1
rk-core think "question"
# Via config
[output]
color = "never" # "auto", "always", "never"
JSON Output
Machine-readable structured output.
rk-core think "Should I learn Rust?" --output json
{
"id": "analysis_2025011512345",
"input": "Should I learn Rust?",
"profile": "balanced",
"timestamp": "2025-01-15T10:30:00Z",
"duration_ms": 92000,
"confidence": 0.85,
"synthesis": "Yes, learn Rust if you're interested in systems programming...",
"tools": [
{
"name": "GigaThink",
"alias": "gt",
"duration_ms": 25000,
"result": {
"perspectives": [
{
"id": 1,
"label": "CAREER",
"content": "Rust is in high demand for systems/WebAssembly"
},
{
"id": 2,
"label": "LEARNING",
"content": "Steep initial curve, strong long-term value"
}
],
"summary": "Multiple perspectives suggest learning Rust is worthwhile..."
}
},
{
"name": "LaserLogic",
"alias": "ll",
"duration_ms": 18000,
"result": {
"flaws": [
{
"claim": "Rust is hard",
"issue": "Difficulty is front-loaded, not total",
"correction": "Initial investment pays off in fewer bugs later"
}
],
"valid_points": [
"Memory safety without garbage collection is valuable",
"Systems programming skills transfer to other domains"
]
}
},
{
"name": "BedRock",
"alias": "br",
"duration_ms": 20000,
"result": {
"core_question": "Is learning Rust worth the time investment?",
"first_principles": [
"Programming languages are tools for solving problems",
"Learning investment should match problem frequency",
"Difficulty is an upfront cost, not ongoing"
],
"decomposition": "..."
}
},
{
"name": "ProofGuard",
"alias": "pg",
"duration_ms": 15000,
"result": {
"claims_verified": [
{
"claim": "Rust has excellent documentation",
"status": "verified",
"sources": ["rust-lang.org", "doc.rust-lang.org"]
}
],
"claims_unverified": [],
"contradictions": []
}
},
{
"name": "BrutalHonesty",
"alias": "bh",
"duration_ms": 14000,
"result": {
"harsh_truths": [
"You might be avoiding learning by asking this question",
"The 'best' language is one you actually use"
],
"blind_spots": [
"What problem are you trying to solve with Rust?"
]
}
}
],
"metadata": {
"provider": "anthropic",
"model": "claude-sonnet-4-20250514",
"tokens": {
"prompt": 1234,
"completion": 2345,
"total": 3579
},
"version": "0.1.0"
}
}
JSON Schema
Full JSON schema for validation:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["id", "input", "profile", "confidence", "synthesis", "tools"],
"properties": {
"id": { "type": "string" },
"input": { "type": "string" },
"profile": { "type": "string", "enum": ["quick", "balanced", "deep", "paranoid"] },
"timestamp": { "type": "string", "format": "date-time" },
"duration_ms": { "type": "integer" },
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
"synthesis": { "type": "string" },
"tools": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "alias", "result"],
"properties": {
"name": { "type": "string" },
"alias": { "type": "string" },
"duration_ms": { "type": "integer" },
"result": { "type": "object" }
}
}
},
"metadata": { "type": "object" }
}
}
Parsing JSON Output
jq examples:
# Get just the synthesis
rk-core think "question" -o json | jq -r '.synthesis'
# Get confidence as number
rk-core think "question" -o json | jq '.confidence'
# List all tool names
rk-core think "question" -o json | jq -r '.tools[].name'
# Get GigaThink perspectives
rk-core think "question" -o json | jq '.tools[] | select(.name == "GigaThink") | .result.perspectives'
# Filter to high-confidence analyses
rk-core think "question" -o json | jq 'select(.confidence > 0.8)'
Python:
import json
import subprocess
result = subprocess.run(
["rk-core", "think", "question", "-o", "json"],
capture_output=True,
text=True,
)
analysis = json.loads(result.stdout)
print(f"Confidence: {analysis['confidence']}")
print(f"Synthesis: {analysis['synthesis']}")
for tool in analysis['tools']:
print(f"- {tool['name']}: {tool['duration_ms']}ms")
Markdown Output
Documentation-ready format.
rk-core think "Should I learn Rust?" --output markdown
# Analysis: Should I learn Rust?
**Profile:** Balanced
**Time:** 1 minute 32 seconds
**Confidence:** 85%
---
## π‘ GigaThink: 10 Perspectives
| # | Perspective | Insight |
|---|-------------|---------|
| 1 | CAREER | Rust is in high demand for systems/WebAssembly |
| 2 | LEARNING | Steep initial curve, strong long-term value |
| 3 | COMMUNITY | Excellent docs, helpful community |
| 4 | ECOSYSTEM | Growing rapidly, some gaps remain |
| 5 | ALTERNATIVES | Consider Go, Zig as alternatives |
---
## β‘ LaserLogic: Reasoning Check
### Flaws Identified
1. **"Rust is hard"**
- Issue: Difficulty is front-loaded, not total
- Correction: Initial investment pays off in fewer bugs later
### Valid Points
- Memory safety without garbage collection is valuable
- Systems programming skills transfer to other domains
---
## πͺ¨ BedRock: First Principles
**Core Question:** Is learning Rust worth the time investment?
**First Principles:**
1. Programming languages are tools for solving problems
2. Learning investment should match problem frequency
3. Difficulty is an upfront cost, not ongoing
---
## π‘οΈ ProofGuard: Verification
| Claim | Status | Sources |
|-------|--------|---------|
| Rust has excellent documentation | β
Verified | rust-lang.org, doc.rust-lang.org |
---
## π₯ BrutalHonesty: Reality Check
**Harsh Truths:**
- You might be avoiding learning by asking this question
- The "best" language is one you actually use
**Blind Spots:**
- What problem are you trying to solve with Rust?
---
## Synthesis
Yes, learn Rust if you're interested in systems programming,
WebAssembly, or want to level up your understanding of memory
management. The steep learning curve is worth the payoff.
---
*Generated by ReasonKit v0.1.0 | Profile: balanced | Confidence: 85%*
Streaming Output
For real-time feedback during analysis:
rk-core think "question" --stream
Streaming outputs each toolβs result as it completes:
[GigaThink] Starting...
[GigaThink] Perspective 1: CAREER - Rust is in high demand...
[GigaThink] Perspective 2: LEARNING - Steep initial curve...
[GigaThink] Complete (25s)
[LaserLogic] Starting...
[LaserLogic] Analyzing logical structure...
[LaserLogic] Complete (18s)
[Synthesis] Combining results...
[Complete] Confidence: 85%
Quiet Mode
Suppress progress, show only final result:
# Just the synthesis
rk-core think "question" --quiet
# Combine with JSON for scripts
rk-core think "question" -q -o json | jq -r '.synthesis'
Output to File
# Redirect stdout
rk-core think "question" -o json > analysis.json
# Use --output-file flag
rk-core think "question" -o markdown --output-file report.md
# Multiple outputs
rk-core think "question" \
--output json --output-file analysis.json \
--output markdown --output-file report.md
Custom Templates
For advanced formatting, use templates:
rk-core think "question" --template my-template.hbs
Template example (Handlebars):
{{! my-template.hbs }}
# {{input}}
Analyzed with {{profile}} profile in {{duration_ms}}ms.
{{#each tools}}
## {{name}}
{{#each result.perspectives}}
- {{label}}: {{content}}
{{/each}}
{{/each}}
**Bottom Line:** {{synthesis}}