squix
SQL command-line client with query management and interactive results.
Squix's SQL Stash

SQL Query Stashing for Terminal Squirrels
Bear Grylls: "Out here in the wild database ecosystem, efficiency means survival. See that squirrel? That’s Squix, or Sequillis termius. He doesn’t panic-write queries under pressure. He prepares. He caches. He optimizes. While others are wrestling with joins in the dark, Squix already has his results. Extraordinary creature."
A minimal CLI tool for managing and executing SQL queries across multiple databases. Written in Go, made beautiful with BubbleTea
Quick Start • Configuration • Commands • Keybindings • Features • Completion • Databases • Roadmap • Contributing
This project is currently in beta, please report unexpected behavior through the issues tab
Demo
Try out the live demo (no install required!)
Highlights
- Query Library - Save and organize your most-used queries, with parameterized support
- Multi-Database - Works with PostgreSQL, MySQL, SQLite, Oracle, SQL Server, ClickHouse, Firebird and DuckDB
- Table view TUI - Keyboard focused navigation and search with vim-style bindings
- In-Place Editing - Update cells, delete rows and edit your SQL directly from the results table
- Export your data - Export your data as CSV, JSON, SQL, Markdown or HTML tables
- Connection Switching - Manage multiple databases and switch instantly
- Database Exploration - Browse schema, visualize foreign key relationships
- Interactive Shell - REPL with history, multi-line, and meta-commands
See Features for details and examples
Quick Start
Installation
Go to the releases page and find the correct version for your system. Download it and make sure the file is executable and moved to a directory in your $PATH.
Go install
Use go to install squix directly
go install github.com/eduardofuncao/squix/cmd/squix@latest
this will put the binary squix in your $GOBIN path (usually ~/go/bin)
Build Manually
Follow these instructions to build the project locally
git clone https://github.com/eduardofuncao/squix
go build -o squix ./cmd/squix
The squix binary will be available in the root project directory
DuckDB requires CGO and is included in the default build. To build without DuckDB:
CGO_ENABLED=0 go build -o squix ./cmd/squix
Nix / NixOS (Flake)
Squix is available as a Nix flake for easy installation on NixOS and systems with Nix.
Run directly without installing
nix run github:eduardofuncao/squix
Install to user profile
nix profile install github:eduardofuncao/squix
Enter development shell
nix develop github:eduardofuncao/squix
NixOS System-wide
Add to your flake-based configuration.nix or flake.nix:
{
description = "My NixOS config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
squix.url = "github:eduardofuncao/squix";
};
outputs = { self, nixpkgs, squix, ... }: {
nixosConfigurations.myHostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
environment.systemPackages = [
squix.packages.x86_64-linux.default
];
}
];
};
};
}
Then rebuild: sudo nixos-rebuild switch
Home Manager
Add to your home.nix or flake config:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nix-unstable";
squix.url = "github:eduardofuncao/squix";
};
outputs = { self, nixpkgs, squix, ... }: {
homeConfigurations."username" = {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
{
home.packages = [
squix.packages.x86_64-linux.default
];
}
];
};
};
}
Then apply: home-manager switch
Arch (AUR) - Unofficial
There's also an unofficial AUR package for squix available at: squix-bin
Basic Usage
# Create your first connection (PostgreSQL example)
squix init mydb postgres "postgresql://user:pass@localhost:5432/mydb"
# Add a saved query
squix add list_users "SELECT * FROM users"
# List your saved queries
squix list queries
# Run it, this opens the interactive table viewer
squix run list_users
# Or run inline SQL
squix run "SELECT * FROM products WHERE price > 100"
Navigating the Table
Once your query results appear, you can navigate and interact with the data:
# Use vim-style navigation or arrow-keys
j/k # Move down/up
h/l # Move left/right
g/G # Jump to first/last row
# Copy data
y # Yank (copy) current cell
v # Enter visual mode to select multiple cells and copy with y
x # Export selected data as csv, tsv, json, sql, markdown or html
# Edit data directly
u # Update current cell (opens your $EDITOR)
D # Delete current row
# Modify and re-run
e # Edit the query and re-run it
# Search around
/ # Search cell's contents (n/N to cycle through results)
f # Search column names (,/; to cycle through results)
# Exit
q # Quit back to terminal
Database Support
PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, Oracle, ClickHouse, Firebird, DuckDB
See connection init examples in Database Support
Shell Completion
Dynamic tab completion for bash, zsh, and fish that includes your saved queries and connections.
See Shell Completion
Configuration
Row limits, column widths, color schemes (dracula, gruvbox, catppuccin-mocha, etc.) and UI visibility options can be set through the config file at ~/.config/squix/config.yaml.
See Configuration
All Commands
See Commands for the full command reference and database init examples
TUI Table Navigation
See Keybindings for all navigation, editing, search, and visual mode keybindings on the results table view
For Robots
Squix ships a SKILL.md file in the repo root, a simple reference for AI
coding agents (Claude Code, Copilot, etc.) to use squix non-interactively. It
covers safe commands, format flags, parameterized queries, and which commands
to avoid (TUI/editor). Point your agent at it if you want it to run SQL queries
as part of your workflow.
Roadmap
This project is currently in beta, please report unexpected behavior through the issues tab
v0.3.0 - Squix 🐿️
- Edit command overhaul
- Delete connections with remove command
- Full project rename
v0.4.0 - Acorn 🌰
- Interactive query shell (
squix shell) - Shell autocomplete (bash, fish, zsh)
- Cell search (
/) and column header search (f) - Add skill file for ai agents and non interactive query results
- Option to return results from
squix runas json, csv, etc. with--formatflag - Duckdb support
v0.5.0 - Scrat 🧊
- Configurable keybinds
- Migrate to bubbletea v2
- Return more info on exec statements (insert, update, delete, etc.)
- Homebrew custom tap and nixpkgs entry
- More options to encrypt data in the config file
Sponsor
If Squix saves you time, consider supporting its development through GitHub Sponsors. I work on Squix in my spare time and your support helps me dedicate more hours to it, keep the live demo running, build a proper docs/landing site, and cover GitHub Actions minutes for cross-platform builds, instead of relying on local builds.
Any amount is greatly appreciated ❤
Contributing & acknowledgements
We welcome contributions! Get started with detailed instructions from CONTRIBUTING.md
Thanks a lot to all the contributors:
Squix wouldn't exist without the inspiration and groundwork laid by these fantastic projects:
- naggie/dstask - For the elegant CLI design patterns and file-based data storage approach
- DeprecatedLuar/better-curl-saul - For demonstrating a simple and genius approach to making a CLI tool
- dbeaver - The OG database management tool
Built with:
- Bubble Tea - The TUI framework
- Go standard library and various database drivers
Made with 🐿️ by @eduardofuncao
Previously Pam's Database Drawer, thanks to u/marrsd for suggesting the new name!