MCPcopy Index your code
hub / github.com/NickTikhonov/snap-ql

github.com/NickTikhonov/snap-ql @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
172 symbols 638 edges 79 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SnapQL

cursor for data ⚡️ - generate queries and charts in seconds

https://github.com/user-attachments/assets/e1c38ef9-4ee9-4d38-96ee-02584e9ef67c

  • generate schema-aware queries in seconds with AI
  • automatically chart your data
  • supports any PostgreSQL and MySQL database
  • local-first - your database credentials don't leave your computer
  • use your own OpenAI or Claude key
  • manage multiple database connections with connection-specific query history and favorites

💬 Join the Telegram group to chat with the devs + share feedback!

Build SnapQL locally

I will eventually ship some precompiled binaries, but that takes some setup. In the meantime, follow these steps to build a local copy:

Quick Start (using Makefile)

git clone <repo-url>
cd snap-ql
make install-global  # Installs deps, builds for your platform, and adds to PATH

Now you can run snap-ql from anywhere in your terminal!

Manual Build Steps

  • clone the repo
  • run npm install (or make install)
  • if you're on MacOS, you will need to have XCode installed
  • run npm run build:mac or npm run build:win depending on your platform (or make dist-mac/make dist-win)
  • install the binary located in ./dist

Makefile Commands

  • make help - Show all available commands
  • make dev - Start development server with hot reload
  • make install-global - Build and install to PATH in one step
  • make link / make unlink - Add/remove from PATH (after building)
  • make clean - Clean build artifacts

Featured on Hacker News

Tip in Crypto

Extension points exported contracts — how you extend this code

QueryHistory (Interface)
(no doc)
src/renderer/src/App.tsx
Window (Interface)
(no doc)
src/preload/index.d.ts
TableSchema (Interface)
(no doc)
src/main/lib/db.ts
ConnectionDialogProps (Interface)
(no doc)
src/renderer/src/components/ConnectionDialog.tsx
ColumnInfo (Interface)
(no doc)
src/main/lib/db.ts
SQLEditorProps (Interface)
(no doc)
src/renderer/src/components/SQLEditor.tsx
TableDetailViewProps (Interface)
(no doc)
src/renderer/src/components/TableDetailView.tsx
GraphProps (Interface)
(no doc)
src/renderer/src/components/Graph.tsx

Core symbols most depended-on inside this repo

cn
called by 168
src/renderer/src/lib/utils.ts
toast
called by 17
src/renderer/src/hooks/use-toast.ts
getGlobalSettings
called by 12
src/main/lib/state.ts
createConnection
called by 10
src/main/lib/state.ts
loadConnectionData
called by 8
src/renderer/src/components/ConnectionDialog.tsx
getConnectionFavorites
called by 7
src/main/lib/state.ts
useToast
called by 6
src/renderer/src/hooks/use-toast.ts
parseConnectionString
called by 6
src/main/lib/db.ts

Shape

Function 146
Interface 26

Languages

TypeScript100%

Modules by API surface

src/main/lib/state.ts41 symbols
src/renderer/src/components/Settings.tsx11 symbols
src/renderer/src/App.tsx10 symbols
src/renderer/src/hooks/use-toast.ts9 symbols
src/renderer/src/components/Sidebar.tsx8 symbols
src/renderer/src/components/SchemaViewer.tsx7 symbols
src/main/lib/db.ts7 symbols
src/renderer/src/components/GraphEditDialog.tsx6 symbols
src/renderer/src/components/ui/pagination.tsx5 symbols
src/renderer/src/components/TableDetailView.tsx5 symbols
src/renderer/src/components/ConnectionDialog.tsx5 symbols
src/renderer/src/hooks/useConnection.ts4 symbols

Datastores touched

(mysql)Database · 1 repos
dbDatabase · 1 repos
dummyDatabase · 1 repos
newdbDatabase · 1 repos
testdbDatabase · 1 repos

For agents

$ claude mcp add snap-ql \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact