Skip to main content

data_tree 1.0.9 copy "data_tree: ^1.0.9" to clipboard
data_tree: ^1.0.9 copied to clipboard

A powerful CLI tool that automatically reads Flutter app storage using ADB and prints GetStorage, SharedPreferences, and app data files as a clean ASCII tree in the terminal. Designed for debugging [...]

πŸ“¦ data_tree β€” Flutter Storage Inspector (CLI)

data_tree is a powerful command-line tool that lets you instantly inspect Flutter local storage (GetStorage, SharedPreferences, SQLite, and app Files) directly from your Android device/emulator.

It prints clean ASCII trees (similar to Linux "tree") so you can debug your app’s local data without writing UI code or printing logs.

data_tree does EVERYTHING with one command:

data-tree

============================ ✨ Features #

πŸ” Automatic Debug App Detection

  • Detects Flutter debug apps using run-as
  • Shows an interactive package selector
  • No --package needed
  • Never selects wrong system apps

πŸ“š Supports Multiple Storage Types

Storage Type Support Details
SharedPreferences YES Parses XML β†’ JSON
GetStorage YES Reads JSON files under /files
Files (/files) YES Reads JSON, text, logs, nested dirs
app_flutter YES Reads plugin storage files
SQLite Databases YES Lists DB files
Hive Planned Will decode boxes
SecureStorage No OS-encrypted

============================ 🌳 ASCII Tree Output Example #

SharedPreferences Example:

└── SharedPreferences β”œβ”€β”€ auth β”‚ β”œβ”€β”€ login: true β”‚ β”œβ”€β”€ token: "ABC123" β”‚ └── user_id: "89" └── settings β”œβ”€β”€ theme: "dark" └── notifications: true

Files Example:

└── Files β”œβ”€β”€ config.json β”‚ β”œβ”€β”€ api_url: "https://example.com" β”‚ └── mode: "debug" β”œβ”€β”€ flutter_callback_cache.json β”‚ β”œβ”€β”€ callbackId: 153 β”‚ └── lastEvent: tap └── notes.txt: "Temporary note"

SQLite Example:

└── Databases β”œβ”€β”€ app.db β”‚ └──

============================ πŸ“¦ Installation #

Install globally:

dart pub global activate data_tree

Add to PATH:

macOS/Linux: export PATH="$PATH:$HOME/.pub-cache/bin"

Windows: setx PATH "%PATH%;%USERPROFILE%.pub-cache\bin"

Check installation:

data-tree --help

============================ πŸ§ͺ How To Use (Step-by-Step) #

STEP 1 β€” Run your Flutter app (debug mode):

flutter run

STEP 2 β€” In a NEW terminal:

data-tree

STEP 3 β€” Select your app:

Detected Debug Apps:

  1. com.example.myapp
  2. com.example.myapp2

Select app: 2

STEP 4 β€” Select storage section:

=== STORAGE DETECTED ===

  1. SharedPreferences
  2. Files
  3. Databases
  4. AppFlutter
  5. All

Select storage: 1

STEP 5 β€” View ASCII Tree Output

============================ πŸ”₯ Quick Commands #

Print ALL storage:

data-tree All

Only SharedPreferences:

data-tree SharedPreferences

Only Files:

data-tree Files

Search for a key:

data-tree token

============================ 🎨 Color Output (NEW) #

Color output helps readability:

  • Blue = keys
  • Green = values
  • Yellow = branches

Enable color mode:

data-tree --color

============================ πŸ› Troubleshooting #

❌ β€œNo debug apps found” Your app is NOT installed as debug. Fix: flutter run

❌ β€œrun-as: unknown package” Your app is a release build. Fix: flutter build apk --debug adb install -r app-debug.apk

❌ β€œNo readable storage found”

  • App not running
  • Selected wrong package
  • Device locked
  • No storage created yet

============================ πŸš€ Why this tool exists #

Flutter developers often need to check:

  • Login tokens
  • User session data
  • Saved preferences
  • Cached API JSON
  • Files saved inside "/files"
  • Data saved in app_flutter
  • SQLite databases

Normally you must: ❌ Create debug UI ❌ Add print logs ❌ Browse device file explorer ❌ Manually decode JSON or XML ❌ Pull files using ADB

============================ πŸ” Security Notes #

  • Only reads YOUR installed debug apps
  • Cannot read other apps
  • Cannot access encrypted SecureStorage
  • Read-only (never modifies anything)

============================ πŸ“„ License #

MIT License β€” Free to use. [Nikul Prajapati]

============================ ❀️ Summary #

data_tree gives instant access to Flutter app storage:

βœ” No logs needed
βœ” No UI debugging
βœ” No ADB pulling
βœ” No file explorer
βœ” No XML/JSON manual parsing

Just:

data-tree

…and explore your entire app storage as a readable tree.

============================ 🌟 Want More Features? #

Available on request:

  • Color output (full ANSI)
  • SQLite table viewer
  • Hive decoder
  • JSON export
  • DevTools extension
  • VS Code extension
  • Flutter Desktop UI viewer

Just ask!

0
likes
110
points
45
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A powerful CLI tool that automatically reads Flutter app storage using ADB and prints GetStorage, SharedPreferences, and app data files as a clean ASCII tree in the terminal. Designed for debugging Flutter apps without exporting manual files. Supports Android auto-detection, key-based filtering, and full tree visualization.

Homepage

License

unknown (license)

Dependencies

path

More

Packages that depend on data_tree