near / near-cli

General purpose command line tools for interacting with NEAR Protocol
https://docs.near.org
MIT License
193 stars 92 forks source link

[v4.0.0] Reorganize, Reduce and Enhance #1082

Closed gagdiez closed 5 months ago

gagdiez commented 5 months ago

This is a proposal for a new major version of near-cli.

The main change is that the code was re-organized so it is simpler to maintain:

The second change is that the complexity of near-cli was reduced by removing a couple of features:

The third change is that Errors are now handled on each command, and not through some obscure middleware.

The fourth change is that a couple of fixes were implemented:

Fifth: besides the removal of commands explained in the second point, there is just one more breaking change:

gagdiez commented 5 months ago

Comparison:

All commands and options for near-cli 4.0.0

Screenshot 2024-01-23 at 13 25 15

Commands and options in the same space for current near-cli

Screenshot 2024-01-23 at 13 26 41 Screenshot 2024-01-23 at 13 27 01
volovyks commented 5 months ago

Lots of good changes. Nice work @gagdiez! Are you sure we want to delete some of the features? Lise staking and ledger? Overall we should move to the Rust version and sunset this one.

gagdiez commented 5 months ago

@volovyks

Edit: stake is for validators? or for users?. Because I would recommend validators to use near-cli-rs and users to use a wallet for staking.

For Ledger, I saw it added a lot of complexity to the code... thought I might be evaluating the situation wrong here. Also, don't want a Ledger to be connected to a project with minimum support.

volovyks commented 5 months ago

@gagdiez stake for users. Ok, we may ask users to use Rust version for Ledger.

gagdiez commented 5 months ago

@volovyks should we then implement stake, unstake and withdraw? I do not like the idea of having only stake, since then anyway you need a wallet to unstake it.

Otherwise, we can remove it now, and bring it back later if anyone was handling their staking through the CLI (which again, would be weird, since they cannot unstake it through there later)

gagdiez commented 5 months ago

Merged since it is simpler to start fixing this version that keep working on the previous one (for example, TLA account creation is now broken)