|
10 | 10 | [](https://anyquery.dev/queries)
|
11 | 11 | [](https://pkg.go.dev/github.com/julien040/anyquery/namespace)
|
12 | 12 |
|
13 |
| -Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying [files](https://anyquery.dev/docs/usage/querying-files/), [databases](https://anyquery.dev/docs/database), and [apps](https://anyquery.dev/integrations) (e.g. Apple Notes, Notion, Chrome, Todoist, etc.). It's built on top of [SQLite](https://www.sqlite.org) and uses [plugins](https://anyquery.dev/integrations) to extend its functionality. |
| 13 | +Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying [JSON](https://anyquery.dev/docs/usage/querying-files/#json), [CSV](https://anyquery.dev/docs/usage/querying-files/#csv), [Parquet](https://anyquery.dev/docs/usage/querying-files/#parquet), SQLite, [Airtable bases](https://anyquery.dev/integrations/airtable/), [Google Sheets](https://anyquery.dev/integrations/google_sheets/), [Notion databases](https://anyquery.dev/integrations/notion/), and [log files](https://anyquery.dev/docs/usage/querying-log/) using [Grok](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok.html), among others. It also supports running SQL queries on [remote files](https://anyquery.dev/docs/usage/querying-files/#remote-files) (HTTP, S3, GCS), local apps ([Apple Notes](https://anyquery.dev/integrations/notes/), [Apple Reminders](https://anyquery.dev/integrations/reminders/), [Google Chrome Tabs](https://anyquery.dev/integrations/chrome/), etc.), and databases ([MySQL](https://anyquery.dev/docs/database/mysql/) and [PostgreSQL](https://anyquery.dev/docs/database/postgresql/)). It's built on top of [SQLite](https://www.sqlite.org) and uses [plugins](https://anyquery.dev/integrations/) to extend its functionality. |
14 | 14 |
|
15 |
| -It can also connect to [LLMs](https://anyquery.dev/llm) (e.g. ChatGPT, Claude, Cursor, TypingMind, etc.) to allow them to access your data. |
16 |
| - |
17 |
| -Finally, it can act as a [MySQL server](https://anyquery.dev/docs/usage/mysql-server/), allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. [TablePlus](https://anyquery.dev/connection-guide/tableplus/), [Metabase](https://anyquery.dev/connection-guide/metabase/), etc.). |
| 15 | +Moreover, it can act as a [MySQL server](https://anyquery.dev/docs/usage/mysql-server/), allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. [Looker Studio](https://anyquery.dev/connection-guide/looker-studio/), [DBeaver](https://anyquery.dev/connection-guide/dbeaver/), [TablePlus](https://anyquery.dev/connection-guide/tableplus/), [Metabase](https://anyquery.dev/connection-guide/metabase/), etc.). |
18 | 16 |
|
19 | 17 | 
|
20 | 18 |
|
21 | 19 | ## Usage
|
22 | 20 |
|
23 |
| -### Connecting LLM |
24 |
| - |
25 |
| -LLMs can connect to Anyquery using the [Model Context Protocol (MCP)](https://anyquery.dev/docs/reference/commands/anyquery_mcp). This protocol provides context for LLMs that support it. You can start the MCP server with the following command: |
26 |
| - |
27 |
| -```bash |
28 |
| -# To be started by the LLM client |
29 |
| -anyquery mcp |
30 |
| -# To connect using an HTTP and SSE tunnel |
31 |
| -anyquery mcp --tunnel |
32 |
| -``` |
33 |
| - |
34 |
| -You can also connect to clients that supports function calling (e.g. ChatGPT, TypingMind). Refer to each [connection guide](https://anyquery.dev/integrations#llm) in the documentation for more information. |
| 21 | +The [documentation](https://anyquery.dev/docs/usage/running-queries) provides detailed instructions on how to run queries with Anyquery. |
| 22 | +But let's see a quick example. Type `anyquery` in your terminal to open the shell mode. Then, run the following query: |
35 | 23 |
|
36 |
| - |
| 24 | +```sql |
| 25 | +-- List all repositories of asg017 related to SQLite |
| 26 | +SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('asg017') WHERE name LIKE '%sqlite%'; |
37 | 27 |
|
38 |
| -### Running SQL queries |
| 28 | +-- Count rows of a remote 75MB CSV file |
| 29 | +SELECT count(*) FROM read_csv('https://raw.githubusercontent.com/datadesk/california-coronavirus-data/master/latimes-place-totals.csv', header=true); |
39 | 30 |
|
40 |
| -The [documentation](https://anyquery.dev/docs/usage/running-queries) provides detailed instructions on how to run queries with Anyquery. |
41 |
| -But let's see a quick example. Type `anyquery` in your terminal to open the shell mode. Then, run the following query: |
| 31 | +-- Insert into a Notion database all repositories of nalgeon related to SQLite |
| 32 | +INSERT INTO notion_database(repo, stars, last_push) SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('nalgeon') WHERE description LIKE '%sqlite%'; |
42 | 33 |
|
43 |
| - |
| 34 | +-- Close all tabs of the datasette documentation |
| 35 | +DELETE FROM chrome_tabs WHERE url LIKE '%datasette%'; |
| 36 | +``` |
44 | 37 |
|
45 | 38 | You can also launch the MySQL server with `anyquery server` and connect to it with your favorite MySQL-compatible client.
|
46 | 39 |
|
@@ -120,4 +113,4 @@ See the [LICENSE](https://github.com/julien040/anquery/blob/main/LICENSE.md) fil
|
120 | 113 |
|
121 | 114 | If you want to contribute to Anyquery, please read the [contributing guidelines](https://anyquery.dev/docs/developers/project/contributing). I currently only accept minor contributions, but I'm open to any suggestions or feedback.
|
122 | 115 |
|
123 |
| -You can have a brief overview of the project in the [architecture](https://anyquery.dev/docs/developers/project/architecture/) documentation. |
| 116 | +You can have a brief overview of the project in the [architecture](https://anyquery.dev/docs/developers/project/architecture/) documentation. |
0 commit comments