Open mikehale opened 12 years ago
:+1:
What do you think the plugin implementation will look like? Without dynamic loading, seems like it would have to re-invent the upstream's codebase, unless it included it as a dependency and built a separate, somewhat duplicating executable.
Not sure. Still playing with ideas here. Any suggestions are most welcome.
I guess the simplest solution would be to decide if we really need to be secretive about these API's. It seems like security through obscurity, and we all know how that ends up.
Why not add them to the master codebase, and have them 'hidden' behind an environment variable so the normal user experience isn't polluted with things they can't access. Then then plugin just needs to flag them as visible if the user so wants.
Otherwise, it's going to be much tougher. Maybe have a hidden command in 'hk' that can perform raw API requests, and the plugin can shell out to this?
Nice. Another similar idea from a while back: hk info -json
which could be used by shell scripts or even hk plugins.
All hk commands could potentially have a json flag.
This will probably be a separate command (plugin):
xinfo
.