Skip to content

kwrkb/SQLiteView

Repository files navigation

SQLite View

⚠️ This repository is an experimental project using AI tools such as Codex. It is shared for educational purposes only. Please note that it is provided as is, without warranty or official support.

A lightweight, cross-platform PyQt6 desktop SQLite database viewer. The app lets you inspect tables, run ad-hoc queries, and export results—packaged for distribution via Python wheels or Debian packages.

Features

  • Browse tables and view row data with pagination
  • Run custom SQL queries with syntax highlighting and CSV export
  • Execute write operations (INSERT, UPDATE, DELETE) and DDL (CREATE, DROP, ALTER)
  • Destructive query confirmation dialog for safety
  • Light/Dark theme switching (Ctrl+D) with persistent preference
  • Monospace font in SQL editor and schema view
  • Keyboard shortcuts: Ctrl+Enter / F5 (run query), Ctrl+R (refresh tables)
  • Display table schema metadata
  • Persistent recent files list for quick access
  • Debian package builder for Ubuntu (Python-dependent bundle)

Tested Platforms

  • Windows - Confirmed working
  • Ubuntu/Linux - Primary development platform
  • macOS - Not yet tested (feedback welcome!)

Prerequisites

Ubuntu/Linux

The following system libraries are required:

sudo apt-get update
sudo apt-get install -y libxcb-cursor0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-keysyms1 libxcb-xkb1

Windows

No additional system libraries required. PyQt6 bundles all necessary dependencies.

macOS

No additional system libraries required (not yet tested).

Getting Started

Option 1: Using uv (Recommended)

This project is set up to work with uv, a fast Python package manager.

Development Setup

# Install dependencies (creates .venv automatically)
uv sync --dev

# Run the application locally
uv run sqliteview /path/to/database.sqlite

# Or run without arguments to browse for a database
uv run sqliteview

Global Installation

Install the tool globally to use it from anywhere:

# Install from GitHub (easiest - no need to clone)
uv tool install git+https://github.com/kwrkb/SQLiteView.git

# Or install from local directory
uv tool install .

# Now you can run it from anywhere
sqliteview /path/to/database.sqlite

Option 2: Traditional pip Method

# Create & activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install in editable mode with dev extras
pip install --upgrade pip
pip install -e ".[dev]"

# Launch the viewer
sqliteview /path/to/database.sqlite

Running Tests

uv run python -m pytest tests/ -v

Packaging

  • Build wheel + sdist: uv run python -m build
  • Build Debian package: ./scripts/build_deb.sh
  • Generated packages are placed in dist/

Continuous Integration

GitHub Actions workflow (.github/workflows/ci.yml) validates formatting, runs tests, and ensures packaging succeeds on Ubuntu.

License

Released under the MIT License. See LICENSE.

About

Experimental SQLite viewer built with PyQt6. AI-generated (Codex) project for learning purposes. No support provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors