Skip to content
radix29Public

About

SQL Server Management Studio macOS, Linux, Windows

Topics

Resources

Stars

15 stars

Watchers

2 watching

Forks

Repository files navigation

goSSMS
SQL Server management for Linux, macOS, and Windows

goSSMS

Last commit License Release Go Reference Minimum Go version Latest release Discord

goSSMS is a terminal-based SQL Server management application. It is distributed as a single executable and does not require an installer, SQL client tools, or separate database drivers.

Demo

Installation

1. Install goSSMS

Homebrew — macOS and Linux

brew install radix29/tap/gossms

Apple silicon and Intel; brew upgrade gossms tracks new releases.

APT — Debian, Ubuntu and derivatives

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://radix29.github.io/apt/gossms.asc \
  | sudo tee /etc/apt/keyrings/gossms.asc > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/gossms.asc] https://radix29.github.io/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/gossms.list > /dev/null
sudo apt-get update && sudo apt-get install gossms

amd64 and arm64. Details at radix29.github.io/apt.

Direct download

Download the latest release for your platform:

https://github.com/radix29/gossms/releases/latest

Release binaries are available for:

  • Windows (amd64 and arm64)
  • Linux (amd64 and arm64)
  • macOS (Apple silicon/arm64 and Intel/amd64)

Extract the downloaded archive before running the application.

The binaries themselves are not signed for Windows SmartScreen or macOS Gatekeeper, so those will warn on first run. Integrity is covered instead by checksums.txt, published with every release and signed by the release workflow with cosign in keyless mode:

sha256sum -c --ignore-missing checksums.txt
cosign verify-blob \
  --bundle checksums.txt.bundle \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity-regexp '^https://github\.com/radix29/gossms/\.github/workflows/release\.yml@' \
  checksums.txt

Packages installed through Homebrew or APT are covered without any of this: Homebrew checks the formula's sha256, and APT checks the repository's GPG-signed Release file.

2. Start goSSMS

Installed through Homebrew or APT, gossms is already on your PATH:

gossms

On Linux, both also add a goSSMS entry to the desktop's application menu, which opens it in a terminal.

Otherwise, on Windows, open PowerShell in the extracted folder and run:

.\gossms.exe

On Linux or macOS, open a terminal in the extracted folder and run:

chmod +x ./gossms
./gossms

gossms --version prints the version, commit, build date and licence and exits, without starting the interface — quote it when reporting a bug.

Any other argument runs the command-line mode instead of the interface (start with gossms help; see Command line); bare gossms needs a terminal on both stdin and stdout.

You need a modern terminal with UTF-8 and 256-colour support, plus network access to a SQL Server instance.

3. Connect to SQL Server

The Connect to Server dialog opens at startup. History (left) lists saved connections, most recent first; select one and press Enter to connect. Below about 96 columns History is hidden and the form fills the dialog.

The form has two tabs, Connection Properties and Connection String (Ctrl+PgUp/PgDn). Reset restores defaults; Delete removes the selected history entry and its saved password; Profile... names it for the command line. Tab reaches the buttons after the last field; Left/Right move along them.

Choose SQL Server, Windows Integrated, or a Microsoft Entra ID method. Fields the method does not use are greyed out.

  • Server Name: host, host,1500, host:1500 or host\instance. Give no port for a named instance, so SQL Browser resolves it. IPv6: fe80::1 or [fe80::1]:1433.
  • Remember Password: off by default; the password is saved to config.json only when ticked.
  • Encryption: Mandatory with Trust Server Certificate off by default, so the server must present a trusted certificate matching its hostname. Enable it only for trusted development environments: it disables server certificate validation. Existing saved connections keep their setting. Strict (TDS 8.0) needs SQL Server 2022+ or Azure SQL Managed Instance. On Windows and macOS, setting SSL_CERT_FILE or SSL_CERT_DIR (Python and some corporate images do) makes validation, including Entra sign-in, use those files instead of the system certificate store, so a CA trusted only there fails with certificate signed by unknown authority. Unset the variable, or start goSSMS with GODEBUG=x509sslcertoverrideplatform=0.
  • Custom Properties: extra driver settings as key=value pairs separated by ; or &, e.g. ApplicationIntent=ReadOnly. SSMS's spellings work too (Application Intent=ReadOnly, Multi Subnet Failover=True); giving both spellings of one setting is refused.
