sql-translator  by whoiskatrin

Web app for translating between natural language and SQL

created 2 years ago
4,288 stars

Top 11.6% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a web-based tool for translating natural language queries into SQL code and vice versa, leveraging AI for conversion. It aims to democratize database interaction for users unfamiliar with SQL syntax, offering a user-friendly interface with features like dark mode, syntax highlighting, and query history.

How It Works

The tool utilizes AI models to parse natural language input and generate corresponding SQL queries, or to translate SQL commands into human-readable natural language. This approach abstracts away the complexity of SQL, enabling users to interact with databases using everyday language.

Quick Start & Requirements

  • Local Development:
    • Clone the repository: git clone https://github.com/whoiskatrin/sql-translator.git
    • Install dependencies: npm install
    • Set OPENAI_API_KEY in a .env file.
    • Start the server: npm start
  • Docker Compose:
    • Clone the repository.
    • Set OPENAI_API_KEY in .env.production.
    • Start with docker-compose up.
  • Prerequisites: Node.js, npm, OpenAI API key.
  • Access: http://localhost:3000

Highlighted Details

  • Bi-directional translation: Natural Language to SQL and SQL to Natural Language.
  • Features include dark mode, copy-to-clipboard, SQL syntax highlighting, and query history.
  • Beta support for schema awareness.
  • Roadmap includes planned support for functions and procedures.

Maintenance & Community

The project is open source and welcomes contributions via pull requests. Community engagement channels are not explicitly mentioned in the README.

Licensing & Compatibility

Released under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

Schema awareness is currently in beta. The core functionality relies on an external OpenAI API key, incurring potential costs and external service dependency.

Health Check
Last commit

4 weeks ago

Responsiveness

1 day

Pull Requests (30d)
7
Issues (30d)
0
Star History
35 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.