From e279ffdc5f5987b7e6b1ac49f6b69c50e680b88f Mon Sep 17 00:00:00 2001 From: "Holden R. Fried" Date: Sun, 1 Feb 2026 17:59:55 -0500 Subject: [PATCH 1/2] Basic instructions for XDG-compatible config dir/uv tool deps: Only tested uv tool deps with postgres, can also be installed just fine with extras, e.g. `uv tool install sqlit-tui[ssh,postgres]`... In most cases it's probably preferred to use the extra, but can still be useful to install independently with `-w`, for example, if you want to build against system postgres libs (e.g. using `psycopg2` in place of `psycopg2-binary` for a command like `uv tool install sqlit-tui[ssh] -w psycopg2`). Not sure if setting SQLIT_CONFIG env will fully prevent `~/.sqlit` dir from cluttering up homedir, but seems to work well enough in my case. Should probably be codified as a default option for linux though.. I've never met anyone who wanted config dirs cluttering up their home dir. :) --- README.md | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 9c73f34..05d97dd 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,21 @@ Autocomplete triggers automatically in INSERT mode. Use `Tab` to accept. ## Configuration -Connections and settings are stored in `~/.sqlit/`. +Connections and settings are stored in `~/.sqlit/` by default, but can +be overridden with the `SQLIT_CONFIG_DIR` environment variable. +E.g., to use the standard `XDG_CONFIG_HOME` directory `~/.config/sqlit/`: +`SQLIT_CONFIG_DIR=~/.config/sqlit` + +It is recommended to throw this in your `~/.bashrc` or equivalent shell configuration, e.g.: + +``` +mkdir -p ~/.config/sqlit +echo "export SQLIT_CONFIG_DIR=~/.config/sqlit" >> ~/.bashrc +``` + +If you already have existing configuration files in `~/.sqlit/`, it should be +sufficient to copy these over to `~/.config/sqlit/` before/after setting +`SQLIT_CONFIG_DIR`. ## FAQ @@ -266,22 +280,22 @@ See `CONTRIBUTING.md` for development setup, testing, and CI steps. Most of the time you can just run `sqlit` and connect. If a Python driver is missing, `sqlit` will show (and often run) the right install command for your environment. -| Database | Driver package | `pipx` | `pip` / venv | -| :---------------------------------- | :--------------------------- | :------------------------------------------------- | :------------------------------------------------- | -| SQLite | *(built-in)* | *(built-in)* | *(built-in)* | -| PostgreSQL / CockroachDB / Supabase | `psycopg2-binary` | `pipx inject sqlit-tui psycopg2-binary` | `python -m pip install psycopg2-binary` | -| SQL Server | `mssql-python` | `pipx inject sqlit-tui mssql-python` | `python -m pip install mssql-python` | -| MySQL | `PyMySQL` | `pipx inject sqlit-tui PyMySQL` | `python -m pip install PyMySQL` | -| MariaDB | `mariadb` | `pipx inject sqlit-tui mariadb` | `python -m pip install mariadb` | -| Oracle | `oracledb` | `pipx inject sqlit-tui oracledb` | `python -m pip install oracledb` | -| DuckDB | `duckdb` | `pipx inject sqlit-tui duckdb` | `python -m pip install duckdb` | -| ClickHouse | `clickhouse-connect` | `pipx inject sqlit-tui clickhouse-connect` | `python -m pip install clickhouse-connect` | -| Turso | `libsql` | `pipx inject sqlit-tui libsql` | `python -m pip install libsql` | -| Cloudflare D1 | `requests` | `pipx inject sqlit-tui requests` | `python -m pip install requests` | -| Snowflake | `snowflake-connector-python` | `pipx inject sqlit-tui snowflake-connector-python` | `python -m pip install snowflake-connector-python` | -| Firebird | `firebirdsql` | `pipx inject sqlit-tui firebirdsql` | `python -m pip install firebirdsql` | -| Athena | `pyathena` | `pipx inject sqlit-tui pyathena` | `python -m pip install pyathena` | -| Apache Arrow Flight SQL | `adbc-driver-flightsql` | `pipx inject sqlit-tui adbc-driver-flightsql` | `python -m pip install adbc-driver-flightsql` | +| Database | Driver package | `pipx` | `pip` / venv | `uv tool` +| :---------------------------------- | :--------------------------- | :------------------------------------------------- | :------------------------------------------------- | :-------------------------------------------------------- | +| SQLite | *(built-in)* | *(built-in)* | *(built-in)* | *(built-in)* | +| PostgreSQL / CockroachDB / Supabase | `psycopg2-binary` | `pipx inject sqlit-tui psycopg2-binary` | `python -m pip install psycopg2-binary` | `uv tool install sqlit-tui -w psycopg2-binary` | +| SQL Server | `mssql-python` | `pipx inject sqlit-tui mssql-python` | `python -m pip install mssql-python` | `uv tool install sqlit-tui -w mssql-python` | +| MySQL | `PyMySQL` | `pipx inject sqlit-tui PyMySQL` | `python -m pip install PyMySQL` | `uv tool install sqlit-tui -w PyMySQL` | +| MariaDB | `mariadb` | `pipx inject sqlit-tui mariadb` | `python -m pip install mariadb` | `uv tool install sqlit-tui -w mariadb` | +| Oracle | `oracledb` | `pipx inject sqlit-tui oracledb` | `python -m pip install oracledb` | `uv tool install sqlit-tui -w oracledb` | +| DuckDB | `duckdb` | `pipx inject sqlit-tui duckdb` | `python -m pip install duckdb` | `uv tool install sqlit-tui -w duckdb` | +| ClickHouse | `clickhouse-connect` | `pipx inject sqlit-tui clickhouse-connect` | `python -m pip install clickhouse-connect` | `uv tool install sqlit-tui -w clickhouse-connect` | +| Turso | `libsql` | `pipx inject sqlit-tui libsql` | `python -m pip install libsql` | `uv tool install sqlit-tui -w libsql` | +| Cloudflare D1 | `requests` | `pipx inject sqlit-tui requests` | `python -m pip install requests` | `uv tool install sqlit-tui -w requests` | +| Snowflake | `snowflake-connector-python` | `pipx inject sqlit-tui snowflake-connector-python` | `python -m pip install snowflake-connector-python` | `uv tool install sqlit-tui -w snowflake-connector-python` | +| Firebird | `firebirdsql` | `pipx inject sqlit-tui firebirdsql` | `python -m pip install firebirdsql` | `uv tool install sqlit-tui -w firebirdsql` | +| Athena | `pyathena` | `pipx inject sqlit-tui pyathena` | `python -m pip install pyathena` | `uv tool install sqlit-tui -w pyathena` | +| Apache Arrow Flight SQL | `adbc-driver-flightsql` | `pipx inject sqlit-tui adbc-driver-flightsql` | `python -m pip install adbc-driver-flightsql` | `uv tool install sqlit-tui -w adbc-driver-flightsql` | ### SSH Tunnel Support From 81e57fed8534275ea07db6a2609e6bade84fa2d5 Mon Sep 17 00:00:00 2001 From: hrfried <38709968+hrfried@users.noreply.github.com> Date: Sun, 1 Feb 2026 18:39:02 -0500 Subject: [PATCH 2/2] Reformatting readme changes to look decent outside of vim Looked fine until I opened it up in web UI. :) --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 05d97dd..7effdf3 100644 --- a/README.md +++ b/README.md @@ -233,14 +233,13 @@ Autocomplete triggers automatically in INSERT mode. Use `Tab` to accept. ## Configuration -Connections and settings are stored in `~/.sqlit/` by default, but can -be overridden with the `SQLIT_CONFIG_DIR` environment variable. -E.g., to use the standard `XDG_CONFIG_HOME` directory `~/.config/sqlit/`: -`SQLIT_CONFIG_DIR=~/.config/sqlit` +Connections and settings are stored in `~/.sqlit/` by default, but this can be overridden with the `SQLIT_CONFIG_DIR` environment variable. + +E.g., to use the standard `XDG_CONFIG_HOME` directory `~/.config/sqlit/`, you can run with `SQLIT_CONFIG_DIR=~/.config/sqlit sqlit`. It is recommended to throw this in your `~/.bashrc` or equivalent shell configuration, e.g.: -``` +```bash mkdir -p ~/.config/sqlit echo "export SQLIT_CONFIG_DIR=~/.config/sqlit" >> ~/.bashrc ```