-
Notifications
You must be signed in to change notification settings - Fork 67
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
Create a Parsec Command Line Interface Client #202
Comments
I'll take a look at this. :) |
Hi there, Will be submitting a pull request for this shortly. Just thought it might be worth writing down a few bits for some context, or for future reference.
If I remember anything else, or if anything changes, I'll edit this comment. 👍 Cheers! |
Do you have a plan for what the output format will be for the data? |
Adding to Ionut's question, what do you think will be the different commands/options to the CLI? |
Hi, The current prototype implementation has a fairly basic output format. For example, outputting the available providers looks like this:
It might be possible to output more information -- I'll check and see if this is possible. @hug-dev, here's the current help screen:
Note that some subcommands have additional options -- e.g.
I'm thinking about writing up a more formal RFC for this -- do you guys think that's a good idea before we move forward? 😄 |
I think for this it's fine not to do a formal RFC!
Also about the location of |
Sure, will do this. 😄
At the moment it throws up the help screen. From having a quick search around, it looks like it might be non-trivial to do this with clap. A 'default subcommand' or 'default behaviour' does not appear to be a clap feature. We could, of course, check for an empty
Yes, that's a good idea. The opcodes are currently outputted like this:
I'll change this to output the opcodes for each provider, though.
Agreed, I think I mentioned this in the community call. We can display more information than we do currently. Will make sure that this is implemented.
You're perhaps right. I'm very much indifferent on where this tool ends up -- if you think it's better to be in its own repo then we can do that! I'm more inclined to think that this is the better approach. 😄 |
Ok no worries, then let's just keep it with the normal, default behaviour 😃!
Looks good! Would be nice to also show the codes in hexadecimal form.
I think it might also be better. I will create another repository with a default template. |
Just out of curiosity, are there any plans for implementing some of the crypto operations too? Oh, and what error code is returned when something fails - is it the response status codes defined for the wire protocol or something else? |
I think @hug-dev is the guy for this question! I'm just guessing, but I would imagine so eventually.
At the moment it's zero for success, and one for failures. We can change this though. |
It would be nice to change the failure code to whatever the value of the |
We can discuss this, I am not sure of which level of abstraction we want to expose for the CLI: do we want it to access to all operations with all possible parameters? For example, we could build the crypto operations on top of a higher abstraction client. For the Core Operations at least, I have created the About directory structure: in order to use docs.rs documentation (if we want to use it), it would be needed to have modules in |
Initial pull request submitted here. |
parallaxsecond/parsec-tool#1 has been merged! |
At first it could/should be limited to Core Operations and would be a very nice way to check for administrators/clients that Parsec is running, which providers are currently usable, what operations, etc...
Rust is really easy and fast to make CLI app with (see the guide) and since we already have a Rust Client that should be really nice to work with.
The text was updated successfully, but these errors were encountered: