anyquery

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

README

Anyquery

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 SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying JSON, CSV, Parquet, SQLite, Airtable bases, Google Sheets, Notion databases, logs file using Grok, and more. It also supports running SQL queries on remote files (HTTP, S3, GCS), local apps (Apple Notes, Apple Reminders, Google Chrome Tabs, etc.) and databases (MySQL and PostgreSQL). It's built on top of SQLite and uses plugins to extend its functionality.

Moreover, it can acts as a MySQL server, allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. Looker Studio, DBeaver, TablePlus, Metabase, etc.).

Anyquery header

Usage

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:

-- List all repositories of asg017 related to SQLite
SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('asg017') WHERE name LIKE '%sqlite%';

-- Count rows of a remote 75MB CSV file
SELECT count(*) FROM read_csv('https://raw.githubusercontent.com/datadesk/california-coronavirus-data/master/latimes-place-totals.csv', header=true);

-- Insert into a Notion database all repositories of nalgeon related to SQLite
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%';

-- Close all tabs of the datasette documentation
DELETE FROM chrome_tabs WHERE url LIKE '%datasette%';

You can also launch the MySQL server with anyquery server and connect to it with your favorite MySQL-compatible client.

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

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.

Homebrew
brew install julien040/anyquery/anyquery
APT
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
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

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.

Integrations

License

Anyquery is licensed under the AGPLv3 license for the core engine. The RPC library is licensed under the MIT license so that anyone can reuse plugins in different projects.

The plugins are not subject to the AGPL license. Each plugins has its own license and the copyright is owned by the plugin author. See the LICENSE file for more information.

Contributing

If you want to contribute to Anyquery, please read the contributing guidelines. I currently only accept minor contributions, but I'm open to any suggestions or feedback.

You can have a brief overview of the project in the architecture documentation.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
This file defines middlewares to be used in the pipeline defined in pipeline.go
This file defines middlewares to be used in the pipeline defined in pipeline.go
config
This file defines code to manage the internal database
This file defines code to manage the internal database
Define SQL functions that helps to develop plugins
Define SQL functions that helps to develop plugins
other
plugins
airtable Module
brave Module
chrome Module
click_up Module
coda Module
discord Module
docker Module
edge Module
file Module
git Module
google_forms Module
google_sheets Module
google_tasks Module
hacker-news Module
hubspot Module
imap Module
ip-api Module
notes Module
notion Module
nylas Module
pocket Module
raindrop Module
random Module
rss Module
safari Module
salesforce Module
shopify Module
spotify Module
store-manager Module
todoist Module
trello Module
typeform Module
vercel Module
rpc
Package rpc implements functions and structs for plugins to communicate with the main program
Package rpc implements functions and structs for plugins to communicate with the main program

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL