iotaledger / iotaledger/wasp

Refactor the wasp-cli

Open
#636 0 comments 0 reactions 1 assignee Claimed by @cwarnerdev View on GitHub
Dominant language
Go
Stars
7
Forks
13
PR merge metrics
No merged PRs in 30d

Description

The wasp-cli has grown over time and in my opinion, needs some focused improvements:

* Contains unused legacy functions (they don't function anymore, don't do anything, or panic)
* Misses more important functionality (e.g., parsing contract call args)
* Even with all the available commands, it's difficult to get a clear picture of the Chain.
* Lacks proper command documentation in help listings
* No structured output options (JSON) for programmatic consumption
* Asset parsing and key management needs improvement
* Our cluster tests rely on RegEx parsing of CLI output, due to the missing JSON output
* Some commands require a connection to an ISC node, even when it's not needed (Deposits and general on ledger requests for example)

I propose we:

* Replace Viper with a lighter alternative to reduce dependencies and size
* Make the cli only rely on the WebAPI where possible, and keep the wasp dependency to the most minimum, if possible down to 0.
* This will at least for the chain deployment require us to provide a new API Route to initialize an empty chain (which is simple)
* Introduce a formatting library like `glazed` to provide different output formats
* Remove unused commands to streamline the codebase
* Improve the code base overall, especially refactoring code duplication
* Introduce new commands to give a better oversight of the chain, blocks, requests and execution status

This would improve developer experience, make testing more reliable, and provide better integration with other tools.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.