Great blog post! 👏
I think the answer you’re looking for is: yet. We want apps to be able to write full fledged commands for all the reasons you mention, we just haven’t finished it up… yet.
That’s why there’s no documentation and the reason for the rough edge you mention at the end of your post.
Here’s where you and others can help now:
- Better load paths and loading: helps with the issue you identified. Must work for our internal commands as well as apps.
- Command dependencies: attaching a command to run after e.g. db:migrate (so we can move our Rake tasks to Rails commands, plus apps can write commands that hook in after db:migrate etc.)
Later, we’ll need the command generator, like you mentioned, and proper documentation.
Again, appreciate the write up! Since you’re already eager to make this work in your apps, you’d be a good fit to help out here.
So: looking forward to your issues/pull requests ❤️