Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Adminer SQL Ollama Plugin

📝 Overview

The Adminer SQL Ollama Plugin integrates local AI models via Ollama directly into the SQL command interface of Adminer.

This allows you to generate, complete, and assist with SQL queries using a local AI model --- without sending your database structure or data to any external server.

It works similarly to the sql-gemini plugin, but everything runs 100% locally, ensuring maximum privacy and security.


✨ Features

  • AI-powered SQL generation using Ollama
  • Fully local execution --- no external API required
  • Integrated with Adminer's native autocomplete system
  • Access to your database schema for accurate query generation
  • Lightweight and easy to install
  • Privacy-friendly: your schema never leaves your machine

🧪 Tested Model

In my tests, the small model:

qwen2.5-coder:3b

produced excellent results, with fast responses. If you go for larger models, you may get high-quality SQL generation.


⚙️ Requirements

  • Adminer
  • Ollama installed and running

Example:

ollama pull qwen2.5-coder:3b

📦 Installation

Place the plugin file into:

adminer-plugins/

Example:

adminer/
├── adminer.php
├── adminer-plugins.php
└── adminer-plugins/
    └── sql-ollama.php

🛠️ Configuration

Edit:

adminer-plugins.php

Example:

<?php

return array(

    new AdminerSqlOllama('http://127.0.0.1:11434', 'qwen2.5-coder:3b')

);

🎬 Demonstration

AI-generated SQL queries based on natural language prompts, with access to the database schema for accurate results.

Demo: AI SQL Generation

Autocomplete suggestions, providing relevant SQL keywords, table names, and column names as you type.

Demo: Autocomplete Integration

🔒 Privacy

Everything runs locally. Your schema is never sent externally.


📄 License

Distributed under the MIT license. See the LICENSE file for more details.

MIT License — Copyright (c) 2026 Guilherme Saldanha

🔗 Related Adminer Projects

🖥️ Adminer Launcher

Standalone desktop application that runs Adminer locally with an embedded PHP server and a native PyWebView interface.
https://github.com/guisaldanha/adminer-launcher

🤖 SQL Ollama

Adminer plugin that integrates Ollama to generate SQL queries using local AI models.
https://github.com/guisaldanha/sql-ollama

🎨 Adminer Obsidian Amber

Custom dark theme for Adminer inspired by the Obsidian interface with amber accents.
https://github.com/guisaldanha/adminer-obsidian-amber


👨‍💻 Author

Developed by Guilherme Saldanha


❤️ Support the Developer

If this project saves you time or helps your workflow, consider supporting its development.

Ways to help:


Made with ☕ by Guilherme Saldanha

About

Bring local AI to Adminer: generate SQL queries using Ollama with schema awareness, autocomplete integration, and zero external data sharing.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages