How julien040/anyquery works
Anyquery is a SQLite-based SQL engine for querying files, databases, and app integrations, with plugin extensions. The main workflow is a user query entering through the CLI or MySQL-compatible server, being handled by the controller and namespace, then reaching SQL parsing and registered data sources before results are returned. The README also documents MCP/function-calling access for LLMs and loading SQLite extensions. The graph reflects those documented capabilities; several subsystem links use README evidence because their implementation was not sampled.
Main entry points: namespace.go SQLite namespace · controller/query.go Query controller · cmd/query.go Command interface · server.go MySQL server
Components 18
User interfaces
- Command interface
cmd/query.go - MySQL server
controller/server.go - LLM access
controller/llm.go
Query engine
- Query controller
controller/query.go - SQLite namespace
namespace/namespace.go - SQL parser
other/sqlparser/parsed_query.go - MySQL protocol
namespace/mysql_handler.go
Data sources
- File readers
module/read_file.go - Database connectors
module/postgres.go
Integrations
- Plugin RPC runtime
rpc/plugin.go - App integrations
plugins - Plugin registry
controller/config/registry/registry.go - SQLite extensions
controller/controller.go - MCP transport
controller/llm.go
Other components
- CLI user
- MySQL client
- LLM client
- External apps and services
Connections 17
- CLI user → Command interface: submits query
- Command interface → Query controller: dispatches query
cmd/query.go - Query controller → SQLite namespace: queries namespace
controller/query.go - Query controller → SQL parser: parses SQL
- SQLite namespace → File readers: queries files
- SQLite namespace → Database connectors: queries databases
- SQLite namespace → Plugin RPC runtime: loads plugins
- Plugin RPC runtime → App integrations: dispatches plugin calls
plugins/notion/database_query.go - App integrations → External apps and services: accesses services
- MySQL client → MySQL server: connects
- MySQL server → MySQL protocol: serves protocol
- MySQL protocol → SQL parser: uses parser
namespace/mysql_handler.go - LLM client → MCP transport: connects via MCP
- LLM client → LLM access: uses function calling
- LLM access → Query controller: requests data
- Query controller → Plugin registry: uses registered sources
- SQLite namespace → SQLite extensions: loads extensions
controller/controller.go