Anyquery
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
---
Sponsored by
-->
Sidrune AI - Reliable, cost-efficient access to GPT, Claude, and other leading AI models
Sidrune AI provides reliable, cost-efficient access to GPT, Claude, and other leading AI models through one unified API. Save up to 70% compared with official API pricing—and get $3 in API credits when you sign up through this link.
---
Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying files, databases, and apps (e.g. Apple Notes, Notion, Chrome, Todoist, etc.). It's built on top of SQLite and uses plugins to extend its functionality.
It can also connect to LLMs (e.g. ChatGPT, Claude, Cursor, TypingMind, etc.) to allow them to access your data.
Finally, it can act as a MySQL server, allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. TablePlus, Metabase, etc.).
Usage
Connecting LLM
LLMs can connect to Anyquery using the Model Context Protocol (MCP). This protocol provides context for LLMs that support it. You can start the MCP server with the following command:
You can also connect to clients that supports function calling (e.g. ChatGPT, TypingMind). Refer to each connection guide in the documentation for more information.
Running SQL queries
The documentation provides detailed instructions on how to run queries with Anyquery.
But let's see a quick example. Type anyquery in your terminal to open the shell mode. Then, run the following query:
You can also launch the MySQL server with anyquery server and connect to it with your favorite MySQL-compatible client.
Installation
The documentation provides detailed instructions on how to install Anyquery on your system. You can install anyquery from Homebrew, APT, YUM/DNF, Scoop, Winget and Chocolatey. You can also download the binary from the releases page.
Quick install (macOS & Linux)
The fastest way to get started. This downloads the right binary for your platform, verifies its checksum, and adds it to your PATH — no sudo required:
To pin a version or install elsewhere, set ANYQUERY_VERSION (e.g. 0.4.5) or ANYQUERY_INSTALL_DIR. To update later, re-run the same command. On Windows, use Scoop, Winget, or Chocolatey (below).
Homebrew
ARCH LINUX (AUR)
APT
YUM/DNF
Scoop
Winget
Chocolatey
Go install
Requires Go 1.26+ (some dependencies don't support older versions).
Anyquery relies on cgo (through go-sqlite3), so you need a C compiler (gcc, clang, or a mingw toolchain on Windows) available in your PATH.
Plugins
Anyquery is plugin-based, and you can install plugins to extend its functionality. You can install plugins from the official registry or create your own. Anyquery can also load any SQLite extension.
Sponsors
Anyquery is an independent open-source project. These companies support its development: