luckyframework / luckyframework/lucky_cli
Investigate using Athena Console for CLI
- Dominant language
- HTML
- Stars
- 92
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
Related: https://github.com/luckyframework/lucky_cli/issues/796
Ref: https://github.com/luckyframework/lucky_cli/issues/816
We've had an issue with the CLI in the past where just running `lucky -h` required your app to compile so it could list out all of the custom tasks you've defined in your app. In the case of some of my apps, running `lucky -h` would takes upwards of 3+ minutes in development.
To fix this I moved over to using OptionParser https://github.com/luckyframework/lucky_cli/pull/771 and now you can just run `lucky -h` and get a quick help right away. If you want to see all of your tasks, you'd run `lucky tasks`. The downside here was https://github.com/luckyframework/lucky_cli/issues/816 where running `lucky some.task -h` would print out the `lucky -h` help menu instead. The Crystal OptionParser doesn't have any way to do a "wildcard" type handler. So when you run `lucky some.task`, the OptionParser really doesn't know what that means. Then passing any flags to it, the parser tries to pull those in.
We can hack around this by using `--` to tell the parser to stop parsing, but I think using a built tool might give us more options and flexibility. Athena console comes with tab complletion, and that alone might be worth adding it in. Will need to investigate if it'll be a viable option with how LuckyTask tasks work.
Contributor guide
Research direction
Start by reading related issues 796 and 816, then inspect the current Crystal OptionParser handling for LuckyTask tasks. Investigate whether Athena Console can support task dispatch, task-specific help, and tab completion without restoring the slow app compilation for `lucky -h`. Done means a documented viability decision and clear integration scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100