{"id":18003694,"url":"https://github.com/henomis/ai-sql-assistant","last_synced_at":"2025-08-17T11:32:05.082Z","repository":{"id":169872632,"uuid":"645956341","full_name":"henomis/ai-sql-assistant","owner":"henomis","description":"AI powered SQL query builder assistant","archived":false,"fork":false,"pushed_at":"2023-05-30T07:53:45.000Z","size":619,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T01:42:37.389Z","etag":null,"topics":["ai","assistant","builder","chatgpt","go","lingoose","llm","openai","sql"],"latest_commit_sha":null,"homepage":"https://simonevellei.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henomis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-26T21:14:49.000Z","updated_at":"2024-05-23T01:40:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8b70bab-5762-4516-87f2-44baa1a39ba6","html_url":"https://github.com/henomis/ai-sql-assistant","commit_stats":null,"previous_names":["henomis/ai-sql-assistant"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Fai-sql-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Fai-sql-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Fai-sql-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Fai-sql-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henomis","download_url":"https://codeload.github.com/henomis/ai-sql-assistant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230121682,"owners_count":18176477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","assistant","builder","chatgpt","go","lingoose","llm","openai","sql"],"created_at":"2024-10-30T00:10:29.888Z","updated_at":"2024-12-17T13:07:07.444Z","avatar_url":"https://github.com/henomis.png","language":"Go","readme":"# 🤖 ai-sql-assistant\n\n[![Build Status](https://github.com/henomis/ai-sql-assistant/actions/workflows/release.yml/badge.svg)](https://github.com/henomis/ai-sql-assistant/actions/workflows/release.yml) [![GoDoc](https://godoc.org/github.com/henomis/ai-sql-assistant?status.svg)](https://godoc.org/github.com/henomis/ai-sql-assistant) [![Go Report Card](https://goreportcard.com/badge/github.com/henomis/ai-sql-assistant)](https://goreportcard.com/report/github.com/henomis/ai-sql-assistant) [![GitHub release](https://img.shields.io/github/release/henomis/ai-sql-assistant.svg)](https://github.com/henomis/ai-sql-assistant/releases)\n\nThis is a simple AI SQL query builder helper written in GO. It uses OpenAI API to generate a plausible SQL query from a given question. Generated query is executed and results are displayed. And, if you provide a plot question, it will generate a plot for you.\n\nIt only supports MySQL and SQLite for now. This project is powered by [LinGoose](https://github.com/henomis/lingoose) 🪿\n\n![ai-sql-assistant](screen.png)\n\n![ai-sql-assistant](plot.png)\n\nIf you like this project, give it a ⭐️ and share it with friends!\n\n## Installation\n\nBe sure to have a working Go environment, then run the following command:\n\n```\ngo install github.com/henomis/ai-sql-assistant@latest\n```\n\n### From source code\n\nClone the repository and build the binary:\n\n```\ngo build .\n```\n\n### Pre-built binaries\n\nPre-built binaries are available for Linux, Windows and macOS on the [releases page](https://github.com/henomis/ai-sql-assistant/releases/latest).\n\n## Usage\n\n⚠️ ai-sql-assistant requires an OpenAI API key as `OPENAI_API_KEY` environment variable.\n\n```shell\nUsage of ./ai-sql-assistant:\n  -k string\n        openai api key (defaults to OPENAI_API_KEY env var)\n  -n string\n        name of the datasource (database path|connection string)\n  -p string\n        instructions to plot the datasource\n  -q string\n        question to ask the datasource\n  -t string\n        type of the datasource (sqlite|mysql)\n```\n\n```\nai-sql-assistant -n ./Chinook_Sqlite.sqlite -t sqlite -q \"give me top 4 artists name and number of songs\"\n```\n\n## License\n\n© Simone Vellei, 2023~time.Now() Released under the MIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenomis%2Fai-sql-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenomis%2Fai-sql-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenomis%2Fai-sql-assistant/lists"}