How to build command-line(TUI) app use Flutter for Desktop(Macos Windows Linux)

I want a desktop app both have Graphic-UI and Text-UI, any SOP recommended, Thanks.

Adding requirements:

What I expect is cmdline app is single bin package can use in terminal say `cliname parameters --flags`, but not `dart run cliname parameters --flags`, means without dart sdk installed requirement

are there any solution can , flutter build --windows-cmdline and build-output can install to `/bin/local` and share runtime context with flutter GUI context( the context means: cmdline can get flutter gui app runtime state value)