Introduction
EasySQL is an AI layer between you and your database. You ask a question in natural language — EasySQL generates the SQL, validates that it is SELECT-only, runs the query, and returns the tabular result directly to your terminal or API.
We support MySQL 5.7+, MariaDB 10.3+, PostgreSQL 11+, and SQLite.
Connecting a database
You can connect in seconds using the CLI or via the REST API. You will need:
- Database host and port (e.g., db.example.com:5432) or local SQLite file path
- Username and password — we recommend a read-only database user
- TLS access (recommended) or local socket connection
You can also connect via the API. See the REST API reference for full schema details.
{
"name": "shop_wp",
"type": "mysql",
"host": "db.example.com",
"port": 3306,
"database": "wordpress",
"username": "easysql_ro",
"password": "••••••••",
"ssl": true
}Asking questions
Once connected, just ask in plain language. Examples of good questions:
- How many orders this month?
- Which product sold the most this week?
- Show me the top 10 customers by spend
- How many users signed up this quarter?
The more context you provide, the better the answer. You can ask in any language, and EasySQL will automatically disambiguate schemas and respect filters.
Generated SQL
Every generated SQL statement is shown transparently. You can copy, audit, and inspect it. We only execute SELECT — any attempt at INSERT, UPDATE, DELETE, or DROP is rejected by an AST parser before reaching your database.
SELECT COUNT(*)
FROM orders
WHERE created_at BETWEEN '2026-05-01' AND '2026-05-31';Interactive TUI & CLI
The primary interface for EasySQL is the interactive terminal shell. Run `easysql` to navigate connections, view query history, or ask questions on the fly.
- Local execution: only schema metadata is synced; credentials and raw data never leave your environment.
- Offline demo mode: run `npx @easysql/cli demo` to try out queries on a sample database immediately.
- Cross-platform: available as an npm package and standalone binaries with zero runtime dependencies.
Security
- Read-only we only run SELECT, with a 30s timeout.
- TLS 1.3 all communication is encrypted.
- No data storage we only save the schema, never the values from your tables.
- Auditing every generated SQL is logged and available in the dashboard.
API & SDKs
The entire EasySQL UI is built on top of the public API. You can integrate directly with the REST API, or use one of our official SDKs: