Skip to content

Commit

Permalink
Remove forc-gm in the docs for now (FuelLabs#1680)
Browse files Browse the repository at this point in the history
* Remove forc-gm reference for now

* Replace with forc-explore

* Add final line

* typo: forc network explorer -> fuel network explorer
  • Loading branch information
bing authored May 26, 2022
1 parent 8ca790e commit ab4a505
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions docs/src/forc/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,31 @@

Plugins can be used to extend `forc` with new commands that go beyond the native commands mentioned in the previous chapter. While the Fuel ecosystem provides a few commonly useful plugins (`forc-fmt`, `forc-lsp`, `forc-explore`), anyone can write their own!

Let's install a starter plugin, `forc-gm`, and take a look at how it works underneath:
Let's install a plugin, `forc-explore`, and see what's underneath the plugin:

```sh
cargo install forc-gm
cargo install forc-explore
```

Check that we have installed `forc-gm`:
Check that we have installed `forc-explore`:

```console
$ forc plugins
/Users/<USER>/.cargo/bin/forc-gm
Installed Plugins:
forc-explore
```

Underneath, `forc-gm` is a simple CLI app, with [clap](https://docs.rs/clap/latest/clap/) as the only dependency:

```rust
{{#include ../../../forc-gm/src/main.rs}}
```

You can say gm, or you can greet Fuel:
`forc-explore` runs the Fuel Network Explorer, which you can run and check out for yourself:

```console
$ forc gm
gn!
$ forc gm fuel
gn from Fuel!
$ forc explore
Fuel Network Explorer 0.1.1
Running server on http://127.0.0.1:3030
Server::run{addr=127.0.0.1:3030}: listening on http://127.0.0.1:3030
```

You can visit http://127.0.0.1:3030 to check out the network explorer!

## Writing your own plugin

We encourage anyone to write and publish their own `forc` plugin to enhance their development experience.
Expand Down

0 comments on commit ab4a505

Please sign in to comment.