cli
cli copied to clipboard
Redesign `chain serve` output with bubbletea
Since we now plan to start using: https://github.com/charmbracelet/bubbletea, I believe we can benefit from the refreshing feature (I don't know the exact name for it).
For ex, right now when there are changes in the files, the serve command will print the logs related to rebuilding the binary, proto, installing dependencies etc. again and again:
💿 Saving genesis state...
💿 Genesis state saved in /home/gitpod/.ignite/local-chains/mars/exported_genesis.json
🛠️ Building proto...
📦 Installing dependencies...
🛠️ Building the blockchain...
💿 Existent genesis detected, restoring the database...
🌍 Tendermint node: http://0.0.0.0:26657
🌍 Blockchain API: http://0.0.0.0:1317
🌍 Token faucet: http://0.0.0.0:4500
Instead of reprinting all these on every change, we can show a spinner and/or refresh the current text instead of reprinting it again which makes the serve command more pleasant to use.
We could also use something like this for the c serve command, please run the example to see: https://github.com/charmbracelet/bubbletea/tree/master/examples/send-msg
Something like this when refreshing:
And following when app is running (but we also need to print the accounts/mnemonics):
For this we can also use some sort of a table too to display accounts and mnemonics and server addresses. See all the examples here. And glamour
Originally posted by @ilgooz in https://github.com/ignite-hq/cli/issues/2420#issuecomment-1120458674
We previously had good ideas about improvements of chain serve UX in https://github.com/ignite-hq/cli/issues/1079