Cosmo / HackMan

🤖🔜🤯 Stop writing boilerplate code yourself. Let hackman do it for you via the command line.
MIT License
293 stars 11 forks source link

A bunch of ideas... #6

Open mgrider opened 5 years ago

mgrider commented 5 years ago

First of all, love this project. I've been wanting to do something like this for a while now. Here's some (pretty out there) ideas for this project:

General:

On new project creation:

After every command, I would love to see:

Farther out there:

I might be willing to help out with this project. Do you have a TODO list somewhere already?

mgrider commented 5 years ago

(I now see the TODO list in the readme.)

Cosmo commented 5 years ago

Hi @mgrider, thanks for the feedback and sorry for the late delay — busy week :)

General: I haven't tried it, but does hackman g AppDelegate also work? (Would be awesome if it did. I would feel much more comfortable with using proper case for property types, especially.)

It didn't — but I just pushed an updated. hackman generate scaffold human name is_favorite:bool phone_number:string --view=table --coordinator and hackman generate scaffold Human name isFavorite:Bool phoneNumber:String --view=table --coordinator result identical results now.

After every command, I would love to see: Run git add . ; git commit -a -m "{suitable message related to what hackman command was just performed, might actually include the command.}" Also, is there any reason not to run xcodegen for them after every command?

Adding git support automatically doesn't sound bad! About xcodegen I was not sure, if i wanted xcodegen as a hard dependency. Currently, you can use the generators just fine without xcodegen installed on your computer.

Farther out there: I'd love to see some kind of simple (maybe yaml or json) file created for each generate command. (Or maybe just one database-like file per project, that keeps track of all the various things that are generated.) This would allow you to append to previously generated files. So instead of one long hackman g scaffold album name uuid artist:artist created_at:date updated_at:date --coordinator, you could run hackman g scaffold album then hackman a[ppend] album name then hackman a album uuid, and have it do the right thing.

I like the idea for updates -- but do you think it could be achievable without something like a .commands_history file?

mgrider commented 5 years ago

Offhand, I can imagine it working without a .commands_history (or other metadata file) by parsing the generated file to figure out where to make the new edit. This might be helped along with the inclusion of comments at some key places, maybe?

mgrider commented 5 years ago

More requests, after playing with this for a couple of days:

A couple of things I noticed that should maybe be fixed: