aerogear / charmil

The framework for building modular plugin based CLI's using Cobra and Golang
https://aerogear.github.io/charmil
Apache License 2.0
116 stars 13 forks source link

Ability to save command log/history #222

Closed wtrocki closed 3 years ago

wtrocki commented 3 years ago

We need ability to get history from user file for debugging and checking what caused issues.

ankithans commented 3 years ago

so whatever command user executes, store the logs(input/output) in a file. And whenever needed show it? we can have some format datetime wise.

wtrocki commented 3 years ago

Like bash history but specific to your CLI (Or even some subcommand to your CLI (can be stored independently from config file). Then we can have dev versions with this enabled by default giving us ability to trace problems early and get whole set of commands executed.

ankithans commented 3 years ago

we may provide "history" command from core CLI_NAME history which can be imported in a CLI, which will return all the commands executed before. Can add argument for number of items in history to be shown. history 5 history delete and many other options....

I think, we should store the output of the executed command as well.

Is this really a good first issue 😅

wtrocki commented 3 years ago

That was never intended to be user facing - as user have bash history for that. We have implemented analytics in rhoas but that requires asking user for permission. I would recommend to close this