Hive Shell is a specialized auxiliary development tool tailored for Flutter developers who leverage Hive as their local data storage solution. The tool provides an intuitive command-line interface, enabling developers to interact in real-time with their Hive boxes without the need for additional scripts, enhancing their development flow.
-
Simplified Command-Line Interface: With straightforward and intuitive commands, developers can quickly inspect, modify, or analyze the data stored in their Hive boxes.
-
Agile Development: Eradicates the need for separate scripts to inspect or modify boxes, delivering a faster and more efficient development cycle.
-
Developer-Centric: Designed with Flutter app developers in mind, Hive Shell is attuned to the specific challenges and needs faced when working with Hive, streamlining the entire process.
While Hive Shell provides a streamlined interface, it assumes that developers have familiarity with their data structures and the names of the boxes they wish to interact with. This knowledge empowers developers to swiftly access and modify their Hive boxes, simplifying the development and debugging processes.
--version
or-v
: Displays the version of Hive Shell.
hshell --version
--help
or-h
: Displays the available commands and their descriptions.
hshell --help
-
Add Data:
- Usage:
hshell --path=<path_to_hive_file> add --key=<key_name> --value=<value>
- Usage:
-
Update Data:
- Usage:
hshell --path=<path_to_hive_file> update --key=<key_name> --value=<new_value>
- Usage:
-
Delete Data:
- Usage:
hshell --path=<path_to_hive_file> delete --key=<key_name>
- Usage:
-
List Data:
- Usage:
hshell --path=<path_to_hive_file> datas
- Usage:
-
Backup Hive Box:
- Usage:
hshell --path=<path_to_hive_file> backup --destination=<backup_location>
- Usage:
-
Restore from Backup:
- Usage:
hshell --path=<path_to_hive_file> restore --source=<backup_file_location>
- Usage:
-
The tool uses
adb
(Android Debug Bridge) to interact with devices. Therefore, ensure you haveadb
installed and accessible from your command line. -
Restoring from a backup currently replaces the original box file entirely. Future implementations may allow for a merge approach, where developers can determine how data should merge in the case of conflicts between the backup and the original data.
-
While working with the tool, make sure you are providing the correct box path, especially when using operations that modify data, to prevent unintended data loss.
Hive Shell is a powerful utility for developers working with Hive in their Flutter applications. By integrating this tool into their workflow, developers can ensure a smoother and more efficient development process.