โ† All apps

CandyQuery

๐Ÿ”Ž CandyQuery

Terminal SQLite browser

port of lazysql sql sqlite tui pdo

Composer-installable SQLite TUI: connect, browse tables, peek at row data, run ad-hoc queries โ€” all on the SugarCraft stack. SQLite-only at v1; the storage layer is a sealed concrete class today, promote-to-interface the day a non-SQLite driver lands.

Install

composer require candycore/candy-query

Quickstart

candy-query path/to/db.sqlite

// Or wire it up programmatically:
use CandyCore\Core\Program;
use CandyCore\Core\ProgramOptions;
use CandyCore\Query\App;
use CandyCore\Query\Database;

$db = Database::open('app.sqlite');
(new Program(App::start($db), new ProgramOptions(useAltScreen: true)))->run();

What's in the box

Tables paneLists every type IN (table, view) in sqlite_master excluding sqlite_* internals.
Rows paneFirst 100 rows of the selected table, with header row + reverse-video cursor.
Query paneAd-hoc SQL editor โ€” Ctrl+R runs, errors stash to a status line instead of crashing.
Tab / Backspace / SpacePane cycle, character delete, and space typing all respect the focused pane.
Cursor clampingLists never let the cursor escape their bounds; switching panes preserves per-pane positions.
PDO under the hood:memory: driving in tests covers the full transition surface without fixture files.

Source & demos

Try the quickstart โ†’

Demos.

VHS-recorded GIFs of every example shipped with the app. Regenerated automatically on every push that touches the source.

Play

Play

Browse tables, load rows, run an ad-hoc query.