native windows tool to query duckdb
Find a file
claude-bot f46f98dfde
All checks were successful
Build & Release Windows Executable / Build Standalone Windows 11 Executable & Publish Release (push) Successful in 2m38s
Merge pull request 'Open Schema and History queries in their own tab' (#10) from fix/schema-history-own-tab into main
2026-11-20 14:00:16 +00:00
.cargo Statically link libunwind for the gnullvm target 2026-11-06 13:08:17 +01:00
.forgejo/workflows Add release cleanup workflow to keep only the last 4 releases 2026-10-25 08:13:25 +01:00
src Open Schema and History queries in their own tab 2026-11-20 13:59:56 +00:00
.gitignore Add Forgejo release workflow with embedded single-file DuckDB executable 2026-10-25 07:47:44 +01:00
AGENTS.md Open Schema and History queries in their own tab 2026-11-20 13:59:56 +00:00
build.rs Add Visual Block multi-line insert, soft line wrapping, file rename, close all tabs, and taskbar icon resource 2026-11-05 22:49:07 +01:00
Cargo.lock Add Forgejo release workflow with embedded single-file DuckDB executable 2026-10-25 07:47:44 +01:00
Cargo.toml support search and replace 2026-10-25 08:09:37 +01:00
LICENCE.md licence and readme 2026-10-25 07:58:55 +01:00
README.md Update README.md 2026-11-19 19:50:10 +00:00

QryDuck

This application was entirely vibe-coded using Gemini Argon 4 and Opus 5.5

QryDuck is a simple Windows native application to query DuckDB. The editor uses Vim motions.


Features

  • Modal Vim SQL Editor: Full Normal, Insert, Visual, VisualLine, Command, and Search modes with SQL syntax highlighting, relative line numbers, undo/redo (u / Ctrl+r), search (/, ?, n, N, *), and :substitute (:s, :%s/old/new/g).
  • Execute Statement at Cursor: Press Ctrl+Enter, F5, :run, or click ▶ Run SQL to execute the SQL statement under the cursor (or the active Visual selection). Use :runall to execute all statements in the buffer.
  • VS Code-Style Explorer & Multi-Buffer Tabs: Open a project folder (Open Folder... or :e <folder>), double-click .sql files to open them in tabs, and double-click *.duck.db / *.duckdb / *.db files to connect or switch DuckDB databases.
  • Results, Schema & Query History: Virtualized results table with column sorting, substring filtering, cell inspector, CSV/JSON/Markdown export, live schema browser, and query history.

Building from Source

Prerequisites

  1. Rust Toolchain (rustup.rs)
  2. DuckDB CLI (duckdb.exe):
    • Either installed on your PATH / via WinGet:
      winget install DuckDB.cli
      
    • Or embedded directly into qry-duck.exe at compile time (see Single-File Standalone Build below).

1. Standard Build (Windows with MSVC Build Tools)

# Run unit tests
cargo test

# Build optimized release binary
cargo build --release

The compiled executable will be at:

target\release\qry-duck.exe

2. Building on Windows without Visual Studio Build Tools (gnullvm / llvm-mingw)

If you do not have the Visual Studio C++ Build Tools (link.exe) installed, you can build natively using the x86_64-pc-windows-gnullvm target and llvm-mingw:

# Install llvm-mingw (if not already installed) and the gnullvm target
winget install MartinStorsjo.LLVM-MinGW.UCRT
rustup target add x86_64-pc-windows-gnullvm

# Run unit tests
cargo test --target x86_64-pc-windows-gnullvm

# Build optimized release binary
cargo build --release --target x86_64-pc-windows-gnullvm

The compiled executable will be at:

target\x86_64-pc-windows-gnullvm\release\qry-duck.exe

3. Single-File Standalone Build (Embedded duckdb.exe)

To produce a completely self-contained qry-duck.exe that requires no external DuckDB installation (the embedded duckdb.exe is compressed into the binary at compile time and extracted to %LOCALAPPDATA%\qry-duck\bin on first launch):

# Point QRY_DUCK_EMBED_DUCKDB_PATH to your duckdb.exe binary before building
$env:QRY_DUCK_EMBED_DUCKDB_PATH = "C:\path\to\duckdb.exe"
cargo build --release

4. Optional: Signing the Binary (signtool.exe)

With the Windows 10/11 SDK installed (C:\Program Files (x86)\Windows Kits\10\bin\<version>\x64\signtool.exe):

$signtool = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" |
    Sort-Object FullName -Descending | Select-Object -First 1 -ExpandProperty FullName

# Sign using a certificate in your Windows Certificate Store (CurrentUser\My)
& $signtool sign /n "QryDuck" /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 target\release\qry-duck.exe

# Or sign using a .pfx file from a commercial CA
& $signtool sign /f path\to\cert.pfx /p "<password>" /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 target\release\qry-duck.exe

# Verify the Authenticode signature & DigiCert RFC3161 timestamp
& $signtool verify /pa /v target\release\qry-duck.exe