Entra method Fields
MFA Browser sign-in; User is an optional hint.
Device Code Code entered on any device; for SSH or no browser.
Password User and Password. No MFA; deprecated.
Service Principal Client ID and secret in Password.
Managed Identity Client ID for user-assigned; blank for system-assigned.
Default Environment, managed identity, then Azure CLI.
Azure CLI The account az login signed in.

Sessions appear on the server as goSSMS, goSSMS - Query and goSSMS - Activity Monitor.

Always On peer discovery uses each replica's registered connection: one you have connected to through File > Connect or the prompt below. A unique short-name alias still uses the original saved address; ambiguous aliases are refused. Where a dialog or action needs a replica with no saved connection (Add Replica, New Availability Group, New Endpoint, the availability group and listener Properties pages, Add Database, Add Listener, failover and the other group actions, a group's Dashboard, or Enter on Object Explorer's "(partial — Enter to connect to …)" note), goSSMS opens the Connect dialog for it, pre-filled from the connection you started from; nothing is sent to that instance until you press Connect. A failed peer connection never retries with another server's credentials.

Object Explorer

Group by Schema (View menu, Alt+G, or the button at the right end of the Object Explorer title: [⋮] flat, [Σ] grouped) lists Tables, Views, Synonyms, Stored Procedures, Functions and Sequences under one node per schema, as SSMS does, and so do the System, File, External and Graph Tables folders, the System Views, Procedures and Functions folders, and the User-Defined Data Types, Table Types, Types and XML Schema Collections folders. It applies to every connected server, keeps expanded nodes open, and is off at each start. Names keep their schema. prefix; dragging a schema node into a query inserts [schema].

Double-click a row in the Object Explorer Details pane to navigate into that object. Right-click a folder to create a Schema, Database Role, Application Role, Server Role, Sequence or Synonym; each dialog checks your permissions first. In a result grid, double-click a cell for Show Value and click a row number to select the row; right-click the blank cell above the row numbers (or any cell, or use File > Export Results) to export the result set on screen, in the order shown, to a CSV, tab-separated, JSON or XML file. Show Value on a varbinary/image cell that holds a picture (PNG, JPEG, GIF, BMP, TIFF or WebP) opens it in its own tab as terminal art, with fit, zoom, pan and Save; pictures render in Unicode block sextants, with an ASCII mode for fonts that lack them. Press F1 for the full keyboard reference.

Supported SQL Server versions

goSSMS supports SQL Server 2016 SP1 (13.0.4001) and later on Windows and Linux, and Azure SQL Managed Instance. Features that are unavailable on the connected SQL Server version or engine edition are hidden or disabled. An older instance still connects, with a warning that some folders and dialogs will fail.

Required rights

goSSMS adds no privileges: each action needs the same permission it would in other clients. Connecting needs CONNECT SQL; listing databases may need VIEW ANY DATABASE. Live data such as Activity Monitor and Live Query Statistics needs VIEW SERVER STATE (on SQL Server 2022+, VIEW SERVER PERFORMANCE STATE or VIEW SERVER SECURITY STATE); without it a query still runs and returns its actual plan, but shows no live view.

Where a permission is missing, the action is disabled, the page opens read-only, or values show as N/A.

Command line

gossms <group> <command> [arguments] [options] runs one command and exits, without the interface: for scripts and AI agents. Results go to stdout as text or, with -o json, a JSON envelope; errors too, with a one-line summary on stderr and an exit code that names the failure (docs/cli.md has the whole contract). gossms help lists the commands; gossms help <group> <command> shows one with examples.

The command line connects through profiles: saved connections you name in the interface. In the Connect dialog select a connection under History, choose Profile..., and give it a name (dev, prod-ro) and the Allowed Operations — the highest class of statement the command line may run through it (Read, Write, DDL or Admin, the default). A named connection shows its name in History, is never dropped from the 30-entry list, and keeps its name when you reconnect.

