Getting Started
What is anyquery ?
Section titled “What is anyquery ?”Anyquery allows you to write SQL queries on pretty much any data source. It is a query engine that can be used to query data from different sources like databases, APIs, and even files. For example, you can use a Notion database or a Google Sheet as a database to store your data.
Example
-- List all the repositories from Cloudflare ordered by starsSELECT * FROM github_repositories_from_user('cloudflare') ORDER BY stargazers_count DESC;
-- List all your saved tracks from SpotifySELECT * FROM spotify_saved_tracks;
-- Insert data from a git repository into a Google SheetINSERT INTO google_sheets_table (name, line_added) SELECT author_name, addition FROM git_commits_diff('https://github.com/vercel/next.js.git');Installation
Section titled “Installation”Thank you for trying out Anyquery! You can install it by following the instructions below:
Quick install (macOS & Linux)
Section titled “Quick install (macOS & Linux)”The fastest way to install Anyquery. This script detects your platform, downloads the matching binary, verifies its checksum, and places it on your PATH — no sudo required:
curl -fsSL https://anyquery.dev/install.sh | shYou can customise the installation with environment variables:
ANYQUERY_VERSION— install a specific version (e.g.0.4.5) instead of the latest.ANYQUERY_INSTALL_DIR— install into a custom directory.
To update later, re-run the same command. On Windows, use Scoop, Winget, or Chocolatey (see below).
Ubuntu, Debian, and derivatives (apt package manager)
Section titled “Ubuntu, Debian, and derivatives (apt package manager)”# Add the repositoryecho "deb [trusted=yes] https://apt.julienc.me/ /" | sudo tee /etc/apt/sources.list.d/anyquery.list# Update the package listsudo apt update# Install the packagesudo apt install anyqueryFedora, CentOS, and derivatives (dnf/yum package manager)
Section titled “Fedora, CentOS, and derivatives (dnf/yum package manager)”# Add the repositoryecho "[anyquery]name=Anyquerybaseurl=https://yum.julienc.me/enabled=1gpgcheck=0" | sudo tee /etc/yum.repos.d/anyquery.repo# Install the packagesudo dnf install anyqueryArch Linux (AUR)
Section titled “Arch Linux (AUR)”# Install using an AUR helper like yayyay -S anyquery-git
# paruparu -S anyquery-gitMacOS (Homebrew)
Section titled “MacOS (Homebrew)”brew install anyqueryWindows (Scoop)
Section titled “Windows (Scoop)”scoop bucket add anyquery https://github.com/julien040/anyquery-scoopscoop install anyqueryWindows (Chocolatey)
Section titled “Windows (Chocolatey)”choco install anyqueryWindows (Winget)
Section titled “Windows (Winget)”winget install JulienCagniart.anyqueryAny OS (Go install)
Section titled “Any OS (Go install)”If you have Go installed (1.26+), you can install Anyquery directly from source:
CGO_ENABLED=1 go install -tags "vtable fts5 sqlite_json sqlite_math_functions" github.com/julien040/anyquery@mainAnyquery depends on cgo (through go-sqlite3), so make sure a C compiler (gcc, clang, or a mingw toolchain on Windows) is available in your PATH. The -tags flag is required to enable virtual tables, full-text search, JSON and math functions used by Anyquery’s core features.
The binary will be installed in $(go env GOPATH)/bin, so make sure this directory is in your PATH.