nitrogen_cli 0.1.12
nitrogen_cli: ^0.1.12 copied to clipboard
CLI for Nitrogen Modules. Scaffold new Flutter FFI plugins and generate native bridge code.
0.1.12 #
- Fix static version in
lib/version.dart nitrogen init:src/dart_api_dl.candsrc/CMakeLists.txtnow resolve the correct pub-cachenitropath at scaffold time instead of writing a monorepo placeholder. After pubspec dependencies are installed,nitrogen initreads.dart_tool/package_config.json(using the sameresolveNitroNativePathlogic asnitrogen link) and overwrites both files with the absolute path — so the generated plugin builds immediately without needing a separatenitrogen linkrun.
0.1.11 #
nitrogen init: generatedexample/lib/main.dartnow showcases the plugin API with a proper Flutter app —WidgetsFlutterBinding.ensureInitialized(), aStatelessWidgetMyApp, try-catch error screen, asyncFutureBuilder, and a reusable_FeatureCardwidget. Fixes broken template syntax (const .all(10),.center) from the previous scaffold.- Added
docs/swift-type-mapping.md: comprehensive reference covering the two-layer Swift type system, full Dart → C →@_cdecl→ protocol type mapping table, memory ownership for String returns, async bridging pattern, Bool conversion, struct returns, and a crash diagnosis guide forEXC_BAD_ACCESS. - Updated
docs/getting-started.md: added@_cdeclbridge type callout in the Supported Types section, Step 6 note reminding plugin authors to use native Swift types in*Impl.swift, and anEXC_BAD_ACCESStroubleshooting entry.
0.1.10 #
- Editor Quick Links: Instantly open your active Nitro project in VS Code or Antigravity via clickable links in the dashboard header or the
nitrogen opencommand. - Smart Project Discovery:
generate,link, anddoctorcommands now automatically search for a Nitro project in the current directory and its direct subdirectories. This allows running Nitrogen commands from a parent folder (e.g., right afterinit) without needing to manuallycd.- Dashboard now reflects the active project found in subdirectories.
- Improved Navigation: Added visible
‹ Backbuttons to all menu views (Init, Doctor, Link, and Generate) for easier dashboard navigation. - UI Stability Fix:
- Fixed flickering and layout jumps in the "✨ SUCCESS ✨" pulse animation during generation and initialization.
- The success status now maintains a stable height, preventing the log view from shifting.
- TUI Menu Refinement: Rearranged core commands with Exit consistently at the bottom and editor options moved to a cleaner header position.
0.1.9 #
- TUI Visual Overhaul (Neon Premium Theme):
- New pulsing header logo (cycles between ⚡ Cyan and 🔥 Magenta).
- Added "by Shreeman Arjun" author attribution to the dashboard.
- Improved readability with high-contrast color palettes for menus and logs.
- Mouse & Interactive Features:
- Full mouse support: Hover over menu items to highlight them.
- Click anywhere on a command row to execute it instantly.
- Clickable footer links for Documentation, Shreeman.dev, and Marc Rousavy.
- Context-Aware Dashboard:
- Project Bar: Displays the name and version of the currently active Nitrogen project in the header.
- Status Bar: Added a fixed bottom bar showing Dart version and current Git branch.
- Enhanced Process Feedback:
- Added a pulsing "✨ SUCCESS ✨" animation and green color shift when a generation or initialization completes successfully.
- Usability Fixes:
- Added an explicit Exit command to the TUI menu for easy quitting.
- Standardized menu alignment (labels and descriptions now align vertically in the center).
- Automatic TUI versioning: the dashboard always displays the actual package version from
pubspec.yaml.
0.1.8 #
nitrogen link: fix Android/iOS build failure wheredart_api_dl.canddart_api_dl.hwere not found whennitrois installed from pub.dev (e.g. via puro's pub cache) rather than a local monorepo path.linknow reads.dart_tool/package_config.jsonto resolve the actual installednitropackage path (absolutefile://URI or relative URI).- Creates a local
src/dart_api_dl.cforwarder (#include "<resolved path>") so the Android CMake build never references a path outside the project directory. ios/Classes/dart_api_dl.cnow chains through../../src/dart_api_dl.c, giving both Android CMake and iOS CocoaPods/SPM a single resolution point.- Migrates legacy
"${NITRO_NATIVE}/dart_api_dl.c"entries in existingCMakeLists.txtto the new local"dart_api_dl.c"form automatically. - Updates a stale
NITRO_NATIVEcmake variable if the path it currently points to no longer containsdart_api_dl.h.
nitrogen init: generatedCMakeLists.txtandios/Classes/dart_api_dl.cnow use the same local-forwarder pattern from day one.- Extracted
resolveNitroNativePath,nitroNativePathExists, anddartApiDlForwarderContentas package-level functions for testability; private_LinkViewStatehelpers now delegate to them. - Added tests covering
resolveNitroNativePath(file:// URI, relative URI, absent config, fallback),nitroNativePathExists, anddartApiDlForwarderContent.
0.1.7 #
nitrogen init:nitroandnitro_generatordependency versions are now resolved automatically from pub.dev at scaffold time instead of being hardcoded.- Fallback: if pub.dev is unreachable,
flutter pub add nitroandflutter pub add --dev nitro_generatorare run in the generated plugin directory so pub resolves the latest compatible versions itself.
0.1.6 #
- Fix
nitrogen doctoralways reportingios/Classes/dart_api_dl.cpp missing: the check now correctly looks fordart_api_dl.c, matching whatnitrogen linkactually creates (.cppis deleted bylinkbecause C++ rejects thevoid*/function-pointer cast inside it).
0.1.5 #
nitrogen initnow generates starter${ClassName}Impl.swiftand${ClassName}Impl.ktfiles so the plugin compiles immediately without any manual steps.- iOS: switched from
@objc/NSObjectto@_cdeclC-bridge stubs — Swift structs and Swift-only protocols can now cross the native boundary correctly. - iOS:
HEADER_SEARCH_PATHSin podspec now uses${PODS_ROOT}/../.symlinks/plugins/nitro/src/nativeso the path resolves correctly whethernitrois a local path dependency or installed from pub.dev. - iOS:
dart_api_dlis created as.c(not.cpp) so the Dart DL API compiles as C; C++ rejects thevoid*/function-pointer cast inside it. - iOS:
nitrogen initnow creates aPackage.swiftalongside the podspec, enabling Swift Package Manager distribution in addition to CocoaPods. - iOS: SPM
Sources/layout uses symlinks intoClasses/so a single file exists at one location and is shared between both build systems. nitrogen link: extracteddiscoverModuleLibsandextractLibNameFromSpecas package-level functions for testability.- Added comprehensive
link_command_test.dartcovering lib-name extraction, module discovery, podspec path correctness, and template content validation.
0.1.4 #
nitrogen initalways prompts for plugin name via an interactivePluginNameFormTUI; the name can no longer be passed as a positional argument.- Added
NitrogenInitApp(public) to handle the form → scaffold flow, reusable in both CLI and TUI dashboard. - TUI dashboard
/initroute updated to useNitrogenInitAppinstead of a hardcodedInitView. ESCon the plugin name form navigates back to the dashboard (TUI) or is a no-op (CLI).- Added
pluginNamefield toInitResultfor post-run reporting. - Added comprehensive tests for
InitResult,InitStep,InitStepRow,PluginNameForm, and plugin name validation.
0.1.3 #
- Implement String type conversion in the struct generator and add braces to the CLI's plugin name extraction.
0.1.2 #
- Rename generator package folder to
nitro_generator. - Update
doctorandinitcommands with new path references.
0.1.1 #
- Update
nitrogenpackage reference tonitro_generator.
0.1.0 #
- Initial release with
noctermdashboard. - Integrated
nitrogen init,generate,link,doctor, andupdate.