r0gue-io / pop-cli

An all-in-one tool for Polkadot development.
GNU General Public License v3.0
59 stars 18 forks source link

add ability to confirm that the pop node is running after `pop up parachain` command #117

Open brunopgalvao opened 3 months ago

brunopgalvao commented 3 months ago

As a user, I would like for a browser window to open with Pop Network upon successful completion of the command:

pop up parachain -f ./network.toml -p https://github.com/r0gue-io/pop-node                                                                                                                    

So that I do not have to manually open a browser window to confirm that Pop Network is running.

Either that or open a terminal with the Pop Network logs running live tail -f pop.log

chungquantin commented 3 months ago

Is this open for public contributors? I would love to work on this enhancement

AlexD10S commented 3 months ago

Absolutely, go ahead! We're thrilled to see the community contributing to improve pop-cli.

If you need any help or have questions, please let us know here, or feel free to join our Telegram group.: https://t.me/Pop_Network

brunopgalvao commented 2 months ago

@chungquantin I am removing the label enhancement from this and adding discussion. I want the community to discuss whether this should be an added feature to pop-cli or not. If voted yes you can begin working on it.

I will also keep you in mind for other features.

cc: @AlexD10S

weezy20 commented 2 months ago

I like the idea of opening a browser with Polkadot-Js for the local node. Maybe a --no-browser or --no-popups should go alongside this feature for users who may not want this behaviour.

chungquantin commented 2 months ago

Personally, I think it should not pop up the browser automatically. After running pop up parachain, I would prefer another command asking me if I want to open in a new window? Yes / No

brunopgalvao commented 2 months ago

Personally, I think it should not pop up the browser automatically. After running pop up parachain, I would prefer another command asking me if I want to open in a new window? Yes / No

The interactivity makes sense to me. This feature would be specific to the case where the user specifies the pop-node e.g. pop up parachain -f ./network.toml -p https://github.com/r0gue-io/pop-node

I like the idea of opening a browser with Polkadot-Js for the local node. Maybe a --no-browser or --no-popups should go alongside this feature for users who may not want this behaviour.

These option could be helpful if the user wants to bypass the interactive question.

@AlexD10S any thoughts?

AlexD10S commented 2 months ago

I like the idea of interactivity too! and if the user wants open the browser automatically is a cool feature. Why are you suggesting only for pop? It can work for whatever parachain the user is running no?

The main difficult for this task is to get the port where the parachain we want to open is running. It has to be parsed here: https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-cli/src/commands/up/parachain.rs#L79 from the type the Zombienet-SDK is returning

pepoviola commented 2 months ago

Hi 👋, first let me say that the cli looks awesome! The network instance you should have the info required to connect the node (exposed as ws_uri) but if you need only the port we can add a new method in the NetworkNode.

Thanks!!

evilrobot-01 commented 2 months ago

Just a general FYI: we want to add an additional --init type option to this command which allows some other command to optionally be run after the network is spawned and parachain available.

The initial use case is funding the dev accounts on PopNet via Xcm from relay (PopNet uses relay token) but this could be used by anyone to run any additional command/script as required.

Keeping this in mind might be useful in considering the eventual UX selected.

chungquantin commented 2 months ago

I found a CLI tool called Substrate Manager: https://github.com/omerdn1/substrate-manager which build the interactive flow very clean. Put it here as a reference.

evilrobot-01 commented 2 months ago

I don't believe we were aware of that at all, so thank you very much for sharing!