# @ggedde/db-cli

> Database CLI tool for Creating, Copying, and Syncing databases quickly

Latest version **1.2.2** (published 2020-05-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ggedde/db-cli
pnpm add @ggedde/db-cli
yarn add @ggedde/db-cli
bun add @ggedde/db-cli
```

Provides the command `db`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2020-05-09 |
| First published | 2020-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 481.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | https://github.com/ggedde |
| Maintainers | ggedde |
| Keywords | backup, cli, create, database, db, sync |

## Links

- npm: https://www.npmjs.com/package/@ggedde/db-cli
- Repository: https://github.com/ggedde/db-cli
- Homepage: https://github.com/ggedde/db-cli#readme
- Issues: https://github.com/ggedde/db-cli/issues
- npm.io page: https://npm.io/package/@ggedde/db-cli

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.2.2 (latest) — 2020-05-09
- 1.2.1 — 2020-05-09
- 1.2.0 — 2020-05-09
- 1.1.1 — 2020-05-09
- 1.1.0 — 2020-05-09
- 1.0.7 — 2020-05-09
- 1.0.6 — 2020-05-09
- 1.0.4 — 2020-05-09
- 1.0.3 — 2020-05-09
- 1.0.2 — 2020-05-09
- 1.0.1 — 2020-05-09
- 1.0.0 — 2020-05-09

## README

# db-cli

![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/ggedde/dbcli) &nbsp; ![GitHub](https://img.shields.io/github/license/ggedde/dbcli?label=license)


#### Database CLI tool for Creating, Copying, and Syncing databases quickly. It can create local databases, copy local or remote database or copy remote to local databases. It cannot write to remote databases. It uses Project Config Files to store the settings for each project. Prject Config files and Backups will be stored in ~/.dbcli

\* Currently only supports mysql and mariadb  
\* All Databases are collated as utf8mb4_unicode_ci  

![db-cli gif](db-cli.gif)

# Installation
    npm i --global @ggedde/db-cli

Test that the CLI is working and see what Version it is
    
    db -v

See Help
    
    db -h

*\* If it does not work then you might need to add the global path to your $PATH*


### db copy [-o] [project_config_file]

&nbsp; &nbsp; Copies Remote Database to Local Database using the project_config_file.  
&nbsp; &nbsp; Local Database will be backup before getting overwritten

&nbsp; &nbsp; -o &nbsp; Omits the backup files. Use only if you are sure you will not need to revert back.


### db backup [-l | -r] [project_config_file]

&nbsp; &nbsp; Backsup databases from both local and remote

&nbsp; &nbsp; -l &nbsp; Backup local database Only  
&nbsp; &nbsp; -r &nbsp; Backup remote database Only


### db add [project_config_file]

&nbsp; &nbsp; Adds a new project_config_file, but does not create a local database


### db create [-a] [project_config_file]

&nbsp; &nbsp; Creates a new database on your localhost

&nbsp; &nbsp; -a &nbsp; Also add a new project_config_file


### db list

&nbsp; &nbsp; List all Project Config Files in the Databases Folder


### db backups

&nbsp; &nbsp; List all Backup Files in the Backups Folder

---
_Source: https://npm.io/package/@ggedde/db-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
