Hive Inspector
Hive Inspector is a lightweight Flutter DevTool that helps developers inspect, search, and debug Hive / hive_ce boxes at runtime. It is designed for debug and development builds to quickly view local database data without creating custom UI.
โจ Features
- ๐ View all opened Hive boxes
- ๐ Search keys and values inside a box
- ๐ Delete individual entries
- ๐ View box metadata (name & item count)
- โก Works with
hive_ce - ๐งช Safe for debug builds
- ๐งฉ Simple plug-and-play widget
Screenshot

๐ฆ Installation
Add this to your pubspec.yaml:
dependencies:
hive_inspector: ^0.0.1
Then Run
flutter pub get
โ๏ธ Requirements
- Flutter 3.x+
hive_cehive_ce_flutter(for Flutter apps)
๐ Usage (Basic)
1๏ธโฃ Initialize Hive
import 'package:hive_ce_flutter/hive_ce_flutter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Hive.initFlutter();
}
2๏ธโฃ Open boxes using HiveService
โ Important: Inspector can only see boxes opened via
HiveService.openBox()
import 'package:hive_inspector/src/services/hive_service.dart';
final demoBox = await HiveService.openBox('demoBox');
demoBox.put('name', 'Bookz');
demoBox.put('count', 5);
3๏ธโฃ Launch Hive Inspector
import 'package:hive_inspector/hive_inspector.dart'; runApp(const HiveInspector());
๐งช Full Example App
This is exactly how the example app inside the package works.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:hive_ce_flutter/hive_ce_flutter.dart';
import 'package:hive_inspector/hive_inspector.dart';
import 'package:hive_inspector/src/services/hive_service.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Hive.initFlutter();
final demoBox = await HiveService.openBox('demoBox');
await HiveService.openBox('userBox');
demoBox.put('name', 'Bookz');
demoBox.put('count', 5);
demoBox.put('data', {'a': 1, 'b': true});
runApp(const HiveInspector());
}
Run example:
flutter run
๐ Debug-Only Usage (Recommended)
Do not ship inspector in production builds.
import 'package:flutter/foundation.dart';
if (kDebugMode) {
runApp(const HiveInspector());
}
โ ๏ธ Important Notes
- Hive does not provide a public API to list all boxes
- This package tracks boxes opened via
HiveService - Avoid using in release builds
- Do not store secrets in Hive during debugging
โ Limitations
- Closed boxes are not auto-discovered
- Editing values is not supported (yet)
- Read-only debugging tool (safe by design)
๐งญ Roadmap
- โ๏ธ Edit values
- ๐ค Export box to JSON
- โ Open box by name from UI
- ๐ Password-protected inspector
- ๐งฉ Flutter DevTools extension
๐ค Contributing
Contributions, issues, and feature requests are welcome! Feel free to open a PR or issue.
๐ License
MIT License ยฉ 2026 Free to use in personal and commercial projects.
โญ Support
If you find this package useful, please give it a โญ on GitHub and share feedback to help improve it.