Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print scripts using a parsable format #108

Open
fedeci opened this issue Feb 5, 2022 · 5 comments
Open

Print scripts using a parsable format #108

fedeci opened this issue Feb 5, 2022 · 5 comments

Comments

@fedeci
Copy link

fedeci commented Feb 5, 2022

Hello maintainers! We are adding the velociraptor spec to Fig and we are encountering troubles parsing the output of vr. I think it should be possible to add a --json flag allowing users to get a json output. WDYT? I can work on this feat if required.
Thanks!

@umbopepato
Copy link
Member

Ciao @fedeci! That's super cool, Fig looks awesome 🙌
While adding a --json option should be feasible, would it not make more sense to use vr's built-in autocomplete? For example:

$ vr completions complete scriptid

returns a newline-separated list of all the runnable scripts from the resolved configuration.
Or - even better - we could work with Cliffy's authors to add a json or fig generation target that automatically exports the command structure as a Fig spec!

@ryanccn
Copy link

ryanccn commented Feb 10, 2022

But the scriptid autocomplete doesn't provide the description, command, etc. I'll take a shot at adding something like a vr json or just vr --json next week, maybe.

@ryanccn
Copy link

ryanccn commented Feb 10, 2022

Or - even better - we could work with Cliffy's authors to add a json or fig generation target that automatically exports the command structure as a Fig spec!

That's also a great idea 😈

@fedeci
Copy link
Author

fedeci commented Feb 10, 2022

At this point I think it's worth trying to implement it directly into Cliffy.
@ryanccn do you want to open an issue in their repo?

@ryanccn
Copy link

ryanccn commented Feb 10, 2022

That's a pretty good idea. Meanwhile I'll work on a possible PR to add JSON output to Velociraptor. How about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants