briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Add a tutorial for creating CLI apps

Open Dtar380 opened this issue 1 year ago • 6 comments

What is the problem or limitation you are having?

Right now on https://docs.beeware.org/en/latest/tutorial the tutorial is only for GUI applications, theres no CLI app tutorial, and I was unable to find anything relevant when searching.

Describe the solution you'd like

IDK how much can it take, but it will be nice to have a CLI tutorial because CLI applications are quite common between devs, rn im creating an automation app and Im having trouble seeing how to deploy across platforms, I saw your project and saw it had support for every platform and support for every Desktop platform on CLI apps, but not being able to see how to do it makes this a bumpy ride.

Describe alternatives you've considered

Trying to understand how GUI apps are made and then recreating it with CLI apps, but there are some huge differences on how you create GUI apps and structure the projects against CLI apps, so its not easy.

Additional context

No response

Dtar380 avatar Aug 09 '24 00:08 Dtar380

Thanks for the suggestion. I'm not sure if it would fit into the overall BeeWare tutorial, or it's something that we should add as a Briefcase specific tutorial - but I agree that some sort of a CLI tutorial would make sense.

FWIW, the overall process essentially the same.

  • Start a new project with Briefcase, selecting "console" as the "GUI" framework.
  • Add any dependencies to your requires definition
  • Add any logic to src/yourapp/app.py
  • Run the app in dev mode with briefcase dev. If you need to pass in command line arguments, run briefcase dev -- arg1 arg2.
  • Run the full app with briefcase run.
  • Package the app with briefcase package.

That will generate a PKG installer on macOS, and MSI on Windows, and a system package on Linux; when installed, the configured app name will be a binary on your path.

freakboy3742 avatar Aug 09 '24 01:08 freakboy3742

Thanks for the information and the speed, Now imma go to sleep (3:23 am) and tomorrow Ill get to it

Dtar380 avatar Aug 09 '24 01:08 Dtar380

I would like to work on this issue.

john0isaac avatar Aug 11 '24 20:08 john0isaac

@john0isaac We don't have a formal process for assigning tickets - if you want to work on this, go right ahead; we'll review a PR when you submit it. If you need any additional suggestions or guidance, let us know and we'll be happy to help where we can.

freakboy3742 avatar Aug 11 '24 23:08 freakboy3742

So, I was super confused as of what to add and what to not add to the tutorial since the beeware tutorial covers pretty much everything. I did scaffold an initial tutorial page and want to know if you have any feedback and more guidance on what to include and what to not include. If you want me to continue with the packaging steps and not reference the beeware tutorial that is also fine with me.

Let me know what you think whenever you have time, regards!

john0isaac avatar Aug 14 '24 16:08 john0isaac

@john0isaac Thanks - I'll add some comments on the PR.

freakboy3742 avatar Aug 14 '24 22:08 freakboy3742