-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: gnobro, a terminal-based realm browser (#2608)
Co-authored-by: deelawn <[email protected]>
- Loading branch information
Showing
25 changed files
with
2,499 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,67 @@ | ||
## `gnodev`: Your Gno Companion Tool | ||
## `gnodev`: Your Gno Development Companion | ||
|
||
`gnodev` is designed to be a robust and user-friendly tool in your realm package development journey, streamlining your workflow and enhancing productivity. | ||
`gnodev` is a robust tool designed to streamline your Gno package development process, enhancing productivity | ||
by providing immediate feedback on code changes. | ||
|
||
We will only give a quick overview below. You may find the official documentation at [docs/gno-tooling/gnodev.md](../../docs/gno-tooling/cli/gnodev.md). | ||
Please note that this is a quick overview. For a more detailed guide, refer to the official documentation at | ||
[docs/gno-tooling/gnodev.md](../../docs/gno-tooling/cli/gnodev.md). | ||
|
||
### Synopsis | ||
**gnodev** [**-minimal**] [**-no-watch**] [**PKG_PATH ...**] | ||
**gnodev** [**options**] [**PKG_PATH ...**] | ||
|
||
### Features | ||
- **In-Memory Node**: Gnodev starts an in-memory node, and automatically loads | ||
the **examples** folder and any user-specified paths. | ||
- **Web Interface Server**: Starts a `gnoweb` server on `localhost:8888`. | ||
- **Hot Reload**: Monitors the example packages folder and specified directories for file changes, | ||
reloading the package and automatically restarting the node as needed. | ||
- **State Maintenance**: Ensures the current state is preserved by replaying all transactions. | ||
- **In-Memory Node**: Gnodev starts an in-memory node, automatically loading the **examples** folder and any | ||
user-specified paths. | ||
- **Web Interface Server**: Gnodev starts a `gnoweb` server on [`localhost:8888`](https://localhost:8888). | ||
- **Balances and Keybase Customization**: Set account balances, load them from a file, or add new accounts via a flag. | ||
- **Hot Reload**: Monitors the **examples** folder and specified directories for file changes, reloading the | ||
package and automatically restarting the node as needed. | ||
- **State Maintenance**: Ensures the previous node state is preserved by replaying all transactions. | ||
- **Transaction Manipulation**: Allows for interactive cancellation and redoing of transactions. | ||
- **State Export**: Export the current state at any time in a genesis doc format. | ||
|
||
### Commands | ||
While `gnodev` is running, the user can trigger specific actions by pressing | ||
the following combinations: | ||
- **H**: Display help information. | ||
- **R**: Reload the node, without resetting the state. | ||
- **Ctrl+R**: Reset the current node state. | ||
- **Ctrl+C**: Exit `gnodev`. | ||
While `gnodev` is running, trigger specific actions by pressing the following combinations: | ||
- **H**: Display help information. | ||
- **A**: Display account balances. | ||
- **R**: Reload the node manually. | ||
- **P**: Cancel the last action. | ||
- **N**: Redo the last cancelled action. | ||
- **Ctrl+S**: Save the current state. | ||
- **Ctrl+R**: Restore the saved state. | ||
- **E**: Export the current state to a genesis file. | ||
- **Cmd+R**: Reset the current node state. | ||
- **Cmd+C**: Exit `gnodev`. | ||
|
||
### Usage | ||
Run `gnodev` followed by any specific options and/or package paths. The **examples** directory is loaded | ||
automatically. Use `--minimal` to prevent this. | ||
|
||
Example: | ||
``` | ||
gnodev --add-account <bech32/name1>[:<amount1>] ./myrealm | ||
``` | ||
|
||
### `gnobro`: realm interface | ||
`gnobro` is a terminal user interface (TUI) that allows you to browse realms within your terminal. It | ||
automatically connects to `gnodev` for real-time development. In addition to hot reload, it also has the | ||
ability to execute commands and interact with your realm. | ||
|
||
|
||
#### Usage | ||
**gnobro** [**options**] [**PKG_PATH **] | ||
|
||
Run gnobro followed by any specific options and/or a target pacakge path. | ||
|
||
Use `gnobro -h` for a detailed list of options. | ||
|
||
Example: | ||
``` | ||
gnobro gno.land/r/demo/home | ||
``` | ||
|
||
### Loading 'examples' | ||
The **examples** directory is loaded automatically. If working within this folder, you don't have to specify any additional paths to `gnodev`. Use `--minimal` to prevent this. | ||
|
||
### Installation | ||
Run `make install` to install `gnodev`. | ||
|
||
Run `make install.gnobro` to install `gnobro`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
. + | ||
+ . Hello %s, Welcome to | ||
. | ||
+ .,-:::::/ :::. :::. ... . | ||
. ,;;-'````' `;;;;, `;;; .;;;;;;;. | ||
[[[ [[[[[[/ [[[[[. '[[ ,[[ \[[, | ||
"$$c. "$$ + $$$ "Y$c$$ $$$, $$$ | ||
`Y8bo,,,o88o 888 Y88 "888,_ _,88P | ||
. `'YMUP"YMM MMM . YM "YMMMMMP" + | ||
. . | ||
::: + :::. :::. :::. :::::::-. | ||
;;; ;;`;; `;;;;, `;;; ;;, `';, | ||
+ [[[ ,[[ '[[, + [[[[[. '[[ `[[ [[ | ||
$$' c$$$cc$$$c $$$ "Y$c$$ $$, $$ | ||
o88oo,.__ 888 888, 888 Y88 888_,o8P' | ||
""""YUMMM YMM ""` MMM + YM MMMMP"` + | ||
. | ||
+ | ||
press <enter> to continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[0m · . · · | ||
[36m.[37m [36m*[37m [34m.[37m [36m.[37m [36m*[37m [34m.[37m · | ||
· · · · [34m.[37m . [36m.[37m | ||
[1;36m·[0m [34m.[37m . [36m.[37m . · [36m*[37m | ||
. · [34m.[37m [36m.[37m [36m·[37m | ||
[34m░░[37m [34m░░[37m [34m░[37m [34m░░[37m [34m░[37m [34m░░[37m [34m░[37m [34m░░[37m [34m░░░[37m [34m░░░░░░[37m [34m░░░[37m [34m░░░░[37m [34m░[37m [34m░░[37m | ||
[34m░░▒▒░░░▒▒░░░░░▒░░░░░░▒▒░░▒░░▒▒░▒░░░░░░░[37m [34m░░░░░░▒▒░▒▒▒░▒▒▒▒▒▒░░▒▒▒░░░▒▒▒▒░▒░░▒▒░░[37m | ||
[34m▒▒▓▓▒▒▒▓▓▒▒▒▒▒▓▒▒▒▒▒▒▓▓▒▒▓▒▒▓▓▒▓▒▒▒▒▒▒▒░▒▒▒▒▒▒▓▓▒▓▓▓▒▓▓▓▓▓▓▒▒▓▓▓▒▒▒▓▓▓▓▒▓▒▒▓▓▒▒[37m | ||
[34m▓▓██▓▓▓██▓▓▓▓▓█▓▓▓▓▓▓██▓▓█▓▓██▓█▓▓▓▓▓▓▓▒▓▓▓▓▓▓██▓███▓██████▓▓███▓▓▓████▓█▓▓██▓▓[37m | ||
[34m▀██▒███ █████ ██████▌▐██▒██▌██▒███████▓███▓██▌▐██▒██▌██▒█████▒████ ███▒███ ██[37m | ||
[34m ▐▒▒▒█ █▒█▌ ▐▒███▌ ▐▒▒▒▌ ▐▒▒███▌█▒███[30;44m▌[34;40m███▌ ▐▒▒▒▌ ▐▒▒███▌█▒███ █▒▒▒█▌ ▐▒[37m | ||
[34m ▒▒▒▒▄ ▄▒█ ▒█▒█▄ ▒▒▒░ ▀▒▒█▌ ▐▒██[30;44m▐[34;40m █▒█▄ ▒▒▒░ ▀▒▒█▌ ▐▒[1;30m [0;34m█▄ ▄▒▒ ▒ ▒[37m | ||
[34m ░[37m [34m░ ▄ ▄▄▒▌ ▒█▒▀ ▀▒▒ ▒▒▒▀▄ ▄▒[37;44m▄[40m▀▀[44m▄[34;40m▐▒▀ ▀▒▒ ▒▒▒▀▄ ▄▒[1;30m [0;34m█ ▄ ▄▄[37m▄▀▀▄[34m ▒[37m | ||
[34m ▀░ ▒░▒▄░ ▀▄▒▀▒▒ ▀█▒▄▄ ▄■▄▒▒▀[37m [34m▒[37m▌[34m░░[37m▐[34m░▀ ▒ ▀ ▄ ■▒░▀[37m [34m▒[37m [34m▀░ ▒░[37m▌[34m░░[37m▐[34m░ ▀▄[37m | ||
▌[34m░░[37m▐ ▌[34m░░[37m▐ | ||
▄▄▀▀▀▀▀▀▀▄▄▀▀▄▀▀▀▀▀▄ ▄▀▀▀▀▀▄ ▌[34m▒▒[37m▐ ▄▄▀▀▀▀▀▄ ▄▀▄▄▀▀▀▀▀▄ ▄▄▄▄▄▌[34m▒▒[37m▐ | ||
▌[34m▄▓▓▓▓▓▓▓▄[37m [34m▓▓▄▓▓▓▓▓▄[37m▀▀[34m▄▓▓▓▓▓▄[37m▀▄ ▌[34m▓▓[37m▐ ▌[34m▄▓▓▓▓▓▄[37m▀▌[34m▓▌▄▓▓▓▓▓▄[37m▀▀[34m▄▄▄▄▄▄▓▓[37m▐ | ||
▌[34m█▌[1;30m [0;34m██[37m [34m███▀[37m▄▄[34m▀██[37m [34m▐██▀▀▀██▌[37m▐ ▌[34m██[37m▐ ▐[34m▐██▀▀▀██▌[37m [34m███▀[37m▄▄[34m▀██[37m [34m▐██▀▀▀███[37m▐ | ||
▌[34m▀[35;44m░░░░░░░░[37;40m [35;44m░░[34;40m▌[37m▌ ▌[35;44m░░[37;40m [35;44m░░[37;40m [35;44m░░[37;40m▐ ▌[35;44m░░[37;40m▐ ▌[35;44m░░[37;40m [35;44m░░[37;40m [35;44m░░[34;40m▌[37m█ ▌[35;44m░░[37;40m [35;44m░░[34;40m▌[37m [34m▐[35;44m░░[37;40m▐ | ||
▐ [35;44m▒▒[37;40m [35;44m▒▒[34;40m▌[37m▌ ▌[35;44m▒▒[37;40m [35;44m▒▒[40m▌[37m [34m▐[35;44m▒▒[37;40m▐▄▀▄▌[35;44m▒▒[37;40m▐ ▌[35;44m▒▒[34;40m▌[37m [35m▐[44m▒▒[37;40m [35;44m▒▒[40m▌[37m▌ ▌[35;44m▒▒[37;40m [35;44m▒▒[34;40m▌[37m [35m▐[44m▒▒[37;40m▐ | ||
▌[35m▄▄[37m [35;44m▓▓[37;40m [35;44m▓▓[40m▌[37m▌ ▌[35;44m▓▓[37;40m [35;44m▓▓▓[37;40m [35;44m▓▓▓[37;40m [35m▄[44m▓[40m▄[37m [35;44m▓▓[1;30;40m [0m▀▀ [35;44m▓▓▓[37;40m [35m▐[44m▓▓[37;40m [35;44m▓▓[40m▌[37m▌ ▌[35;44m▓▓[37;40m [35;44m▓▓▓[37;40m [35m▐[44m▓▓[37;40m▐ | ||
░ ▌[35m▀███████▀[37m [35m███[37m▐ ▐[35m▐██[37m ▄[35m▀█████▀[37m▄▄[35m▀█▀[37m▄[35m▀████[37m ▄[35m▀████▀██[37m [35m███[37m▐ ▐[35m▐██[37m ▄[35m▀████▀██[37m▐ ░ | ||
▒[1;30m [0m▓▓▄▄▄▄▄▄▄▄▀▄▄▄▀ ▀▄▄▀ ▀▄▄▄▄▄▀ ▀▄▀ ▀▄▄▄▄▀ ▀▄▄▄▄▀▄▄▀▄▄▄▀ ▀▄▄▀ ▀▄▄▄▄▀▄▄▓ ▒ | ||
▓[1;30m [0m▓ | ||
█▓▒░ ░▒▓█ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[0m · . · · | ||
[36m.[37m [36m+[37m [34m.[37m [36m.[37m [36m+[37m [34m.[37m · | ||
· · · · [34m.[37m . [36m.[37m | ||
[1;36m·[0m [34m.[37m . [36m.[37m . · [36m+[37m | ||
. · [34m.[37m [36m.[37m [36m·[37m | ||
[34m░░[37m [34m░░[37m [34m░[37m [34m░░[37m [34m░[37m [34m░░[37m [34m░[37m [34m░░[37m [34m░░░[37m [34m░░░░░░[37m [34m░░░[37m [34m░░░░[37m [34m░[37m [34m░░[37m | ||
[34m░░▒▒░░░▒▒░░░░░▒░░░░░░▒▒░░▒░░▒▒░▒░░░░░░░[37m [34m░░░░░░▒▒░▒▒▒░▒▒▒▒▒▒░░▒▒▒░░░▒▒▒▒░▒░░▒▒░░[37m | ||
[34m▒▒▓▓▒▒▒▓▓▒▒▒▒▒▓▒▒▒▒▒▒▓▓▒▒▓▒▒▓▓▒▓▒▒▒▒▒▒▒░▒▒▒▒▒▒▓▓▒▓▓▓▒▓▓▓▓▓▓▒▒▓▓▓▒▒▒▓▓▓▓▒▓▒▒▓▓▒▒[37m | ||
[34m▓▓██▓▓▓██▓▓▓▓▓█▓▓▓▓▓▓██▓▓█▓▓██▓█▓▓▓▓▓▓▓▒▓▓▓▓▓▓██▓███▓██████▓▓███▓▓▓████▓█▓▓██▓▓[37m | ||
[34m▀██▒███ █████ ██████▌▐██▒██▌██▒███████▓███▓██▌▐██▒██▌██▒█████▒████ ███▒███ ██[37m | ||
[34m ▐▒▒▒█ █▒█▌ ▐▒███▌ ▐▒▒▒▌ ▐▒▒███▌█▒███[30;44m▌[34;40m███▌ ▐▒▒▒▌ ▐▒▒███▌█▒███ █▒▒▒█▌ ▐▒[37m | ||
[34m ▒▒▒▒▄ ▄▒█ ▒█▒█▄ ▒▒▒░ ▀▒▒█▌ ▐▒██[30;44m▐[34;40m █▒█▄ ▒▒▒░ ▀▒▒█▌ ▐▒[1;30m [0;34m█▄ ▄▒▒ ▒ ▒[37m | ||
[34m ░[37m [34m░ ▄ ▄▄▒▌ ▒█▒▀ ▀▒▒ ▒▒▒▀▄ ▄▒[37;44m▄[40m▀▀[44m▄[34;40m▐▒▀ ▀▒▒ ▒▒▒▀▄ ▄▒[1;30m [0;34m█ ▄ ▄▄[37m▄▀▀▄[34m ▒[37m | ||
[34m ▀░ ▒░▒▄░ ▀▄▒▀▒▒ ▀█▒▄▄ ▄■▄▒▒▀[37m [34m▒[37m▌[34m░░[37m▐[34m░▀ ▒ ▀ ▄ ■▒░▀[37m [34m▒[37m [34m▀░ ▒░[37m▌[34m░░[37m▐[34m░ ▀▄[37m | ||
▌[34m░░[37m▐ ▌[34m░░[37m▐ | ||
▄▄▀▀▀▀▀▀▀▄▄▀▀▄▀▀▀▀▀▄ ▄▀▀▀▀▀▄ ▌[34m▒▒[37m▐ ▄▄▀▀▀▀▀▄ ▄▀▄▄▀▀▀▀▀▄ ▄▄▄▄▄▌[34m▒▒[37m▐ | ||
▌[34m▄▓▓▓▓▓▓▓▄[37m [34m▓▓▄▓▓▓▓▓▄[37m▀▀[34m▄▓▓▓▓▓▄[37m▀▄ ▌[34m▓▓[37m▐ ▌[34m▄▓▓▓▓▓▄[37m▀▌[34m▓▌▄▓▓▓▓▓▄[37m▀▀[34m▄▄▄▄▄▄▓▓[37m▐ | ||
▌[34m█▌[1;30m [0;34m██[37m [34m███▀[37m▄▄[34m▀██[37m [34m▐██▀▀▀██▌[37m▐ ▌[34m██[37m▐ ▐[34m▐██▀▀▀██▌[37m [34m███▀[37m▄▄[34m▀██[37m [34m▐██▀▀▀███[37m▐ | ||
▌[34m▀[35;44m░░░░░░░░[37;40m [35;44m░░[34;40m▌[37m▌ ▌[35;44m░░[37;40m [35;44m░░[37;40m [35;44m░░[37;40m▐ ▌[35;44m░░[37;40m▐ ▌[35;44m░░[37;40m [35;44m░░[37;40m [35;44m░░[34;40m▌[37m█ ▌[35;44m░░[37;40m [35;44m░░[34;40m▌[37m [34m▐[35;44m░░[37;40m▐ | ||
▐ [35;44m▒▒[37;40m [35;44m▒▒[34;40m▌[37m▌ ▌[35;44m▒▒[37;40m [35;44m▒▒[40m▌[37m [34m▐[35;44m▒▒[37;40m▐▄▀▄▌[35;44m▒▒[37;40m▐ ▌[35;44m▒▒[34;40m▌[37m [35m▐[44m▒▒[37;40m [35;44m▒▒[40m▌[37m▌ ▌[35;44m▒▒[37;40m [35;44m▒▒[34;40m▌[37m [35m▐[44m▒▒[37;40m▐ | ||
▌[35m▄▄[37m [35;44m▓▓[37;40m [35;44m▓▓[40m▌[37m▌ ▌[35;44m▓▓[37;40m [35;44m▓▓▓[37;40m [35;44m▓▓▓[37;40m [35m▄[44m▓[40m▄[37m [35;44m▓▓[1;30;40m [0m▀▀ [35;44m▓▓▓[37;40m [35m▐[44m▓▓[37;40m [35;44m▓▓[40m▌[37m▌ ▌[35;44m▓▓[37;40m [35;44m▓▓▓[37;40m [35m▐[44m▓▓[37;40m▐ | ||
░ ▌[35m▀███████▀[37m [35m███[37m▐ ▐[35m▐██[37m ▄[35m▀█████▀[37m▄▄[35m▀█▀[37m▄[35m▀████[37m ▄[35m▀████▀██[37m [35m███[37m▐ ▐[35m▐██[37m ▄[35m▀████▀██[37m▐ ░ | ||
▒[1;30m [0m▓▓▄▄▄▄▄▄▄▄▀▄▄▄▀ ▀▄▄▀ ▀▄▄▄▄▄▀ ▀▄▀ ▀▄▄▄▄▀ ▀▄▄▄▄▀▄▄▀▄▄▄▀ ▀▄▄▀ ▀▄▄▄▄▀▄▄▓ ▒ | ||
▓[1;30m [0m▓ | ||
█▓▒░ ░▒▓█ |
Oops, something went wrong.