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.
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.txtThe MyDB tool provides several commands to interact with the database. Below are the available commands and their descriptions:
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>To remove a key-value pair from the database, use the remove command:
mydb remove <key>To move a key to another key, use the move command:
mydb move <fromKey> <toKey>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> --binaryTo search for keys matching a pattern, use the search command:
mydb search <pattern>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.
This project is licensed under the MIT License. See the LICENSE file for details.