Skip to content

keepworking/mydb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyDB Command-Line Tool

MyDB is a command-line key-value database application that allows you to perform various operations on a local SQLite database. It provides commands to add, remove, move, get, and search for key-value pairs.

Installation

To install MyDB, clone the repository and navigate to the project directory. Then, run the following command to install the necessary dependencies:

pip install -r requirements.txt

Usage

The MyDB tool provides several commands to interact with the database. Below are the available commands and their descriptions:

Add a Key-Value Pair

To add a key-value pair to the database, use the add command:

mydb add <key> <value>

You can also provide the value via standard input:

echo "value" | mydb add <key>

Remove a Key-Value Pair

To remove a key-value pair from the database, use the remove command:

mydb remove <key>

Move a Key to Another Key

To move a key to another key, use the move command:

mydb move <fromKey> <toKey>

Get a Key-Value Pair

To retrieve a value for a given key, use the get command:

mydb get <key>

If the value is binary, use the --binary option to output it to a file:

mydb get <key> --binary

Search for Keys

To search for keys matching a pattern, use the search command:

mydb search <pattern>

SSH Redirection

MyDB supports command redirection over SSH if configured. To enable this feature, set the mydb.config.redirect key to true and specify the SSH target in mydb.config.sshTarget.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published