an

anyquery

Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.

#Database Management# Multi-Database Query# Local-First Apps
Publisheranyquery
Submitted date4/13/2025

Anyquery: Unleash the Power of SQL on Everything

Anyquery logo

GitHub Downloads (all assets, all releases) GitHub commit activity Documentation GitHub issues Dynamic JSON Badge Dynamic JSON Badge Go Reference

Anyquery is a revolutionary SQL query engine that transcends traditional database boundaries, enabling you to execute SQL queries against virtually any data source. From local files and databases to applications like Apple Notes, Notion, Chrome, and Todoist, Anyquery provides a unified interface for data exploration and analysis. Built upon the robust foundation of SQLite and extended through a powerful plugin architecture, Anyquery empowers you to unlock insights from disparate data silos.

Furthermore, Anyquery seamlessly integrates with Large Language Models (LLMs) such as ChatGPT, Claude, and Cursor, providing them with access to your data and enabling sophisticated AI-driven workflows. It can also function as a MySQL server, allowing you to leverage your favorite MySQL-compatible clients like TablePlus and Metabase for querying and visualizing your data.

Anyquery header

Core Capabilities

  • Universal Data Access: Query files, databases, and applications using standard SQL.
  • LLM Integration: Connect to LLMs via the Model Context Protocol (MCP) or function calling for AI-powered data analysis.
  • MySQL Server Emulation: Use existing MySQL clients to interact with Anyquery.
  • Extensible Architecture: Expand functionality with plugins from the official registry or create your own.

Deep Dive into Usage

Empowering LLMs with Context

Anyquery leverages the Model Context Protocol (MCP) to provide LLMs with the necessary context for informed decision-making. This allows LLMs to access and reason about your data, enabling advanced AI-driven applications.

MCP Server Modes:

  • anyquery mcp --stdio: Ideal for direct communication with LLM clients.
  • anyquery mcp --host 127.0.0.1 --port 8070: Establishes an HTTP and SSE tunnel for remote access.

For LLMs supporting function calling (e.g., ChatGPT, TypingMind), Anyquery offers seamless integration. Consult the connection guides for specific instructions.

# Generates an ID for LLM client connection (e.g., ChatGPT, TypingMind) anyquery gpt

5ire example

Mastering SQL Queries with Anyquery

The documentation provides comprehensive guidance on executing SQL queries within Anyquery.

Quick Start:

  1. Open the Anyquery shell by typing anyquery in your terminal.
  2. Execute SQL queries directly within the shell.
-- Example Queries SELECT * FROM file('./data.csv'); SELECT title, content FROM apple_notes WHERE folder = 'My Notes'; SELECT * FROM todoist.tasks WHERE project_id = '1234567890';

MySQL Server Mode:

Launch the MySQL server with anyquery server and connect using your preferred MySQL client.

anyquery server & mysql -u root -h 127.0.0.1 -P 8070

Installation: A Streamlined Approach

Anyquery offers a variety of installation methods to suit your environment. Refer to the official documentation for detailed instructions.

Popular Installation Methods:

  • Homebrew: brew install anyquery
  • APT: (Debian/Ubuntu)
    echo "deb [trusted=yes] https://apt.julienc.me/ /" | sudo tee /etc/apt/sources.list.d/anyquery.list sudo apt update sudo apt install anyquery
  • YUM/DNF: (CentOS/Fedora)
    echo "[anyquery] name=Anyquery baseurl=https://yum.julienc.me/ enabled=1 gpgcheck=0" | sudo tee /etc/yum.repos.d/anyquery.repo sudo dnf install anyquery
  • Scoop: scoop bucket add anyquery https://github.com/julien040/anyquery-scoop && scoop install anyquery
  • Winget: winget install JulienCagniart.anyquery
  • Chocolatey: choco install anyquery

Expanding Functionality with Plugins

Anyquery's plugin architecture allows you to tailor its capabilities to your specific needs. Explore the official registry for pre-built plugins or develop your own. Anyquery also supports loading arbitrary SQLite extensions for maximum flexibility.

Integrations

Contributing to the Future of Anyquery

We welcome contributions to Anyquery! Please review the contributing guidelines for details on how to get involved. While we currently focus on smaller contributions, we value all suggestions and feedback.

Gain a deeper understanding of the project's structure by exploring the architecture documentation.

Visit More

View All