Skip to content

fluttersdk/magic_devtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magic_devtools

Magic adapters for the FlutterSDK dev-tooling ecosystem.
Wire Magic's runtime into fluttersdk_dusk (E2E driver) and fluttersdk_telescope (runtime inspector) — debug-only, zero release cost.

pub package CI License: MIT pub points GitHub stars

Documentation · pub.dev · Issues


Alpha Release — part of the Magic ecosystem, under active development. APIs may change before stable. Star the repo to follow progress.

What is magic_devtools?

magic_devtools is the Magic adapter layer for fluttersdk_dusk and fluttersdk_telescope. It enriches dusk snapshots and telescope records with Magic-aware context (forms, navigation, controllers, gates, auth, broadcasting, HTTP) so an LLM agent or CI driver sees your app the way Magic sees it.

It is debug-only: you install and wire it under kDebugMode, so release builds tree-shake it entirely and it carries no runtime cost in production. This is exactly why it lives outside magic core — the framework keeps no dev-tooling production dependencies.

Two import barrels:

  • package:magic_devtools/dusk.dartMagicDuskIntegration registers 14 Magic-aware enrichers into fluttersdk_dusk's snapshot pipeline.
  • package:magic_devtools/telescope.dartMagicTelescopeIntegration registers 5 Magic watchers and MagicHttpFacadeAdapter into fluttersdk_telescope.

Install

It is a dev tool, not a runtime dependency, so it belongs under dev_dependencies:

dev_dependencies:
  magic_devtools: ^0.0.1
  fluttersdk_dusk: ^0.0.7        # add if you use dusk
  fluttersdk_telescope: ^0.0.4   # add if you use telescope

magic_devtools depends on magic, fluttersdk_dusk, and fluttersdk_telescope directly, so transitive resolution does not happen through magic itself.

Wiring

Both integrations are debug-only and run in lib/main.dart. The ordering is load-bearing: the dusk/telescope plugin installs before Magic.init() (so the snapshot pipeline is live during Magic boot and the exception watcher catches boot errors), and the Magic integration installs after Magic.init() (its enrichers and adapter resolve Magic primitives through the IoC container).

Dusk

if (kDebugMode) {
  DuskPlugin.install();
}
await Magic.init(configFactories: [...]);
if (kDebugMode) {
  MagicDuskIntegration.install();
}

Telescope

if (kDebugMode) {
  TelescopePlugin.install();
}
await Magic.init(configFactories: [...]);
if (kDebugMode) {
  MagicTelescopeIntegration.install();
}

You can wire either integration on its own, or both together: install each plugin before Magic.init() and each Magic integration after it. The dusk:install and telescope:install Artisan commands wire these blocks into lib/main.dart automatically when magic_devtools is a dependency.

Ecosystem

Package
magic The Laravel experience for Flutter
fluttersdk_dusk E2E driver for LLM agents and CI
fluttersdk_telescope Passive runtime inspector

Contributing

git clone https://github.com/fluttersdk/magic_devtools.git
cd magic_devtools && flutter pub get
flutter test && dart analyze

Local development resolves the magic, fluttersdk_dusk, and fluttersdk_telescope siblings through a gitignored pubspec_overrides.yaml (path entries to the sibling clones). Create one alongside pubspec.yaml:

# pubspec_overrides.yaml (gitignored; local path wiring only)
dependency_overrides:
  magic:
    path: ../magic
  fluttersdk_dusk:
    path: ../dusk
  fluttersdk_telescope:
    path: ../telescope

Report a bug

License

MIT — see LICENSE for details.


Built with care by FlutterSDK
If magic_devtools helps you, give it a star — it helps others discover it.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages