mssql-cmd - Lightweight SQL Server TUI & CLI Tool

Powerful Text User Interface (TUI) for SQL Server database management - cross-platform, no SQL Server client installation required, intuitive command-line interaction with rich terminal-based UI.

Free Trial

See TUI/CLI in Action

Watch how easy it is to manage SQL Server databases with mssql-cmd's interactive TUI and powerful CLI commands.
This demo shows data export, SQL execution, and TUI menu navigation in real-time.

Key Features of Our TUI/CLI Tool

Intuitive TUI Interface

User-friendly Text User Interface with interactive menus, real-time feedback, and syntax highlighting - combines the power of CLI with the usability of graphical interfaces.

No Installation Needed

Extract the zip file and use immediately. No SQL Server client, no DLL files, no system environment configuration required.

Cross-Platform Support

Works seamlessly on Windows, Linux and macOS. Same command syntax and TUI experience across all operating systems.

Full Data Operations

Supports data import (CSV/TSV/TXT/JSON), data export(CSV/TSV/TXT/JSON), SQL script execution, and database connection management via both CLI commands and TUI menus.

High Performance

Lightweight core with optimized data processing algorithms. Fast data import/export with minimal resource consumption in both CLI and TUI modes.

Secure Connection

Supports SQL Server TLS 1.2/1.3 encryption and Windows/Azure AD authentication to protect your database connection in both interactive TUI and scripted CLI usage.

TUI/CLI Usage Examples

1. Launch Interactive TUI Mode

Start the Text User Interface for interactive database management:

mssql-cmd
mssql-cmd> connect sa:Password123!@192.168.0.102:1433/testdb
mssql-cmd> load table=media_messages 
      > datafile=f:\media_messages.txt 
      > filetype=txt 
      > delimiter=, 
      > quote=" 
      > header=y;

Features in TUI mode:

  • Interactive menu navigation with keyboard shortcuts (arrow keys, Enter, Esc)
  • Real-time SQL editor with syntax highlighting
  • Visual progress bars for data import/export operations
  • Searchable database object browser (tables, views, procedures)

2. Run via CLI (Non-Interactive)

Basic connection command with host, port, service name, username and password:

mssql-cmd dsn="sa:Password123!@192.168.0.102:1433/testdb" task=load table=media_messages datafile=f:\media_messages.txt delimiter=, quote=" header=y quit=y

3. Export Data to CSV (TUI/CLI)

Export data from EMP table to CSV file with custom delimiter (works in both modes):

mssql-cmd dsn="sa:Password123!@192.168.0.102:1433/testdb" task=unload table=EMP datafile=e:\temp\tables\emp_data.csv delimiter="," header=y quit=y

Learn:

What People Use It For

There is nothing on this server to connect with

A production or customer machine where installing a SQL Server client is not an option. mssql-cmd is a single executable with no client, no DLLs and no environment configuration - copy it and use the terminal you already have.

A screen in front of SQL Server, not a prompt

Connect, search the tables, views and procedures, and write SQL in an editor with syntax highlighting - results as a table in the same window, over SSH or any terminal.

The same job, but nobody is watching

The whole task - connection, SQL, import or export - passed as parameters in one command, so it can run from a script, a pipeline or a scheduled task.

Rows out to a file, files back into rows

Export a table or a query to CSV, TSV, TXT or JSON, and load a file back in - with the delimiter, quote character and header under your control.

One instruction that works on three systems

The same connection string, the same commands and the same interface on Windows, Linux and macOS - so a runbook or a CI step is written once.

AI wrote the SQL - now it has to run

An assistant can write the script in seconds; running it against the real database - on a server with no client installed, in a script, with a result you can keep - is the part this tool does.

Pricing & Editions

mssql-cmd offers flexible licensing options for individuals and enterprises. All paid editions include full TUI/CLI functionality, ongoing updates and technical support.

Edition Price (USD) License Type Features
Free Trial $0 30-day trial Full TUI/CLI features, limited to 1000 rows per import/export
Full Edition $49.95 Single user Full TUI/CLI features, unlimited rows
Enterprise Edition
(Site License)
$800 Unlimited users Full TUI/CLI features, unlimited rows + priority support
Buy Now Download Trail

Frequently Asked Questions

What is the difference between TUI and CLI modes in mssql-cmd?

CLI (Command Line Interface) mode is for scripted/automated usage with single commands, while TUI (Text User Interface) mode provides an interactive, menu-driven terminal interface with visual feedback, progress indicators, and keyboard navigation - ideal for ad-hoc database management tasks. You can switch between modes based on your workflow needs.

What SQL Server versions does mssql-cmd support?

mssql-cmd supports SQL Server 2012, 2014, 2016, 2017, 2019, 2022, Azure SQL Database, Azure SQL Managed Instance, and SQL Server on Linux. Both TUI and CLI modes work with all editions (Express, Standard, Enterprise).

Do I need to install SQL Server Client on my machine?

No, you don't need to install any SQL Server client software (SQL Server Native Client, ODBC Driver, or sqlcmd). mssql-cmd has a built-in lightweight SQL Server connectivity component that allows direct connection to SQL Server databases without additional client installation - this applies to both TUI and CLI modes.

Can I use TUI mode in remote terminal sessions (SSH)?

Yes, the TUI mode is fully compatible with remote terminal sessions (SSH, Telnet, etc.) on Linux/macOS and Windows Terminal. It works with all standard terminal emulators and supports ANSI escape codes for proper rendering of the text-based interface.

Is my database password secure when using mssql-cmd?

Yes. mssql-cmd does not store your database credentials. In TUI mode, passwords are masked (hidden) when entered, and you can use environment variables or encrypted configuration files to pass credentials in CLI mode. All database connections use SQL Server's native TLS 1.2/1.3 encryption and support Windows/Azure AD authentication when enabled on the server side.