finds.dev

AmrDeveloper/ClangQL

ClangQL is a tool that allow you to run SQL-like query on C/C++ Code instead of database files using the GitQL SDK

View on GitHubHomepage ↗

★ 538RustMITupdated Apr 2026

// the take

ClangQL lets you query C/C++ source with SQL-like syntax instead of grep or writing a custom clang AST visitor, built on top of the author's own GitQL SDK (also used for ClangQL's sibling tools over git repos, CSV, etc). It's aimed at developers who want to audit or search a codebase structurally — e.g. 'find every public constructor' or 'count functions returning int' — without hand-rolling libclang bindings.

- Queries go beyond text matching into actual AST semantics via matcher functions (m_constructor, m_pure_virtual, m_copy_constructor, m_move_constructor), which is the actual hard part of this problem and the reason to reach for it over ripgrep

- Reuses the GitQL SDK rather than hand-rolling a SQL parser and execution engine, so the query layer benefits from a shared, more battle-tested codebase across the author's other GitQL-based tools

- Ships real output ergonomics for a CLI tool: json/csv/render output modes and pagination, so it's usable in scripts and CI, not just interactively

- Easy install path (cargo install, Homebrew) rather than requiring a from-source libclang build to get started

- Hard-pinned to LibClang 17 specifically — on any system where distro/Homebrew LLVM has moved past that, you're stuck building or vendoring an old libclang just to run the tool

- Judging by the README samples, the queryable schema is thin: only functions and globals are shown as tables — no classes/structs, macros, includes, or templates, so anything beyond function- and global-level queries likely isn't expressible yet

- Takes files via -f/-s/-q with no visible compile_commands.json or build-system integration, so on real multi-file C++ projects with non-trivial include paths and macros it's unclear how (or whether) it resolves those correctly — that's usually where libclang-based tools fall apart in practice

- Single-author project (538 stars but only 12 forks) with no visible second maintainer, so bus factor and long-term support for a tool with a hard version dependency on LLVM/Clang internals is a real risk

We read the README, the directory tree and a key source file in November 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
538
Forks
12
Language
Rust
License
MIT
Last commit
21 Apr 2026

// nearby

If ClangQL isn't quite it.

All repos →