RepositoryGo
kiki-ki

kiki-ki/go-qo

qo is an interactive TUI to query JSON and CSV using SQL.

406stars
8forks
6issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: jq

#1 Repository of the week

1
TINIX TRENDING·Topic: query

#1 Repository of the week

2
TINIX TRENDING·Topic: filter

#2 Repository of the week

🥢 qo

Terminal Trove Tool of The Week

GitHub release CI Go Report License

qo [cue-oh] noun.

  1. A minimalist TUI for querying JSON, CSV using SQL.
  2. "query" what you need, and get it "out" to the pipeline.
qo demo: Querying JSON data with SQL in the TUI

Why qo?

  • Muscle Memory: Use the SQL syntax you've known for years.
  • Pipeline Native: Reads from stdin, writes to stdout.
  • Interactive: Don't guess the query. See the result, then hit Enter.

Install

macOS and Linux (amd64/arm64) are supported.

Homebrew (Package)

brew install kiki-ki/tap/qo

Shell (Binary)

curl -sfL https://raw.githubusercontent.com/kiki-ki/go-qo/main/install.sh | sh

Git (Source)

# The binary will be located at ./bin/qo
git clone --depth 1 https://github.com/kiki-ki/go-qo.git && cd go-qo && make build

Usage

qo reads from both file arguments and standard input (stdin).

# Interactive mode (Open TUI)
cat x.json | qo
qo x.json y.json

# Non-interactive mode (Direct output)
cat x.json | qo -q "SELECT * FROM tmp WHERE id > 100"
qo -q "SELECT * FROM x JOIN y ON x.id = y.x_id" x.json y.json"

Pipe-Friendly TUI

TUI mode works seamlessly with pipes. Explore data interactively, then pass the result to other tools.

# Fetch JSON API > Filter interactively with qo > Format with jq
curl -s https://api.github.com/repos/kiki-ki/go-qo/commits | qo | jq '.[].sha'

# Explore > Filter > Compress
cat large.json | qo | gzip > filtered.json.gz

Query Logs & Aggregate

Use SQL to analyze structured data.

# Filter error logs
cat app.log | qo -q "SELECT timestamp, message FROM tmp WHERE level = 'error'"

# Aggregate sales by region
qo -i csv sales.csv -o csv -q "SELECT region, SUM(amount) FROM sales GROUP BY region"

Convert Formats

Transform between various formats.

qo -o csv data.json -q "SELECT id, name FROM data"             # JSON → CSV
qo -i csv -o json users.csv -q "SELECT * FROM users"           # CSV → JSON
qo -o jsonl data.json -q "SELECT * FROM data"                  # JSON → JSON Lines
qo -i csv --no-header raw.csv -q "SELECT col1, col2 FROM raw"  # Headerless CSV

Options

FlagShortDefaultDescription
--input-ijsonInput format: json, csv, tsv, psv ("json" includes "jsonl")
--output-ojsonOutput format: json, jsonl, csv, tsv, psv, table
--query-qRun SQL query directly (Skip TUI)
--no-headerTreat first row as data, not header (CSV/TSV/PSV only)

UI Controls

KeyModeAction
TabALLSwitch between Query/Table mode
EscALLOutput & Quit
Ctrl+CALLQuit (Output nothing)
EnterQUERYExecute query
↑ ↓ / j kTABLEScroll rows
← → / h lTABLEScroll columns

SQL Dialect

qo uses SQLite as its SQL engine. All queries follow SQLite syntax and support its built-in functions.

Querying Nested JSON

Use SQLite's json_extract() function to access nested fields in JSON data.

# Sample data: [{"user": {"name": "Alice", "age": 30}}, {"user": {"name": "Bob", "age": 25}}]

# Extract nested fields
qo data.json -q "SELECT json_extract(user, '$.name') AS name FROM data"
# Filter by nested value
qo data.json -q "SELECT * FROM data WHERE json_extract(user, '$.age') > 25"

For more details, see SQLite JSON Functions.

Built With

CategoryLibrary
TUI FrameworkBubble Tea
StylingLip Gloss
CLICobra
SQL Enginemodernc.org/sqlite (Pure Go, CGO-free)

License

MIT

Similar Projects

Discover other similar projects and AI models.

RepositoryGo
charmbracelet/bubbletea

A powerful little TUI framework 🏗

46.0k
Dec 2, 2026
RepositoryGo
avelino/awesome-go

A curated list of awesome Go frameworks, libraries and software

197.2k
Dec 2, 2026
RepositoryGo
ollama/ollama

Get up and running with Inkling, Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

188.9k
Dec 2, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryGo
golang/go

The Go programming language

140.0k
Dec 1, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryTypeScript
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

212.9k
Dec 2, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

212.4k
Dec 2, 2026
RepositoryShell
ohmyzsh/ohmyzsh

🙃 A delightful, community-driven framework for managing your zsh configuration. Built by 2,600+ contributors, with hundreds of plugins (git, rails, laravel, node, python, docker, kubectl, aws, and more), themes to spice up your terminal, and automatic updates to keep your command line feeling like home.

191.0k
Nov 29, 2026