Getting Started with Duck-UI
Duck-UI is a web-based interface for interacting with DuckDB, providing a powerful and intuitive way to work with data directly in your browser. This guide will help you get Duck-UI up and running quickly.
Installation Options​
Choose your preferred installation method:
- Docker (Recommended)
- From Source
The easiest way to get started with Duck-UI is using Docker. You can use either the simple docker run
command or Docker Compose.
Using docker run
Run this command:
docker run -p 5522:5522 ghcr.io/caioricciuti/duck-ui:latest
Then open your browser and navigate to http://localhost:5522
.
Using Docker Compose
- Create a
docker-compose.yml
file with the following content:
version: '3.8'
services:
duck-ui:
image: ghcr.io/caioricciuti/duck-ui:latest
restart: always
ports:
- "${DUCK_UI_PORT:-5522}:5522"
- Run docker compose:
docker-compose up -d
You can then access Duck-UI in your browser at http://localhost:5522
(or the port you have set using DUCK_UI_PORT
environment variable).
If you prefer to run from source, follow these steps:
Prerequisites​
- Node.js >= 20.x
- npm >= 10.x
Steps​
- Clone the repository:
git clone https://github.com/caioricciuti/duck-ui.git
cd duck-ui
- Install dependencies:
npm install
- Start the development server:
npm run dev
The application will be available at http://localhost:5173
.
Core Features​
SQL Editor​
- Write and execute SQL queries with syntax highlighting
- Auto-completion support
- Execute queries using
Cmd/Ctrl + Enter
- View results in a formatted table
Data Import​
Import your data from various formats:
- CSV files
- JSON files
- Parquet files
- Apache Arrow files
Data Explorer​
- Browse databases and tables
- View table schemas
- Preview table contents
- Manage table operations
Keyboard Shortcuts​
Action | Shortcut |
---|---|
Expand/Shrink Sidebar | Cmd/Ctrl + B |
Open Search Bar | Cmd/Ctrl + K |
Run Query | Cmd/Ctrl + Enter |
Run Highlighted Query | Cmd/Ctrl + Shift + Enter |
Quick Start Example​
Here's a quick example to get you started:
-
Launch Duck-UI and navigate to the SQL Editor
-
Create a sample table:
CREATE TABLE users (
id INTEGER,
name VARCHAR,
email VARCHAR
);
INSERT INTO users VALUES
(1, 'John Doe', '[email protected]'),
(2, 'Jane Smith', '[email protected]'); -
Query the data:
SELECT * FROM users;
Troubleshooting​
If you encounter any issues:
- Check if you're using the latest version
- Verify that your browser supports WebAssembly
- Clear your browser cache and reload
- Check our GitHub Issues page
Need Help?​
- Join our GitHub Discussions
- Report bugs on GitHub Issues
- Follow updates on our GitHub Repository