CLI for SQL Server Database. With auto-completion and syntax highlighting.
mssql-cli supports a rich interactive command line experience, with features such as:
- Auto-completion: fewer keystrokes needed to complete complicated queries.
- Syntax highlighting: highlights T-SQL keywords.
- Query history: easily complete an auto-suggested query that was previously executed.
- Configuration file support: customize the mssql-cli experience for your needs.
- Multi-line queries: execute multiple queries at once using the multi-line edit mode.
- Non-interactive support: execute a query without jumping into the interactive experience.
Read the section below to quickly get started with mssql-cli. Consult the usage guide for a deeper dive into mssql-cli features.
Visit the installation reference guide to view all supported releases and downloads.
Install with Linux Package Manager
Follow the Linux installation instructions to install mssql-cli using
yum, and other Linux package managers.
Install with pip
python -m pip install mssql-cli
Please refer to the pip installation docs for more platform-specific information.
Connect to Server
Complete the command below to connect to your server:
mssql-cli -S <server URL> -d <database name> -U <username> -P <password>
Press Ctrl+D or type
For general help content, pass in the
The mssql-cli tool includes a telemetry feature. Please refer to the telemetry guide for more information.
If you would like to contribute to the project, please refer to the development guide.
If you encounter any bugs or would like to leave a feature request, please file an issue in the Issues section of our GitHub repo.
Code of Conduct
mssql-cli is licensed under the BSD-3 license.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size mssql_cli-1.0.0-py2.py3-none-macosx_10_11_intel.whl (42.4 MB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size mssql_cli-1.0.0-py2.py3-none-manylinux1_x86_64.whl (43.4 MB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size mssql_cli-1.0.0-py2.py3-none-win32.whl (42.3 MB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size mssql_cli-1.0.0-py2.py3-none-win_amd64.whl (45.1 MB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
Hashes for mssql_cli-1.0.0-py2.py3-none-macosx_10_11_intel.whl
Hashes for mssql_cli-1.0.0-py2.py3-none-manylinux1_x86_64.whl
Hashes for mssql_cli-1.0.0-py2.py3-none-win32.whl
Hashes for mssql_cli-1.0.0-py2.py3-none-win_amd64.whl