Registry / database / sql-cli

sql-cli

JSON →
library0.6.2jsnpmunverified

Command-line interface for SQL Server that provides an interactive shell with .commands (e.g., .databases, .tables, .search) and mssql binary for ad-hoc queries. Current version 0.6.2, minimal releases since 2016. Designed for cross-platform usage with options for TDS version, encryption, and output format. Unlike general SQL CLIs (e.g., pgcli), it is SQL Server-specific, using the TDS protocol via tedious.

npm install sql-cli
INSTALL
IMPORT
SIG · SQL-CLI
S
sql-cli
databasejavascriptv0.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mssql (binary)
npm install -g sql-cli
npm install sql-cli --no-save
Package provides a global CLI tool; local install not recommended.

Install globally, connect to SQL Server, and use interactive shell commands.

npm install -g sql-cli # Connect to Azure SQL Database mssql -s server.database.windows.net -u user@server -p 'password' -d mydatabase -e # Inside shell, list databases: .databases # Run a query: SELECT * FROM sys.tables; # Exit: .quit
Debug
Known issues
breakingNo longer updated: Last release in 2016, Node.js >= 4.6 required.
fix
Consider alternatives like mssql-cli or sqlcmd.
affects: >=0.1.0 <=0.6.2
gotchaRequires TDS protocol configuration; incorrect -v may cause connection failures.
fix
Use -v 7_4 for most modern SQL Server instances.
affects: >=0.1.0
gotchaPassword in command line is visible in process list.
fix
Use environment variable MSSQL_PASS or config file (-c).
affects: >=0.1.0
Errors
Common errors & fixes
mssql: command not found
Package not installed globally or not in PATH.
fix
Run `npm install -g sql-cli` and ensure npm global bin directory is in PATH.
ConnectionError: Failed to connect to server
Network issue, wrong credentials, or firewall blocking port 1433.
fix
Check server address, username, password, and that port 1433 is open.
Upgrade
Version history
0.6.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Meta
1
OpenAI (training)
1
Resources
sql-cli — npm install sql-cli · libregistry