gossms profile list                  # named profiles; --all adds recent connections
gossms profile show dev              # its settings, ceiling, whether its password opens
gossms profile test dev              # connect: version, edition, login, latency
gossms profile test dev -d master -o json

The command line only reads the configuration: it never writes config.json or creates the key file, so it is safe to run beside the interface. A profile's saved password (Remember Password) is used as the interface uses it. Passwords are never taken on the command line itself — for a profile without one, pass --password-env <VAR> (the name of a variable holding it) or --password-stdin. Overriding the server, port, login, authentication or Entra tenant/client, or weakening encryption, does not send the saved password. Entra MFA and Device Code prompt, so the command line refuses them; use Entra Default, Azure CLI, Service Principal or Managed Identity.

query runs T-SQL. Every script is classified first — read, write, ddl or admin — and refused before anything connects when it is above --allow (default read) or the profile's Allowed Operations:

gossms query run -p dev -Q "SELECT TOP 5 name FROM sys.tables"
cat fix.sql | gossms query run -p dev --file - --allow write --transaction rollback  # measure, keep nothing
gossms query run -p dev --file fix.sql --allow write --max-rows-affected 10          # commit only if ≤ 10 rows
gossms query run -p dev --file by-id.sql --param id=42:int                           # through sp_executesql
gossms query run -p dev --file big.sql --out-file rows.csv                           # every row, no limits
gossms query classify --file fix.sql                                                 # the class, no server
gossms query parse -p dev --file fix.sql                                             # syntax only

db and object read the catalog — what a database holds, how an object is built, what depends on it — without writing T-SQL:

gossms db list -p dev                              # databases: state, recovery, sizes
gossms object list -p dev -d Sales --type table    # one database's tables
gossms object search -p dev Customer --in column   # columns named like it
gossms object describe -p dev Sales.Customer       # columns, keys, indexes, triggers
gossms object definition -p dev dbo.uspGetOrders   # a module's T-SQL
gossms object dependencies -p dev Sales.Customer --depth 2

Sizes come as sp_spaceused and the log DMVs report them, with warnings for what is worth a look (a file under 10 % free, a log that cannot be reused, a volume running out):

gossms db files -p dev --all --max-free-pct 10     # files nearly full, every database
gossms db space -p dev Sales --unit gb             # sp_spaceused's summary + log usage
gossms db log-usage -p dev --all                   # log used %, reuse wait, VLFs
gossms db table-sizes -p dev Sales --top 10        # largest tables
gossms server volumes -p dev                       # free space per disk

server reads the instance — facts, memory, the error log, trace flags and the sp_configure settings beside their engine defaults — and changes settings, trace flags and database options through the same --allow: each change needs --allow admin, --dry-run prints the exact T-SQL without running it, and a real run reports before and after as the server reads them back:

gossms server info -p dev                                          # version, uptime, CPUs, memory
gossms server config list -p dev --non-default                     # what differs from the defaults
gossms server config set -p dev maxdop 4 cost-threshold 50 --allow admin --dry-run
gossms server config set -p dev max-memory 12GB --allow admin      # blocked above physical memory
gossms server log -p dev --search Login --search failed --since 2026-10-27
gossms db set -p dev Sales --option RECOVERY=FULL --allow admin

plan returns a query's execution plan as a digest — costliest operators, missing indexes, warnings, estimated against actual rows — or as the .sqlplan the plan viewer opens; script answers Object Explorer's Script As text; data reads, profiles, exports and loads table rows:

gossms plan estimated -p dev --file slow.sql                       # compiles, runs nothing
gossms plan actual -p dev --file slow.sql --transaction rollback   # runs it, keeps nothing
gossms script object -p dev Sales.Customer --as create             # the TUI's Script As text
gossms script db -p dev Sales --objects --include-permissions       # the TUI's Generate Scripts...
gossms data top -p dev Sales.Customer --rows 20 --columns CustomerID,AccountNumber
gossms data profile -p dev Sales.Customer                          # nulls, distinct, min/max per column
gossms data export -p dev Sales.Customer --out-file customers.jsonl
gossms data import -p dev Staging.Customer --in-file customers.jsonl --allow write  # bulk copy, all or nothing

