Adding an Interactive RPC Client. #3122

issue super3 opened this issue on October 21, 2013
  1. super3 commented at 11:36 PM on October 21, 2013: contributor

    Just trying to fork off the discussion from #3082. Seems like the is an interest for an RPC client with "like tab completion, and inline help, and batch processing, and pipelines of queries, etc"

    My biased vote goes toward building it with Python, because there are plenty of existing libs for that. Would the script in contrib/bitrpc/ be a good start?

    Other questions involve feature set, and how to manage the executable. I've leave those for discussion though.

  2. laanwj commented at 2:16 PM on October 22, 2013: member

    What kind of interactivity are you aiming at? The simplest implementation would connect, load the RPC proxy object into the context and drop to the Python shell.

  3. super3 commented at 2:29 PM on October 22, 2013: contributor

    Well that is up for discussion. I think the best way to go about it would to build one feature set at a time, starting with tab completion since that should be the easiest to accomplish.

    Agreed on that approach. On Oct 22, 2013 10:16 AM, "Wladimir J. van der Laan" < notifications@github.com> wrote:

    What kind of interactivity are you aiming at? The simplest implementation would connect, load the RPC proxy object into the context and drop to the Python shell.

    — Reply to this email directly or view it on GitHubhttps://github.com/bitcoin/bitcoin/issues/3122#issuecomment-26806434 .

  4. laanwj commented at 2:44 PM on October 22, 2013: member

    Yes but I mean do you want an interactive Python interpreter? Or make your own mini-language?

    For example there are tab completion implementations for the Python interactive shell that you can just use (see http://docs.python.org/2/library/rlcompleter.html) so you essentially would have to do nothing :)

  5. super3 commented at 2:47 PM on October 22, 2013: contributor

    Python. Yeah looked at that already. That's exactly what I was going to use. On Oct 22, 2013 10:44 AM, "Wladimir J. van der Laan" < notifications@github.com> wrote:

    Yes but I mean do you want an interactive Python interpreter? Or make your own mini-language?

    For example there are tab completion implementations for the Python interactive shell that you can just use (see http://docs.python.org/2/library/rlcompleter.html) so you essentially would have to do nothing :)

    — Reply to this email directly or view it on GitHubhttps://github.com/bitcoin/bitcoin/issues/3122#issuecomment-26809107 .

  6. gmaxwell commented at 3:10 PM on October 22, 2013: contributor

    Ipython + some hooks to make it easier to use the rpc with less typing would be pretty great (e.g. importing the rpc functions at the top level)... maybe some hooks to give node status at the prompt... also an input method for walletpassphrase that doesn't log the passphrase.

    It would be sad if we couldn't someday have the same interface in the QT 'console'. :)

  7. super3 commented at 3:23 PM on October 22, 2013: contributor

    From some Google Fu it seems like it would be possible to plug the script into the QT console. For the password it looks like Python has something usable(see http://docs.python.org/2/library/getpass.html).

    Could you expand upon what node status should look like?

  8. gmaxwell commented at 3:24 PM on October 22, 2013: contributor

    E.g. blocks count and number of peers. Defined as a user replaceable function, so if the user wants it to show their balance there it would be easy to add it.

  9. super3 commented at 3:37 PM on October 22, 2013: contributor

    So basically just let them rip fields from getinfo. Should this be embedded in the prompt line?

     Peers: 8 | Balance: 1.234 BTC > addnode 127.0.0.1 add
     Peers: 9 | Balance: 1.234 BTC > 
    

    Something like that? Now, what what be awesome is if argument fields were automatically shown when you typed the command.

     > sendf[tab]
     > sendfrom <fromaccount> <toprimecoinaddress> <amount> [minconf=1] [comment] [comment-to]
    
  10. bardiharborow commented at 1:37 AM on March 12, 2014: contributor

    And the Debug window in QT doesn't provide this functionality?

  11. super3 commented at 1:40 AM on March 12, 2014: contributor

    Developers are more likely doing work in command line. "tab completion, and inline help, and batch processing, and pipelines of queries, etc" would speed up workflow.

    To answer your question, no it doesn't.

  12. super3 closed this on Mar 12, 2014

  13. super3 reopened this on Mar 12, 2014

  14. laanwj commented at 9:30 AM on May 18, 2015: member

    @super3 This issue has been open for more than a year. Do you still intend to work on this? If no, please close it.

  15. super3 closed this on May 18, 2015

  16. Bushstar referenced this in commit 737ac967f5 on Apr 8, 2020
  17. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me