From 43859d4dba0ac271cf85569fd7f33a40426aa1f3 Mon Sep 17 00:00:00 2001 From: mix irving Date: Thu, 20 Jun 2024 09:34:49 +1200 Subject: [PATCH] merge main (#128) * fix author & version: 0.0.1 (#99) * go back * 0.0.1 * Improves README for self-surface. (#100) * fixup --------- Co-authored-by: Frankie Co-authored-by: Johnny <9611008+johnnymatthews@users.noreply.github.com> --- README.md | 130 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 92 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index ce03f8b..fe05361 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,29 @@ npm install -g @entropyxyz/cli ## Usage -Start an interactive interface: +### Interactive mode + ```bash entropy ``` -Output current balances: +This command will bring you to the main menu: + ```output + ? Select Action (Use arrow keys) + > Manage Accounts + Balance + Register + Sign + Transfer + Deploy Program + User Programs + Exit + ``` + +### Programmatic mode + ```bash -entropy balance +entropy balance 5GYvMHuB8J4mpJFCJ7scdR8AXGbT69B2bAqbNxPEa9ZSgEJm ``` See help on programmatic usage: @@ -28,53 +43,94 @@ entropy --help # all commands entropy balance --help # a specific command ``` -## Build and run -Follow these steps to build and install the CLI: +### Available functions -1. Ensure you have the correct Yarn and Node version installed: +| Function | Description | +| -------- | ----------- | +| Manage accounts | Create, import, and list your locally stored Entropy accounts. | +| Balance | Show the balance of any locally stored accounts. | +| Register | Register a locally stored account with the Entropy network. | +| Sign | Get a signature from the Entropy network using a locally stored, registered account. | +| Transfer | Transfer funds from a locally stored account to any other address. | +| Deploy Program | Deploy a program to the Entropy network using a locally stored account. | +| User Programs | List the programs stored on the Entropy network by any locally stored accounts. | - ```shell - yarn --version && node --version - - # Output example: - # 1.22.22 - # v20.9.0 or above - ``` +For more instructions on using the CLI, check out [docs.entropy.xyz/reference/cli](https://docs.entropy.xyz/reference/cli). -1. Grab this repository and move into the new directory: +## Support - ```bash - git clone https://github.com/entropyxyz/cli - cd cli - ``` +Need help with something? [Head over to the Entropy Community repository for support or to raise a ticket →](https://github.com/entropyxyz/community#support) -1. Build the project: +## License - ```plaintext - yarn +This project is licensed under [GNU Affero General Public License v3.0](./LICENSE). - # yarn install v1.22.22 - # [1/4] Resolving packages... - ``` + +To read about programmatic use: +```bash +yarn start --help +``` + +## Development + +
+ + Development install + + +1. Install Node + yarn 1.22.x + + - we recommend installing Node with e.g. [NVM](https://github.com/nvm-sh/nvm) + - enable yarn by running `corepack enable` + +1. Grab this repository and move into the new directory: + + ```bash + git clone https://github.com/entropyxyz/cli + cd cli + ``` + +1. Build the CLI with Yarn: + + ```bash + yarn + ``` 1. Start the CLI: - - For an interactive text user interface: - ```bash - yarn start - ``` +For an interactive text user interface: + +```bash +yarn start +``` - To read about programmatic use: - ```bash - yarn start --help - ``` +You should now see the main menu: + ```output + ? Select Action (Use arrow keys) + > Manage Accounts + Balance + Register + Sign + Transfer + Deploy Program + User Programs + Exit + ``` + +For programmatic use, see: +```bash +yarn start --help +``` -### Testing bin script +
+
+ + Global install + ```bash -npm i -g +npm install -g ``` This will register the `entropy` bin script globally so that you can run @@ -82,6 +138,4 @@ This will register the `entropy` bin script globally so that you can run entropy --help ``` -## Support - -Need help with something? [Head over to the Entropy Community repository for support or to raise a ticket →](https://github.com/entropyxyz/community#support) +