monitor shows what the server is doing — sessions, blocking chains, waits, the costliest cached statements and their plans, Query Store's history and system_health's deadlocks — and ends a session; xevent capture records events for a fixed time in a short-lived event session it always drops:

gossms monitor blocking -p dev                                     # head blockers and their chains
gossms monitor waits --interval 10 -p dev                          # what it waits on now
gossms monitor top-queries --by cpu --top 10 -p dev                # then plan cached <plan_handle>
gossms monitor querystore -p dev -d Sales --regressed              # slower in the last 24 hours
gossms monitor deadlocks --deadlock-file ./deadlocks -p dev        # .xdl graphs SSMS opens
gossms monitor kill 87 --confirm 87 --allow admin -p dev           # the spid, twice
gossms xevent capture --template batches --duration 60 --allow admin -p dev

They need VIEW SERVER STATE (Query Store: VIEW DATABASE STATE) and say so with exit 9 rather than answering an empty list.

security, job, maint and db create/drop are the administration: logins, users, roles and permissions; SQL Server Agent jobs; backup, restore, consistency checks, index and statistics maintenance. Each change is admin (index rebuilds and statistics: ddl) with a --dry-run, and whatever overwrites or destroys — dropping a database, restoring over one, backup --init — also needs --confirm with its name:

gossms security permissions report_reader -p dev -d Sales          # explicit grants; --effective
gossms security grant SELECT --on SCHEMA::Sales --to report_reader -p dev -d Sales --allow admin --dry-run
gossms job history nightly_etl --failed -p dev                     # failed runs and their messages
gossms job start nightly_etl --wait 600 --allow admin -p dev       # start, wait for the outcome
gossms maint backup Sales --copy-only --checksum --allow admin -p dev
gossms maint restore Sales_copy --from /var/opt/mssql/backup/Sales.bak --move-to-default --allow admin -p dev
gossms maint index-fragmentation -p dev -d Sales                   # with a rebuild/reorganize suggestion
gossms maint checkdb Sales --allow admin -p dev                    # corruption: a warning, never a repair

Every call above read, and every refusal, appends one line to the audit log, audit.jsonl beside config.json — T-SQL hashed, never a password. It is always on, and a change it cannot record is refused.

For an AI agent, gossms agent guide --brief -p dev is the manual to put in its system prompt — rules, output contract, the command index, and what the profile's login can see; gossms agent schema is the same catalog as JSON to build tool definitions from.

Output is text (default), json, jsonl, csv, tsv or markdown (-o); stdout is capped (--max-rows, --max-col-width, --max-output-bytes) and says when it was cut. The classifier is a guardrail, not the security boundary: give an agent's profile a login with only the rights it needs.

Configuration

Settings and the 30 most recent connections (named profiles are kept on top of those) are saved automatically in:

  • Linux/macOS: ~/.config/gossms/config.json
  • Windows: %APPDATA%\gossms\config.json

Tools > Options sets icon style, color theme (Dark, the default, Light, mc — blue panels, grey dialogs and cyan menus after mc's default skin in a modern terminal's colours — or mc - retro, the same skin in the original VGA colours), the default SQL style for Edit > Format Document (Standard upper-cases keywords; Lowercase lower-cases them, puts FROM, WHERE, GROUP BY, HAVING and ORDER BY alone on their lines with the joins indented under FROM, and writes expr AS name as name = expr — the Edit menu's cascade formats once in either), grid and text column widths, indent size, Max fetch rows (rows kept per result set in grid, text and file mode, 0 = unlimited; reaching it cancels the rest of the script, later GO batches included, and the results status line says so) and IntelliSense. Unsaved query tabs are recovered to the recovered folder beside config.json after a crash.

Saved passwords are encrypted with AES-256-GCM using gossms.key in the same folder; delete both files to reset. Editing a connection's server, port, user, authentication or encryption settings by hand invalidates its saved password.

Links

License

goSSMS is © 2026 radix29 and licensed under GPL-3.0-or-later. The bundled sp_WhoIsActive is © 2007–2026 Adam Machanic and retains its own GPL-3.0 copyright.

About

SQL Server Management Studio macOS, Linux, Windows

Topics

Resources

Stars

15 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages