An AI-powered data exploration tool that combines GitHub Copilot with SQLite database queries to provide intelligent, conversational data analysis with automatic visualization.
Copilot Data Chat allows you to ask natural language questions about your database and receive:
- Intelligent SQL query generation - Copilot automatically generates the right SQL queries based on your questions
- Automatic visualization - Results displayed as formatted HTML tables or interactive charts (bar, pie, line)
- Real-time execution - Queries run instantly against your SQLite database
- Conversational interface - Ask questions like "Show me all users in a table" or "Create a pie chart of user distribution"
- Bun - Fast all-in-one JavaScript runtime (v1.3.6+)
- TypeScript - Type-safe development
- SQLite - Built-in database (via
bun:sqlite) - @github/copilot-sdk - GitHub Copilot API integration
- HTMX - Modern, declarative AJAX interactions (v2.0.4)
- Chart.js - Interactive data visualizations
- Vanilla JavaScript - No heavy frameworks needed
- CSS3 - Custom dark theme inspired by GitHub Copilot
- Semantic HTML with HTMX attributes for reactive updates
- JSON-encoded form submissions via HTMX extension
- Split-panel UI (results left, input right)
- Sticky input panel for constant access
- Real-time SQL execution with error handling
- Dark, futuristic UI with glowing effects and smooth animations
Install dependencies:
bun installStart the development server:
bun run index.tsThe application will be available at http://localhost:3000
- Open your browser to
http://localhost:3000 - Type a natural language question in the input field, such as:
- "How many rows are in the users table?"
- "Show me all users in a table"
- "Create a bar chart of user count"
- Press Enter or click "Send to Copilot"
- Copilot will generate the SQL, execute it, and display the results
The app uses SQLite with a pre-seeded users table containing sample data. The database is automatically created and populated on first run.
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL
);Copilot can automatically format results using special commands:
FORMAT:TABLE- Display as HTML tableFORMAT:CHART:bar- Bar chartFORMAT:CHART:pie- Pie chartFORMAT:CHART:line- Line chart
my-app/
├── index.ts # Main server and API routes
├── index.html # Frontend UI
├── db.ts # Database setup and schema
├── css/
│ └── styles.css # Dark theme styling
└── mydb.sqlite # SQLite database (auto-generated)
- Bun v1.3.6 or higher
- GitHub Copilot API access (via @github/copilot-sdk)
Built with ❤️ using Bun, TypeScript, and GitHub Copilot