near / near-cli-rs

near CLI is your human-friendly companion that helps to interact with NEAR Protocol from command line.
https://near.cli.rs
Apache License 2.0
95 stars 55 forks source link

Migrate all the docs to use near-cli-rs instead of JS version #235

Open frol opened 1 year ago

frol commented 1 year ago

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:

  1. 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
  1. 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

image

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.

elliotBraem commented 9 months ago

I've had near-cli JS for some time now and it's really for no reason other than:

I saw it first in the docs:

Screenshot 2023-12-05 at 11 37 14 AM

I did not feel there was urgency to use the rust implementation instead:

Screenshot 2023-12-05 at 11 38 00 AM

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"

frol commented 9 months ago

@elliotBraem Sure, consider submitting the PR to the docs ;-)

andreyddk commented 8 months ago

@frol Thank you for the description of migration cli. I have started to dive into NEAR, and this path is not described.