tusk

alpcanaydinMIT活跃维护

面向 macOS 的原生数据库客户端,支持 20 种数据库,键盘驱动操作流畅,内置会展示推理过程的 AI 助手,免费开源。

A fast, native, keyboard-driven database client for macOS. 20 databases, an AI assistant that shows its work, free and open source.

v0.2.1发布于 2026-09-30 16:24 UTC434star +13 / 7 天25fork同步于 2026-11-10 23:58 UTC

怎么上手

由 README 提炼,执行前请确认
brew install alpcanaydin/tusk/tusk
硬件要求按 README 说明

macOS 需 14 及以上且为 Apple Silicon;Windows 需 10/11 的 x64 或 ARM64;Linux 需 x86_64 并运行 Wayland 桌面(Xwayland 可作后备)。README 未提及显存要求。

支持 Apple Silicon有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 GPUI 的原生跨平台数据库客户端,支持 20 种数据库,用键盘操作,AI 只写 SQL 不执行

面向 macOS 的原生数据库客户端,支持 20 种数据库,键盘驱动操作流畅,内置会展示推理过程的 AI 助手,免费开源。

核心能力

  • 用虚拟化 GPU 渲染网格流畅滚动百万行
  • 统一连接 PostgreSQL、MySQL、SQLite 等 20 种引擎
  • AI 代理读取表结构后把 SQL 写入新标签页,不自动执行
  • 单元格编辑与删除合并为单个事务提交并支持撤销
  • 内置 postgres-language-server 与 sqls 提供补全诊断

容易踩的坑

Windows 构建尚未代码签名,首次运行可能触发 SmartScreen 警告;Windows 和 Linux 的备份恢复需自行安装 PostgreSQL 客户端工具;Windows 构建未捆绑 SQL 语言服务器,需用 TUSK_PGLS 和 TUSK_SQLS 指向对应可执行文件

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

