QueryCat 0.20.1

dotnet add package QueryCat --version 0.20.1
                    
NuGet\Install-Package QueryCat -Version 0.20.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="QueryCat" Version="0.20.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="QueryCat" Version="0.20.1" />
                    
Directory.Packages.props
<PackageReference Include="QueryCat" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add QueryCat --version 0.20.1
                    
#r "nuget: QueryCat, 0.20.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package QueryCat@0.20.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=QueryCat&version=0.20.1
                    
Install as a Cake Addin
#tool nuget:?package=QueryCat&version=0.20.1
                    
Install as a Cake Tool

<p align="center"> <img src="icon.png" alt="QueryCat logo" width="96" height="96"> </p>

<h1 align="center">QueryCat</h1>

<p align="center"> <strong>Query CSV, JSON, XML and log files with plain SQL - right from your terminal!</strong> </p>

<p align="center"> <a href="https://github.com/krasninja/querycat/actions/workflows/run-tests.yaml"><img src="https://github.com/krasninja/querycat/actions/workflows/run-tests.yaml/badge.svg" alt="Run Tests"></a> <a href="https://github.com/krasninja/querycat/releases/latest"><img src="https://img.shields.io/github/v/release/krasninja/querycat" alt="Latest Release"></a> <a href="https://www.nuget.org/packages/QueryCat/"><img src="https://img.shields.io/nuget/v/querycat" alt="NuGet Version"></a> <a href="https://github.com/krasninja/querycat/releases"><img src="https://img.shields.io/github/downloads/krasninja/querycat/total" alt="Downloads"></a> <a href="LICENSE.txt"><img src="https://img.shields.io/github/license/krasninja/querycat" alt="License"></a> </p>

<p align="center"> <a href="#installation">Installation</a> | <a href="#in-action">Examples</a> | <a href="https://querycat.readthedocs.io/en/latest/tutorial/">Tutorial</a> | <a href="https://querycat.readthedocs.io/">Documentation</a> | <a href="https://querycat.anti-soft.ru/playground/">Playground</a> </p>

$ ps -ef | qcat "SELECT UID, COUNT(*) cnt FROM - GROUP BY UID ORDER BY cnt DESC LIMIT 3"
| UID        | cnt   |
| ---------- | ----- |
| root       | 256   |
| ivan       | 93    |
| systemd+   | 1     |

QueryCat is a command line tool that lets you use SQL to query CSV, JSON, XML and log files - or the output of any other command. No need to import your data into Excel or a database first: point QueryCat at a file or pipe and query it as is.

  • Single binary, zero dependencies. Natively compiled - download it and run it.
  • Streaming pipeline. Rows are processed as they are read, so large files don't have to fit in memory.
  • Read and write. INTO converts the result into another format: CSV in, JSON out.
  • Embeddable. Use it as a .NET library to query files or your own objects.

Features

  • Inputs: CSV, TSV, JSON, XML, LTSV, IIS W3C, CLEF logs, plain text, stdin and more via plugins.
  • SQL: filtering, aggregates and GROUP BY, joins, ORDER BY, LIMIT/OFFSET, UNION, subqueries, CTEs (including recursive), window functions.
  • Parsing helpers: JSONPath, XPath, regex and Grok patterns.
  • Outputs: text table, CSV, TSV, JSON, XML.
  • Scripting: variables, IF, INSERT, UPDATE, DELETE.
  • Web UI, REST API and a simple file server with partial request support - see web server.
  • .NET library: query .NET objects in your app; AOT friendly.

Installation

Install Script

Linux and macOS:

curl -fsSL https://raw.githubusercontent.com/krasninja/querycat/main/scripts/install.sh | bash

Windows:

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/krasninja/querycat/main/scripts/install.ps1 | iex"

Installs qcat and qcat-plugins-proxy from the latest release: on Linux/macOS to /usr/local/bin when run as root, otherwise to ~/.local/bin; on Windows to %ProgramFiles%\QueryCat when elevated, otherwise to %LOCALAPPDATA%\Programs\QueryCat. Set QCAT_INSTALL_DIR to choose another directory; re-running upgrades in place.

Prebuilt Binary

Grab the single binary for your platform from the latest release, unpack it and run - no runtime or dependencies required. Builds are published for Linux (x64/arm64), macOS (x64/arm64) and Windows (x64).

