{"id":33863881,"url":"https://github.com/kiki-ki/go-qo","last_synced_at":"2026-02-14T05:16:56.984Z","repository":{"id":327218029,"uuid":"1103919843","full_name":"kiki-ki/go-qo","owner":"kiki-ki","description":"qo is an interactive minimalist TUI to query JSON, CSV, and TSV using SQL.","archived":false,"fork":false,"pushed_at":"2025-12-20T09:00:07.000Z","size":2571,"stargazers_count":192,"open_issues_count":2,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T07:15:56.570Z","etag":null,"topics":["bubbletea","cli","csv","filter","go","golang","interactive","jq","json","qo","query","sql","sqlite3","tsv","tui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiki-ki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-25T14:06:56.000Z","updated_at":"2025-12-22T06:38:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kiki-ki/go-qo","commit_stats":null,"previous_names":["kiki-ki/go-qo"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/kiki-ki/go-qo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiki-ki%2Fgo-qo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiki-ki%2Fgo-qo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiki-ki%2Fgo-qo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiki-ki%2Fgo-qo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiki-ki","download_url":"https://codeload.github.com/kiki-ki/go-qo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiki-ki%2Fgo-qo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28382378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T10:34:27.190Z","status":"ssl_error","status_checked_at":"2026-01-13T10:34:26.289Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bubbletea","cli","csv","filter","go","golang","interactive","jq","json","qo","query","sql","sqlite3","tsv","tui"],"created_at":"2025-12-09T12:00:34.064Z","updated_at":"2026-02-14T05:16:56.977Z","avatar_url":"https://github.com/kiki-ki.png","language":"Go","funding_links":[],"categories":["Table of Contents"],"sub_categories":[],"readme":"# 🥢 qo\n\n\u003ca href=\"https://terminaltrove.com/qo/\"\u003e\n  \u003cimg src=\"https://cdn.terminaltrove.com/media/badges/tool_of_the_week/svg/terminal_trove_tool_of_the_week_green_on_black_bg.svg\" height=\"40\" alt=\"Terminal Trove Tool of The Week\"\u003e\n\u003c/a\u003e\n\n[![GitHub release](https://img.shields.io/github/v/release/kiki-ki/go-qo)](https://github.com/kiki-ki/go-qo/releases)\n[![CI](https://github.com/kiki-ki/go-qo/actions/workflows/ci.yml/badge.svg)](https://github.com/kiki-ki/go-qo/actions/workflows/ci.yml)\n[![Go Report](https://goreportcard.com/badge/github.com/kiki-ki/go-qo)](https://goreportcard.com/report/github.com/kiki-ki/go-qo)\n[![License](https://img.shields.io/github/license/kiki-ki/go-qo)](https://github.com/kiki-ki/go-qo/blob/main/LICENSE)\n\n\u003e qo [cue-oh] *noun.*\n\n1. A minimalist TUI for querying JSON, CSV using SQL.\n2. **\"query\"** what you need, and get it **\"out\"** to the pipeline.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"doc/demo/demo.gif\" width=\"640\" alt=\"qo demo: Querying JSON data with SQL in the TUI\"\u003e\n\u003c/div\u003e\n\n## Why qo?\n\n* **Muscle Memory**: Use the SQL syntax you've known for years.\n* **Pipeline Native**: Reads from `stdin`, writes to `stdout`.\n* **Interactive**: Don't guess the query. See the result, then hit Enter.\n\n## Install\n\nmacOS and Linux (amd64/arm64) are supported.\n\n**Homebrew (Package)**\n\n```bash\nbrew install kiki-ki/tap/qo\n```\n\n**Shell (Binary)**\n\n```bash\ncurl -sfL https://raw.githubusercontent.com/kiki-ki/go-qo/main/install.sh | sh\n```\n\n**Git (Source)**\n\n```bash\n# The binary will be located at ./bin/qo\ngit clone --depth 1 https://github.com/kiki-ki/go-qo.git \u0026\u0026 cd go-qo \u0026\u0026 make build\n```\n\n## Usage\n\n**qo** reads from both file arguments and standard input (stdin).\n\n```bash\n# Interactive mode (Open TUI)\ncat x.json | qo\nqo x.json y.json\n\n# Non-interactive mode (Direct output)\ncat x.json | qo -q \"SELECT * FROM tmp WHERE id \u003e 100\"\nqo -q \"SELECT * FROM x JOIN y ON x.id = y.x_id\" x.json y.json\"\n```\n\n### Pipe-Friendly TUI\n\nTUI mode works seamlessly with pipes. Explore data interactively, then pass the result to other tools.\n\n```bash\n# Fetch JSON API \u003e Filter interactively with qo \u003e Format with jq\ncurl -s https://api.github.com/repos/kiki-ki/go-qo/commits | qo | jq '.[].sha'\n\n# Explore \u003e Filter \u003e Compress\ncat large.json | qo | gzip \u003e filtered.json.gz\n```\n\n### Query Logs \u0026 Aggregate\n\nUse SQL to analyze structured data.\n\n```bash\n# Filter error logs\ncat app.log | qo -q \"SELECT timestamp, message FROM tmp WHERE level = 'error'\"\n\n# Aggregate sales by region\nqo -i csv sales.csv -o csv -q \"SELECT region, SUM(amount) FROM sales GROUP BY region\"\n```\n\n### Convert Formats\n\nTransform between various formats.\n\n```bash\nqo -o csv data.json -q \"SELECT id, name FROM data\"             # JSON → CSV\nqo -i csv -o json users.csv -q \"SELECT * FROM users\"           # CSV → JSON\nqo -o jsonl data.json -q \"SELECT * FROM data\"                  # JSON → JSON Lines\nqo -i csv --no-header raw.csv -q \"SELECT col1, col2 FROM raw\"  # Headerless CSV\n```\n\n## Options\n\n| Flag | Short | Default | Description |\n| :--- | :--- | :--- | :--- |\n| `--input` | `-i` | json | Input format: json, csv, tsv, psv (\"json\" includes \"jsonl\") |\n| `--output` | `-o` | json | Output format: json, jsonl, csv, tsv, psv, table |\n| `--query` | `-q` | | Run SQL query directly (Skip TUI) |\n| `--no-header` | | | Treat first row as data, not header (CSV/TSV/PSV only) |\n\n## UI Controls\n\n| Key | Mode | Action |\n| :--- | :--- | :--- |\n| `Tab` | ALL | Switch between Query/Table mode |\n| `Esc` | ALL | Output \u0026 Quit |\n| `Ctrl+C` | ALL | Quit (Output nothing) |\n| `Enter` | QUERY | Execute query |\n| `↑` `↓` / `j` `k` | TABLE | Scroll rows |\n| `←` `→` / `h` `l` | TABLE | Scroll columns |\n\n## SQL Dialect\n\n**qo** uses **SQLite** as its SQL engine. All queries follow SQLite syntax and support its built-in functions.\n\n### Querying Nested JSON\n\nUse SQLite's `json_extract()` function to access nested fields in JSON data.\n\n```bash\n# Sample data: [{\"user\": {\"name\": \"Alice\", \"age\": 30}}, {\"user\": {\"name\": \"Bob\", \"age\": 25}}]\n\n# Extract nested fields\nqo data.json -q \"SELECT json_extract(user, '$.name') AS name FROM data\"\n# Filter by nested value\nqo data.json -q \"SELECT * FROM data WHERE json_extract(user, '$.age') \u003e 25\"\n```\n\nFor more details, see [SQLite JSON Functions](https://www.sqlite.org/json1.html).\n\n## Built With\n\n| Category | Library |\n| :--- | :--- |\n| TUI Framework | [Bubble Tea](https://github.com/charmbracelet/bubbletea) |\n| Styling | [Lip Gloss](https://github.com/charmbracelet/lipgloss) |\n| CLI | [Cobra](https://github.com/spf13/cobra) |\n| SQL Engine | [modernc.org/sqlite](https://pkg.go.dev/modernc.org/sqlite) (Pure Go, CGO-free) |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiki-ki%2Fgo-qo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiki-ki%2Fgo-qo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiki-ki%2Fgo-qo/lists"}