cxsql is a mouse-first SQL terminal client for people who want a practical database workspace without leaving the terminal. It combines saved connections, an object explorer, SQL editor tabs, result grids, table metadata, query history, CSV export, and copy workflows in a cross-platform TUI.
- Connect to SQLite, PostgreSQL, SQL Server, and MySQL.
- Save connection profiles locally as JSON.
- Browse database objects in a left-side explorer.
- Double-click tables and views to preview data.
- Open table details for structure, constraints, indexes, triggers, and DDL.
- Run SQL in tabbed editors with syntax highlighting and completion.
- Work with results in a sortable, filterable grid.
- Generate SQL from result-grid column sort and filter actions.
- Export visible result data to CSV or copy it as tab-delimited text.
- Review and reload previous queries from local history.
dotnet tool install --global cxsql
cxsqlStart cxsql, create or open a connection, then use the object tree and editor
together:
- Double-click a saved connection to open it.
- Double-click a table or view to run a preview query.
- Right-click a table or view and choose
Open Detailsto inspect metadata. - Right-click a result-grid header to sort or build a SQL filter.
- Use the
ResultGridactions to export CSV, copy all rows, or clear filters. - Use
F5to execute the active SQL editor.
cxsql keeps runtime diagnostics out of the interactive TUI. Warning and error
logs are written under ~/.cxsql/logs using a per-startup file name such as
cxsql-20260629-143015.log.
At startup, cxsql automatically deletes its own log files older than 30 days.
dotnet tool restore
dotnet build cxsql.slnx
dotnet test cxsql.slnxDatabase provider integration tests use a local Docker engine to start isolated MySQL, PostgreSQL, and SQL Server containers. SQLite uses a temporary file:
dotnet test tests/cxsql.IntegrationTests/cxsql.IntegrationTests.csprojdotnet run --project src/cxsql/cxsql.csprojdotnet tool run csharpier -- check .
dotnet tool run csharpier -- format .The Publish GitHub Actions workflow runs from version tags and manual
dispatches. It builds Native AOT dotnet-tool packages with the multi-RID
package pattern:
- platform-specific packages:
dotnet pack -p:ToolType=aot --use-current-runtime - agnostic package:
dotnet pack -p:ToolType=aot - collected artifact:
all-aot-packages
Publishing to nuget.org uses OIDC through NuGet/login@v1. Configure NuGet
trusted publishing for the repository and the BigDream nuget.org account.