Registry / database / run-sql-cli

run-sql-cli

JSON →
library0.1.1jsnpmunverified

CLI tool that reads a SQL file and executes the query against a specified MySQL database. Current stable version is 0.1.1 (last published in 2017). This package is a simple global command-line utility for running SQL scripts during development or database resets. It differs from similar tools like 'mysql' CLI by providing a straightforward npm-based installation and a focused set of options. However, it has no updates in years, relies on outdated dependencies, and only supports MySQL.

npm install run-sql-cli
INSTALL
IMPORT
SIG · RUN-SQL-CLI
R
run-sql-cli
databasejavascriptv0.1.1
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.

CLI tool (run-sql)
npm install -g run-sql-cli
npm install run-sql-cli --save
Must be installed globally for CLI usage. Not importable in code.
Programmatic use
No programmatic API; only CLI.
import runSql from 'run-sql-cli'
This package is CLI-only; cannot be imported as a module.

Install globally and run a SQL file against a MySQL database with required credentials.

npm install -g run-sql-cli run-sql ./schema.sql --user=root --password=root --database=my_db
Debug
Known issues
deprecatedPackage is unmaintained since 2017.
fix
Consider using mysql2 CLI or direct database client.
affects: >=0.1.1
gotchaOnly supports MySQL; no support for PostgreSQL, SQLite, etc.
fix
Switch to database-specific CLI tool for other databases.
affects: >=0.0.0
gotchaRequires global installation with -g flag; local install does not expose command.
fix
Use npm install -g run-sql-cli
affects: >=0.0.0
Errors
Common errors & fixes
bash: run-sql: command not found
Package not installed globally or PATH not set.
fix
Run: npm install -g run-sql-cli  (or add node_modules/.bin to PATH if installing locally)
Error: Cannot find module 'mysql'
Outdated or missing dependency.
fix
Reinstall package: npm install -g run-sql-cli
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
mysqlrequiredRequired for MySQL database connection
commanderrequiredUsed for command-line argument parsing
Agent activity
9 hits · last 30 days
node
8
Resources
run-sql-cli — npm install run-sql-cli · libregistry