TerSQL is the SQL terminal built for humans — not just developers. You don't need prior coding knowledge. Type naturally, get auto-corrections, smart completions, and clear results across MySQL, PostgreSQL, and MongoDB.
| id | name | role | |
|---|---|---|---|
| 1 | Alice | alice@dev.io | admin |
| 2 | Bob | bob@dev.io | user |
| 3 | Carol | carol@dev.io | user |
Who It's For
Whether you've never touched a terminal or you're an experienced DBA — TerSQL meets you where you are. Zero prior coding knowledge required to get started.
Interactive Demo
Pick a natural-language input, hit Run, and watch TerSQL auto-correct and execute it.
How It Works
TerSQL is a modular pipeline. Each layer is cleanly separated — making it easy to extend with new database plugins or NLP rules.
Capabilities
Built to reduce friction for all experience levels. Every feature was chosen intentionally.
~/.tersql_bookmarks.json.
grid, json, csv,
markdown, html, latex, and more on the fly.
Ctrl+R for fuzzy search through
the last 500 queries..tee.
.sql file directly with .source. Multi-statement
files fully supported.-e to run a single query and exit — perfect for shell scripts and
CI pipelines."age between 20 and 40" or "category in books, games" — v0.0.3 translates both into valid SQL automatically.python-Levenshtein..plugins, primary keys via .pks, and enriched table stats via .info..stats.Tech Stack
No proprietary APIs. No LLM dependencies. Every component is open-source and auditable.
Benchmarks
Internal metrics from the v0.0.3 beta test suite. Open-source — verify them yourself.
Reference
Dot commands control the terminal. Type .help inside TerSQL to see the
full list anytime.
Setup
Clone, install five packages, run. No build step. No package manager. No configuration files.
Output
Switch format or mode live without reconnecting. Use .format and
.output at any time.
Protection
Opt-in guards that catch mistakes before they cost you. Essential for production databases and beginners alike.
Blocks DELETE and UPDATE without a WHERE clause. Requires
typing yes before DROP TABLE or TRUNCATE executes.
Blocks all write operations at the terminal NLP layer before the query reaches the server. Ideal for analysts querying live production databases.
--read-onlyOpen Source
TerSQL welcomes all contribution types. You don't need to write code to make an impact.
Found something broken? Open an issue with your OS, Python version, and steps to reproduce.
Have an idea? Start a GitHub Discussion before writing code so we can align on the approach first.
Fix typos, improve examples, or clarify sections that confused you when you first used TerSQL.
Subclass BaseDB in plugins/ to add Redis, SQLite, or any other database
driver.
Coverage for edge cases, auto-correction patterns, and safety guards is always welcome.
Star the repo, share it with your team, or write a blog post about how you use TerSQL.
TerSQL is free and open-source forever. If it saved you time, helped you learn SQL, or just made your terminal a nicer place — consider buying me a coffee. Every one is genuinely appreciated.
☕ Buy Me a CoffeeMade with ❤️ by Sayan Dutta · MIT License · Free forever
No prior coding knowledge needed. SQL for everyone.