Skip to content

Al366io/vscode-sql-explainer

Repository files navigation

SQL Explainer

SQL Explainer is a VS Code extension that uses the OpenAI API to translate SQL queries into English. With this extension, you can quickly understand what a query does and why it's important without having to spend time deciphering SQL code.

Getting Started

To use SQL Explainer, you'll need to get an API key from OpenAI. If you don't have one already, you can sign up for a free account at https://platform.openai.com/signup.

Once you have an API key, you can install SQL Translator by following these steps:

  1. Install the extension
  2. Open a file in VS Code and select the query you want to translate.
  3. Open the Command Palette by pressing Ctrl+Shift+P (Windows, Linux) or Cmd+Shift+P (macOS).
  4. Type "SQL Explainer" in the search bar and select the "SQL Explainer: Translate Query" command.
  5. If prompted, enter your OpenAI API key and press Enter. (will be asked only the first time)

Once you've completed these steps, a window will open on the right side of the screen, showing you the translated query in English. You can also see a shorter explanation (tldr) of the query below the full explanation.

Screenshot 2023-02-26 at 00 50 22

Contributing

If you encounter any bugs or have suggestions for new features, please feel free to open an issue or submit a pull request on GitHub. Contributions are always welcome!

License

SQL Translator is released under the GNU GENERAL PUBLIC License.