# Example for Linux x64. Use the current version from the releases page
# and the archive for your platform (linux-arm64, osx-x64, osx-arm64, win-x64).
VERSION=X.Y.Z
curl -LO https://github.com/krasninja/querycat/releases/download/v$VERSION/qcat-$VERSION-linux-x64.tar.gz
tar -xzf qcat-$VERSION-linux-x64.tar.gz
./qcat --version

Arch Linux

QueryCat is available in the AUR. Install it with your AUR helper, for example:

yay -S querycat-bin

.NET

Prefer .NET? Install it as a NuGet package instead.

In Action

Find the most failing endpoints in a JSON log.

$ qcat "SELECT url, COUNT(*) AS cnt, MAX(\"time\") AS last_seen FROM 'app-log.json' WHERE level = 'error' GROUP BY url ORDER BY cnt DESC"
| url         | cnt   | last_seen           |
| ----------- | ----- | ------------------- |
| /api/orders | 2     | 03/30/2026 13:35:02 |
| /api/login  | 1     | 03/30/2026 13:36:40 |

Convert CSV to JSON while aggregating it.

$ qcat "SELECT dept, AVG(salary) AS avg_salary INTO 'by-dept.json' FROM 'employees.csv' GROUP BY dept"
$ cat by-dept.json
[{"dept":"IT","avg_salary":5000},{"dept":"Sales","avg_salary":4000}]

Rank rows within groups using window functions.

$ qcat "SELECT name, dept, salary, row_number() OVER (PARTITION BY dept ORDER BY salary DESC) AS pos FROM 'employees.csv'"
| name       | dept       | salary | pos   |
| ---------- | ---------- | ------ | ----- |
| Anna       | IT         | 5200   | 1     |
| Boris      | IT         | 4800   | 2     |
| Clara      | Sales      | 3900   | 2     |
| Dmitry     | Sales      | 4100   | 1     |

Calculate the total files size per user in a directory.

$ find /tmp -ls 2>/dev/null | qcat "SELECT column4 as user, size_pretty(SUM(column6)) size FROM - GROUP BY column4"
| user       | size       |
| ---------- | ---------- |
| root       | 56.1 K     |
| ivan       | 252.6 M    |

Show the full user name for each process by joining ps output with /etc/passwd.

$ ps aux | qcat "SELECT psw.column4 AS full_name, ps.PID, ps.COMMAND FROM - AS ps JOIN '/etc/passwd' FORMAT csv(delimiter=>':', has_header=>false) AS psw ON ps.USER = psw.column0 LIMIT 3"
| full_name  | ps.PID | ps.COMMAND               |
| ---------- | ------ | ------------------------ |
| Super User | 1      | /usr/lib/systemd/systemd |
| Super User | 2      | [kthreadd]               |
| Super User | 3      | [pool_workqueue_release] |

Pass a file as a variable.

$ qcat --var csv=./numbers.csv "SELECT a + b FROM csv"
3
7

More examples are in the tutorial, or try queries online in the playground.

Use as a .NET Library

QueryCat is also available as a NuGet package, so you can run SQL over files and your own .NET objects from your application. See the SDK section in the docs.

dotnet add package QueryCat

Limitations

  • Not the whole SQL standard is implemented.
  • Only a limited number of row sources support INSERT and UPDATE commands.

Contributing

Issues and pull requests are welcome! See CONTRIBUTING.md for how to build the project and run tests. Please target the develop branch.

License

QueryCat is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on QueryCat:

Package Downloads
QueryCat.Plugins.Client

The assembly that helps you build plugins for QueryCat. Contains references to Thrift proxy and QueryCat core.

Dashik.Sdk

Small cozy dashboard software SDK to build widgets.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.20.1 0 11/27/2026
0.19.0 705 10/10/2026
0.17.5 222 7/31/2026
0.17.4 1,197 6/4/2026
0.17.3 1,126 2/2/2026
0.17.0 429 12/5/2025
0.16.1 1,011 10/2/2025
0.16.0 1,681 9/16/2025
0.15.0 633 7/13/2025
0.14.0 261 6/15/2025
0.13.0 1,046 5/6/2025
0.12.0 662 3/16/2025
0.11.0 606 2/17/2025
0.10.0 449 1/28/2025
0.9.0 292 1/7/2025
0.8.1 2,845 11/11/2024
0.8.0 269 11/10/2024
0.8.0-alpha.33 220 10/18/2024
0.7.0 1,312 9/12/2024
0.6.9 1,066 8/6/2024
Loading failed