hive_manipulator 1.0.0
hive_manipulator: ^1.0.0 copied to clipboard
A command-line tool for inspecting and manipulating local Hive box files.
Hive Manipulator #
A small command-line tool for inspecting and manipulating local Hive box files (.hive).
This repository provides a simple CLI entrypoint at bin/hive_manipulator.dart and example Hive files under the hives/ folder so you can debug, export, or verify Hive box contents.
Features #
- List Hive boxes found in a directory
- Export/import box contents (JSON-friendly formats)
- Run verification checks against packed
.hivefiles inhives/
Prerequisites #
- Dart SDK (stable channel)
Setup #
- Clone the repository and open the project root:
git clone <repo-url>
cd hive_manipulator
- Install dependencies:
dart pub get
Usage #
Show help for the CLI (recommended):
dart run ./bin/hive_manipulator.dart --help
Examples from this repository:
List boxes (example):
dart run ./bin/hive_manipulator.dart -c list
Run the included verification tests (project test suite):
dart test
Notes:
- Example Hive files are stored under
hives/(for examplehives/flutter_smartbox_blocstorage/hydrated_box.hive). - Use
--helpto discover available commands and flags supported by the CLI.
Contributing #
- Open issues for bugs or feature ideas.
- Add unit tests to the
test/folder and rundart testbefore opening a PR.
Troubleshooting #
- If packages are missing, run
dart pub getfrom the repository root. - If the CLI can't open a Hive file, verify the path and file permissions.
Assumptions #
- This README assumes the tool is run with the Dart SDK directly (no packaged native binary).
If you'd like, I can also extract the exact CLI flags from the source and add an expanded "Commands" section with flag descriptions.
Commands #
The CLI exposes the following commands (run --help for detailed usage):
read <key>— Read a value for the given key and print it.write <key> <value>— Write a value for the given key. The command verifies the write by reading back the value. Use-y/--yesto auto-confirm writes.delete <key>— Delete the given key from the box.list— List all key/value pairs in the box.
Global flags (apply to all commands):
--path, -p— Hive storage path (defaults to.)--box, -b— Hive box name (defaults tohydrated_box)--createIfEmpty, -c— Create the box/path if it does not exist