Migrate all the docs to use near-cli-rs instead of JS version
frol opened this issue · 3 comments
This is a massive effort, but it will be a quality of life improvement for many!
There is already a great start here: https://docs.near.org/tools/near-cli-rs (note, all the pages on docs.near.org have "Edit this page" at the bottom, so feel free to use them)
We still lack a couple of features in cargo-near
to replace JS version with new CLIs, but even without that we can already replace all the featured commands with pure near.cli.rs!
https://docs.near.org/develop/deploy
# Automatically deploy the wasm in a new account
near dev-deploy <route_to_wasm>
dev-deploy
will be resolved with cargo near deploy
, but since we are not there yet:
- Create a new testnet account:
near account create-account sponsor-by-faucet-service my-new-dev-account.testnet autogenerate-new-keypair save-to-keychain network-config testnet
- Deploy the Wasm file:
near contract deploy my-new-dev-account.testnet use-file ./target/wasm32-unknown-unknown/release/my-contract.wasm without-init-call network-config testnet sign-with-keychain
Most of the other commands will be automatically suggested to when you just run them as-is with near.cli.rs installed instead of JS CLI. So take these commands: https://docs.near.org/develop/lock
So those who will update the commands in the docs could just run them and copy the new commands from their terminal as it is suggested, and replace it in the docs.
I've had near-cli JS for some time now and it's really for no reason other than:
I did not feel there was urgency to use the rust implementation instead:
Should we consider adding urgency to the javascript cli to use the rust-cli instead, rather than an info saying an alternative is available?
"Warning"
"The rust implementation of the NEAR CLI is more supported and referenced throughout the docs"
or
"We advise to use the rust implementation of the NEAR CLI instead"
@elliotBraem Sure, consider submitting the PR to the docs ;-)