4 个版本v0.2.1
  1. v0.2.1Tusk 0.2.1最新正式版2026-09-30 · 2026-09-30 16:24 UTC

    A small follow-up to 0.2.0.

    Fixes

    • Fold the connected connection in the sidebar. In the connections tree (Settings ▸ Interface ▸ Sidebar Layout ▸ "Connections tree"), clicking the connection you're connected to now folds and unfolds its tables, just like a folder. Clicking any other connection still switches to it.
    • A roomier connection search at the top of the connections tree.
    • The app icon is back. The first 0.2.0 downloads showed a blank placeholder icon on macOS and a generic program icon on Windows. If you got one of those, this update puts the Tusk elephant back.

    Install

    macOS (14 Sonoma or later, Apple Silicon): Tusk updates itself. Or download Tusk-0.2.1-arm64.dmg below, or run brew upgrade tusk.

    Windows (x64 or ARM64): download the zip for your machine, unzip it, and run Tusk.exe. SmartScreen may warn the first time because the build isn't code-signed yet: click More info ▸ Run anyway.

    Linux (x86_64): .deb for Ubuntu, .rpm for Fedora, .pkg.tar.zst for Arch, all below.

    See 0.2.0 for everything that came with Windows and Linux support.

  2. v0.2.0Tusk 0.2.02026-09-30 · 2026-09-30 13:39 UTC
    查看更新说明

    Tusk now runs on Windows and Linux, not just macOS. This release also brings a connections sidebar, Omarchy theme support, and a long list of fixes from the first round of your feedback. Thank you to everyone who tried 0.1 and reported what broke.

    New platforms

    • Linux. Native Wayland, with an Xwayland fallback. Packages for Ubuntu (.deb), Fedora (.rpm) and Arch (.pkg.tar.zst). Passwords go to your Secret Service keyring (GNOME Keyring, KWallet…). Huge thanks to Tajeddine Bourhim (@scorpionTaj), who built the whole Linux port and its packaging in #9.
    • Windows. A portable build for x64 and ARM64. Passwords go to Windows Credential Manager, shortcuts use Ctrl, and the window buttons are native, Snap Layouts included.
    • Omarchy. Tusk now follows your Omarchy theme and recolors itself as soon as you switch themes. No restart needed.

    What's new

    • Connections sidebar. Turn it on in Settings ▸ Interface ▸ Sidebar Layout ▸ "Connections tree". All your connections sit in a sidebar, grouped in folders, and you switch between them with one click. The classic sidebar stays the default.
    • Select a range of cells. Shift + arrows, Shift + click or drag selects a block of cells. ⌘A selects everything. ⌘C copies the block as tab-separated text, and ⌘V pastes a block back.
    • Undo in the data grid. ⌘Z and ⇧⌘Z undo and redo cell edits and new rows before you save.
    • Reorder columns. Drag a column header to move it. Only the view changes, never the table.
    • Safe mode for writes. With Settings ▸ Safe Mode ▸ "Confirm Before Saving" on, Tusk asks before saving grid edits and before any query that writes, such as INSERT, UPDATE, DELETE or CREATE. It's off by default.
    • What's new after an update. A small card links to these notes the first time you open a new version. You can also open them any time from Tusk ▸ Release Notes.
    • Right-click on Structure rows. Copy a column name, add a column, or delete one.
    • Window and Help menus. Minimize (⌘M), Zoom, Full Screen (⌃⌘F), Bring All to Front, plus links to GitHub and the issue tracker.
    • Friendlier details:
      • Timestamps read as 2026-09-11 21:56:05+00.
      • File databases show their file name instead of 127.0.0.1:0.
      • Row counts use proper plurals.
      • A connection imported from a URL gets a name suggested automatically.

    Fixes

    • Connections you connect to are saved now. Before, pressing Connect on a new connection never saved it, so it disappeared after a restart. Saving is also crash-safe now: an unreadable connections.json is backed up instead of being overwritten.
    • Autocomplete no longer wipes the line. Accepting a suggestion with Enter or Tab replaces only the word you're typing. Suggestions with placeholders insert clean text.
    • macOS 14 crash fixed. Tusk could quit unexpectedly on Sonoma when a window closed, for example right after connecting to a SQLite file.
    • Switching connections is safe. The old workspace stays until the new connection succeeds. If a password is missing, Tusk asks for it. If unsaved queries or changes would be lost, Tusk asks before switching or disconnecting.
    • Backup and Restore:
      • They use the password you connected with, or ask for one.
      • They list only Postgres connections.
      • Return in the confirmation dialog really starts the restore.
      • You can name the new database the backup restores into.
    • Export:
      • JSON writes null for NULL values.
      • Several tables can be picked at once again.
      • Rows come out in primary-key order.
    • Readability. Clearer text contrast, larger small text, and -- no longer turns into a dash —. Primary buttons stand out, destructive menu items are red, and Esc, ⌘W and Return work in every dialog.
    • Safer prompts. Return no longer triggers destructive actions such as Discard, Drop or Delete: Esc cancels, and you confirm them on pu
  3. v0.1.1Tusk 0.1.12026-09-29 · 2026-09-29 10:13 UTC
    查看更新说明

    What's new

    • Tusk updates itself. Tusk checks for new versions and downloads them in the background. When one is ready, a Restart to Update button appears at the top right of the window. If you don't click it, the update installs the next time you quit. You can also check right away with Tusk ▸ Check for Updates….
    • About Tusk. A new item under Tusk ▸ About Tusk (also in the command palette) shows which version you're running.

    Install

    • Download Tusk-0.1.1-arm64.dmg below, open it, and drag Tusk into Applications. It's signed and notarized by Apple.
    • Or with Homebrew: brew install alpcanaydin/tusk/tusk (update with brew upgrade tusk)

    macOS 14 (Sonoma) or later, Apple Silicon.

    Full Changelog: https://github.com/alpcanaydin/tusk/compare/v0.1.0...v0.1.1

  4. v0.1.0Tusk 0.1.02026-09-28 · 2026-09-28 22:38 UTC
    查看更新说明

    The first public release of Tusk: a fast, native, keyboard-driven database client for macOS. Free and open source (MIT).

    Tusk

    Install

    • Download Tusk-0.1.0-arm64.dmg below, open it, and drag Tusk into Applications. It's signed and notarized by Apple.
    • Or with Homebrew: brew install alpcanaydin/tusk/tusk

    It needs macOS 14 (Sonoma) or later on Apple Silicon. From this version on, Tusk updates itself: new versions download in the background, and a Restart to Update button appears in the top bar.

    What's in it

    • 20 databases. PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, ClickHouse, DuckDB, Snowflake, BigQuery, Redis, MongoDB, Cassandra, DynamoDB, CockroachDB, Redshift and more, with SSH tunnels and SSL.
    • A GPU-rendered data grid. Millions of rows scroll smoothly. You can edit cells in place, and pending edits are saved in one transaction with ⌘S. Undo and redo work.
    • Structure and indexes. Edit them in place. Tusk writes each engine's own DDL and tells you up front when an engine can't make a change.
    • SQL editor. Completions come from a real language server. ⌘↵ runs the statement under the cursor, and each SELECT gets its own result tab.
    • AI assistant (⌘L). Ask in plain English. The agent reads your schema and writes a query into a new tab, and you decide when it runs. It works with Claude, Codex or Gemini CLI.
    • Keyboard first. Every action is in the command palette (⌘⇧P). There are 30+ themes.
    • Also: backup and restore with bundled pg_dump, pg_restore and psql, CSV / JSON / SQL export and import, and a process list.

    Your passwords stay in the macOS Keychain. There's no account and no telemetry.

    Found a bug? Open an issue. Questions and ideas go in Discussions.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Tusk

    The gentle giant for your databases.

    A fast, native, keyboard-driven database client for macOS, Windows and Linux. It's written in Rust on GPUI, the GPU-accelerated UI framework behind the Zed editor.

    License: MIT macOS 14+ Windows 10/11 Linux x86_64 Rust

    Why Tusk

    • Native and fast. No Electron and no web view. Tables with millions of rows scroll smoothly because the grid is virtualized and GPU-rendered.
    • One app for 20 databases. PostgreSQL, MySQL, SQLite, SQL Server, Oracle, ClickHouse, Snowflake, BigQuery, Redis, MongoDB and more.
    • Keyboard first. Everything is in the command palette (⌘⇧P), and the common actions have shortcuts.
    • AI that doesn't take the wheel. Ask about your data in plain English. The agent reads your schema and writes a query into a new tab. It never runs SQL on its own.
    • Your credentials stay yours. Passwords are stored in the macOS Keychain, Windows Credential Manager or Linux Secret Service. There's no account and no telemetry.

    Features

    Connect to anything

    Supported engines: PostgreSQL, Amazon Redshift, CockroachDB, Greenplum, Vertica, MySQL, MariaDB, SQLite, DuckDB, LibSQL, Cloudflare D1, Microsoft SQL Server, Oracle, ClickHouse, Snowflake, BigQuery, Redis, MongoDB, Cassandra and DynamoDB.

    • Organize connections with groups, tags and status colors (for example, red for production).
    • Connect through an SSH tunnel with a password or a key, and choose any SSL mode.
    • Import existing connections from TablePlus, a Docker Compose file, or a connection URL.

    A data grid you can actually edit

    • Virtualized scrolling. Column widths fit the content, and your resized widths are remembered per table.
    • Double-click a cell to edit it with a typed editor (dates, enums, numbers). Pending edits and deletes are highlighted and saved together in one transaction with ⌘S.
    • Full undo and redo.
    • Right-click a row to copy it as TSV, CSV, JSON, INSERT, UPDATE or Markdown, filter by its value, sort, or set a cell to NULL or empty.

    Filters support a per-column operator, raw SQL conditions, and one-click export of the filtered rows.

    Structure, indexes and DDL

    Edit columns, types, defaults, nullability, comments and indexes right in the grid. Tusk generates each engine's own DDL. If an engine can't make a change in place (for example, changing a column type in SQLite), Tusk tells you before you save, not after. You can also design new tables and views from the sidebar's + menu.

    SQL editor

    • Completions and diagnostics come from a bundled language server: postgres-language-server for Postgres, and sqls for most other SQL engines. For the rest, completions come from the live catalog.
    • Run Current (⌘↵) runs the statement under the cursor. Run All (⌘⇧↵) runs everything, and each SELECT gets its own result tab.
    • When a query fails, Ask AI to Fix sends the error and your query to the agent.

    An AI assistant that shows its work

    Open the AI panel with ⌘L and ask a question. The agent reads the structure of the tables it needs, writes a query into a new tab, and explains its assumptions. You review it and run it. Tusk doesn't let the agent execute SQL.

    Tusk talks to agents over the Agent Client Protocol, so you can use Claude, Codex or Gemini CLI, or add your own. The agents reach your open connection through Tusk's built-in MCP server.

    [!NOTE] The agent runs on your machine through the CLI you choose, under that CLI's own account and settings. Tusk doesn't send your data anywhere itself.

    Everything is one keystroke away

    The command palette (⌘⇧P) lists every action along with its shortcut. It also switches connections, databases, schemas and themes. The console shows every statement Tusk sends. History keeps the queries you've run, and you can search it.

    Make it yours

    Tusk ships with more than 30 light and dark themes: Tusk, Kanagawa, Catppuccin, Tokyo Night, Gruvbox, One, Rosé Pine, Nord, Solarized and more. You can change the accent color, the UI and table fonts, the editor settings, the grid settings, and the Safe Mode confirmations for destructive statements.

    Also included

    • Backup and restore for PostgreSQL. The client tools are bundled on macOS; on Windows and Linux, Tusk uses the PostgreSQL client tools you install.
    • Export tables and results as CSV, JSON or SQL, and import from CSV.
    • Process list with cancel and kill, for every engine.

    Keyboard shortcuts

    On Windows and Linux, use Ctrl wherever the table shows ⌘.

    ActionShortcut
    Command palette⌘⇧P
    Quick open table⌘P
    New connection / Open connection⌘N / ⌘⇧O
    New SQL tab⌘T
    Run current / Run all⌘↵ / ⌘⇧↵
    Save pending changes⌘S
    Undo / Redo⌘Z / ⌘⇧Z
    AI panel⌘L
    Settings⌘,

    Getting started

    [!IMPORTANT]

    • macOS: macOS 14 (Sonoma) or later, Apple Silicon.
    • Windows: Windows 10 or 11, x64 or ARM64.
    • Linux: x86_64, on a Wayland desktop (Xwayland works as a fallback).

    Download

    Get the latest release from the Releases page.

    macOS: download Tusk-<version>-arm64.dmg, open it and drag Tusk into Applications. Or install it with Homebrew:

    brew install alpcanaydin/tusk/tusk
    

    macOS releases are signed with a Developer ID and notarized by Apple, so they open without Gatekeeper warnings. PostgreSQL's client tools and the SQL language servers are bundled, so you don't need to install anything else.

    Windows: download Tusk-<version>-windows-x64.zip (or Tusk-<version>-windows-arm64.zip on ARM), unzip it anywhere and run Tusk.exe. The build isn't code-signed yet, so SmartScreen may warn the first time: click More info ▸ Run anyway. For backup and restore, install the PostgreSQL client tools; Tusk finds them in C:\Program Files\PostgreSQL\<version>\bin, on PATH, or in TUSK_PG_BIN.

    Linux:

    DistributionPackageInstall
    Ubuntu 24.04Tusk-<version>-ubuntu-amd64.debsudo apt install ./Tusk-*-ubuntu-amd64.deb
    FedoraTusk-<version>-fedora-x86_64.rpmsudo dnf install ./Tusk-*-fedora-x86_64.rpm
    Arch LinuxTusk-<version>-arch-x86_64.pkg.tar.zstsudo pacman -U ./Tusk-*-arch-x86_64.pkg.tar.zst

    The Linux packages include the SQL language servers. For backup and restore, install your distribution's PostgreSQL client tools.

    Updates

    On macOS, Tusk updates itself. It checks for a new version once a day and downloads it in the background. When the update is ready, a Restart to Update button appears in the top bar. If you don't click it, the update installs the next time you quit Tusk. You can also check right away with Tusk ▸ Check for Updates…. Updates are signed, and Tusk verifies each one before installing it. If you installed with Homebrew, brew upgrade tusk works too.

    On Windows and Linux there's no automatic update yet: download the new zip or package from the Releases page.

    Build from source

    rust-toolchain.toml pins the Rust version; rustup installs it on the first build.

    macOS: you need the Xcode Command Line Tools. Building Tusk.app with its icon needs Xcode 26 or later.

    git clone https://github.com/alpcanaydin/tusk.git && cd tusk
    cargo run --release
    

    To build a standalone Tusk.app with the bundled language servers and PostgreSQL client tools, run:

    scripts/bundle.sh            # → target/release/bundle/Tusk.app
    

    Windows build

    Install the Visual Studio Build Tools with the Desktop development with C++ workload (the MSVC tools for your architecture, x64 or ARM64, and a Windows SDK), LLVM (ring needs clang), CMake and Git, and Rust with rustup. Then:

    git clone https://github.com/alpcanaydin/tusk.git && cd tusk
    cargo build --release          # → target\release\tusk.exe
    

    The SQL language servers aren't bundled on Windows yet. Point TUSK_PGLS and TUSK_SQLS at postgres-language-server.exe and sqls.exe to use them; without them, completions come from the live catalog.

    Linux build

    To build from source, clone the repository and install the pinned Rust toolchain with rustup. You also need a C/C++ compiler, CMake, Go (for the SQL language server), pkg-config, and GPUI's Wayland/Xwayland, font, and Vulkan dependencies. On Arch-based distributions:

    sudo pacman -S --needed base-devel clang cmake go git curl pkgconf wayland libxkbcommon-x11 fontconfig vulkan-icd-loader dbus gnome-keyring postgresql-libs
    git clone https://github.com/alpcanaydin/tusk.git && cd tusk
    cargo run --release
    

    On Ubuntu 24.04, install build dependencies with:

    sudo apt update
    sudo apt install clang cmake golang-go git curl pkg-config libasound2-dev libdbus-1-dev libfontconfig-dev libwayland-dev libx11-xcb-dev libxkbcommon-x11-dev libvulkan-dev
    

    On Fedora, install build dependencies with:

    sudo dnf install clang cmake golang git curl pkgconf-pkg-config alsa-lib-devel dbus-devel fontconfig-devel wayland-devel libxcb-devel libxkbcommon-x11-devel vulkan-loader-devel
    

    To install the binary, SQL language servers, and desktop launcher under ~/.local, run scripts/install-linux.sh. Restart the desktop session if the launcher does not appear immediately. Linux uses your desktop's Secret Service provider (such as GNOME Keyring or a compatible KWallet service) for saved passwords. The app refuses to report a password as saved when the service is unavailable. On Linux, choose the graphics device in Settings → General → Graphics Device and restart Tusk. The choice asks GPUI to prefer that GPU; if it cannot render the window, GPUI falls back to another compatible device. On a Wayland desktop, GPUI uses native Wayland when available and can use Xwayland as a fallback. Standalone X11 sessions are not a supported target.

    PostgreSQL backup and restore use pg_dump, pg_restore, and psql from PATH (or TUSK_PG_BIN); install your distribution's PostgreSQL client tools for these features. SQL completions use postgres-language-server and sqls from PATH; scripts/install-linux.sh installs both. A direct cargo run build can use TUSK_PGLS or TUSK_SQLS to locate them.

    Releasing (maintainers)

    Releases are built by GitHub Actions (.github/workflows/release.yml). The workflow:

    1. Builds the app and signs it with the Developer ID.
    2. Notarizes and staples both the app and the DMG.
    3. Signs the DMG for Sparkle and writes the update feed (appcast.xml).
    4. Publishes a GitHub release with the DMG and update feed, using the notes in docs/release-notes/<version>.md.
    5. Builds the Windows x64 and ARM64 zips and the Ubuntu DEB, Fedora RPM and Arch Linux packages, then attaches them to the release. A failing Windows or Linux build never holds back the macOS release.
    6. Updates the Homebrew cask.

    Running the workflow by hand (Actions ▸ release ▸ Run workflow) is a dry run: it builds only the Windows and Linux packages.

    One-time setup: run scripts/setup-release.sh. The wizard walks you through the certificate, the notarization key, the update-signing key and the Homebrew token, and checks each one. After that, a release is one command:

    scripts/tag-release.sh 0.2.0   # bumps the version, commits, tags v0.2.0, pushes
    

    To build a release locally, run scripts/release.sh. It uses the same signing and notarization credentials, stored in your keychain.

    [!TIP] If you have an Apple Development certificate, cargo run signs the dev binary with it (see scripts/sign-dev.sh). Then the Keychain's Always Allow keeps working across rebuilds. Without one, the binary runs unsigned and macOS asks for Keychain access again after each rebuild.

    Try it with sample data

    The repo includes a Docker Compose file that starts PostgreSQL 17 with a seeded demo database. It has three schemas, views, functions, and a 500,000-row events table.

    docker compose up -d                # PostgreSQL on localhost:55432
    

    In Tusk, choose Import from Docker Compose… on the welcome screen and pick this repo's docker-compose.yml.

    Run the tests

    cargo test
    

    Some integration tests need the Docker database above. Tests for other engines use their own containers and are skipped when those aren't running.

    Where your data lives

    WhatWhere
    Connection profiles, groups, settings, historymacOS: ~/Library/Application Support/tusk/; Windows: %APPDATA%\tusk\; Linux: $XDG_DATA_HOME/tusk/ (default ~/.local/share/tusk/)
    Passwords and SSH passphrasesmacOS Keychain, Windows Credential Manager or Linux Secret Service (tusk-postgres, tusk-ssh)

    Set TUSK_DATA_DIR to use a different folder, which is handy for a clean test profile.

    Built with

    GPUI and gpui-component for the UI, sqlx and a native driver per engine, russh for SSH tunnels, and tree-sitter for SQL highlighting. Tusk vendors small patches to gpui-component and gpui-base in vendor/, and those keep their Apache-2.0 licenses.