Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dgoguerra/sql-cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dgoguerra/sql-cli

Universal command-line interface for SQL databases

  • 1.3.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
Maintainers
1
Weekly downloads
 
Created
Source

sql-cli

Universal command-line interface for SQL databases. Built on top of Knex. Supports connecting over SSH.

Installation

Install with:

npm install -g @dgoguerra/sql-cli

Usage

The supported commands are:

sql <command>

Commands:
  sql list <conn>             List tables                          [aliases: ls]
  sql show <table>            Show table structure
  sql diff <table1> <table2>  Diff two schemas or tables
  sql export <conn>           Export the connection's schema or data in XLSX
  sql open <conn>             Open in configured GUI (such as TablePlus)
  sql shell <conn>            Run REPL shell                       [aliases: sh]
  sql alias <action>          Manage saved connection aliases
  sql dump <action>           Manage connection dumps

Options:
  --client, -c  Knex client adapter                                     [string]
  --version     Show version number                                    [boolean]
  -h, --help    Show help                                              [boolean]

Run sql [command] --help to see any command usage info.

View database contents

The list and show commands allow viewing the structure of a database.

Save connection aliases

Aliases can be created for known connections, and used instead of the full connection URI.

Diff databases

The diff command allows comparing two schemas or tables, in the same or different connections.

Create and load dumps

Generic dumps can be created from a connection and loaded to another supported database.

A dump file can also be accessed as a database. It will be loaded to an in-memory SQLite database, where it can be queried as a database.

Keywords

FAQs

Package last updated on 02 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc