From 31003a5d775f4586faffb935fdfe8befdbcd8134 Mon Sep 17 00:00:00 2001 From: Johnny <9611008+johnnymatthews@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:30:48 -0400 Subject: [PATCH] Moves CLI into it's own section. (#273) * Tests adding CLI to it's own sub-section. * Includes list pages in list pages... --- .../command-line-interface/_index.md | 6 + .../command-line-interface/install.md | 118 ++++++ .../programmatic-cli.md} | 368 +----------------- .../text-based-user-interface.md | 149 +++++++ .../command-line-interface/troubleshooting.md | 46 +++ themes/hextra/layouts/docs/list.html | 2 +- 6 files changed, 339 insertions(+), 350 deletions(-) create mode 100644 content/reference/command-line-interface/_index.md create mode 100644 content/reference/command-line-interface/install.md rename content/reference/{command-line-interface.md => command-line-interface/programmatic-cli.md} (51%) create mode 100644 content/reference/command-line-interface/text-based-user-interface.md create mode 100644 content/reference/command-line-interface/troubleshooting.md diff --git a/content/reference/command-line-interface/_index.md b/content/reference/command-line-interface/_index.md new file mode 100644 index 00000000..01d7bb74 --- /dev/null +++ b/content/reference/command-line-interface/_index.md @@ -0,0 +1,6 @@ +--- +title: "CLI" +lead: "The command-line interface (CLI) is a straightforward way to experiment with the Entropy network and explore common workflows." +aliases: + - "cli" +--- diff --git a/content/reference/command-line-interface/install.md b/content/reference/command-line-interface/install.md new file mode 100644 index 00000000..b86258a7 --- /dev/null +++ b/content/reference/command-line-interface/install.md @@ -0,0 +1,118 @@ +--- +title: "Install and Configure" +lead: "This guide covers everything you need to get up and running with the Entropy CLI. We'll walk you through installation, configuration, and even log management." +weight: 5 +--- + +## Install + +Follow these steps to install Entropy globally using NPM: + +1. The CLI requires Node version 20 or higher to run: + + ```shell + node --version + ``` + + ```output + v23.1.0 + ``` + + {{< callout type="info" >}} + Consider using [Node Version Manager (NVM)](https://github.com/nvm-sh/nvm) to keep your Node installation organized. NVM also makes it trivial to switch between Node versions when necessary. + {{< /callout >}} + +1. Install the Entropy CLI globally using NPM: + + ```shell + npm install --global @entropyxyz/cli + ``` + +1. You can now run the CLI from anywhere using `entropy`: + + ```shell + entropy + ``` + + ```output + Usage: entropy [options] [command] + + CLI interface for interacting with entropy.xyz. Running without commands starts an interactive ui + + Options: + -e, --endpoint Runs entropy with the given endpoint and ignores + network endpoints in config. Can also be given a + stored endpoint name from config eg: `entropy + + --endpoint test-net`. (default: + "ws://testnet.entropy.xyz:9944/", env: ENDPOINT) + -h, --help display help for command + + Commands: + list|ls List all accounts. Output is JSON of form [{ name, + address, data }] + + balance [options]
Get the balance of an Entropy account. Output is a + + number + transfer [options] Transfer funds between two Entropy accounts. + sign [options]
Sign a message using the Entropy network. Output is + a signature (string) + ``` + + +1. You can also interact with the CLI through the TUI by adding `tui`: + + ```shell + entropy tui + ``` + + ```output + ? Select Action (Use arrow keys) + + ❯ Manage Accounts + Balance + Register + Sign + Transfer + Deploy Program + User Programs + Exit + ``` + +## Configuration + +The CLI uses a configuration file to set and store basic information. This CLI uses [env-paths](https://www.npmjs.com/package/env-paths) to determine where configurations files should be stored: + +- **Arch**: `~/.config/entropy-cryptography/entropy-cli.json` +- **MacOS**: `/Library/Preferences/entropy-cryptography/entropy-cli.json` +- **Ubuntu**: `~/.config/entropy-cryptography/entropy-cli.json` +- **Windows**: `C:\Users\\AppData\Roaming\entropy-cryptography\Config\entropy-cli.json` + +### Config file contents + +This configuration file contains: + +| Description | Name in configuration file | +| ----------- | -------------------------- | +| Account information | `accounts: [...]` | +| Which account is currently selected | `selectAccount` | +| Endpoints that you are connected to | `endpoints: {...}` | +| Configuration version | `migration-version` | + +{{< callout type="danger" >}} +The config file contains your unencrypted private key. +{{< /callout >}} + +### Deleting your config + +The config file gets generated the first time that you start the CLI. If you somehow _break_ your config, you can delete your existing config and start the CLI -- it will generate a new base config. + +## Logs + +Similar to the configuration file, log files for this CLI can be found in the default [env-paths](https://www.npmjs.com/package/env-paths) locations: + +- **Arch**: `~/.local/state/entropy-cryptography/` +- **MacOS**: `/Library/Logs/entropy-cryptography/` +- **Ubuntu**: `~/.local/state/entropy-cryptography/` +- **Windows**: `C:\Users\\AppData\Local\entropy-cryptography\Log` diff --git a/content/reference/command-line-interface.md b/content/reference/command-line-interface/programmatic-cli.md similarity index 51% rename from content/reference/command-line-interface.md rename to content/reference/command-line-interface/programmatic-cli.md index 2ab52b26..fde7e1ac 100644 --- a/content/reference/command-line-interface.md +++ b/content/reference/command-line-interface/programmatic-cli.md @@ -1,107 +1,11 @@ --- -title: "Command-line interface" -lead: "The command-line interface (CLI) is a straightforward way to experiment with the Entropy network and explore common workflows." +title: "Programmatic CLI" +lead: "Pass arguments directly to the CLI as single-line terminal commands." aliases: - "cli" +weight: 10 --- -{{< cards cols=2 >}} - - {{< card - link="#programmatic-cli" - title="Programmatic CLI" - image="/images/entropy-cli-terminal.png" - subtitle="Pass arguments directly to the CLI as single-line terminal commands." - >}} - - {{< card - link="#interactive-cli" - title="Interactive CLI" - image="/images/entropy-tui-terminal.png" - subtitle="Use the text-based user interface (TUI) to interact with the CLI tool." - >}} - -{{< /cards >}} - -## Install - -Follow these steps to install Entropy globally using NPM: - -1. The CLI requires Node version 20 or higher to run: - - ```shell - node --version - ``` - - ```output - v23.1.0 - ``` - - {{< callout type="info" >}} - Consider using [Node Version Manager (NVM)](https://github.com/nvm-sh/nvm) to keep your Node installation organized. NVM also makes it trivial to switch between Node versions when necessary. - {{< /callout >}} - -1. Install the Entropy CLI globally using NPM: - - ```shell - npm install --global @entropyxyz/cli - ``` - -1. You can now run the CLI from anywhere using `entropy`: - - ```shell - entropy - ``` - - ```output - Usage: entropy [options] [command] - - CLI interface for interacting with entropy.xyz. Running without commands starts an interactive ui - - Options: - -e, --endpoint Runs entropy with the given endpoint and ignores - network endpoints in config. Can also be given a - stored endpoint name from config eg: `entropy - - --endpoint test-net`. (default: - "ws://testnet.entropy.xyz:9944/", env: ENDPOINT) - -h, --help display help for command - - Commands: - list|ls List all accounts. Output is JSON of form [{ name, - address, data }] - - balance [options]
Get the balance of an Entropy account. Output is a - - number - transfer [options] Transfer funds between two Entropy accounts. - sign [options]
Sign a message using the Entropy network. Output is - a signature (string) - ``` - - -1. You can also interact with the CLI through the TUI by adding `tui`: -<<<<<<< HEAD - - ```shell - entropy tui - ``` - - ```output - ? Select Action (Use arrow keys) - - ❯ Manage Accounts - Balance - Register - Sign - Transfer - Deploy Program - User Programs - Exit - ``` - -## Programmatic CLI - You can interact with Entropy quickly by giving single-line commands to the `entropy` executable. ```output @@ -123,7 +27,7 @@ Commands: program Commands for working with programs deployed to the Entropy Network ``` -### `tui` +## `tui` ```output Usage: entropy tui [options] @@ -136,7 +40,7 @@ Options: -h, --help display help for command ``` -### `account` +## `account` ```output Usage: entropy account [options] [command] @@ -154,7 +58,7 @@ Commands: help [command] display help for command ``` -#### `create` +### `create` ```output Usage: entropy account create|new [options] @@ -169,7 +73,7 @@ Options: -h, --help display help for command ``` -#### `import` +### `import` ```output Usage: entropy account import [options] @@ -185,7 +89,7 @@ Options: -h, --help display help for command ``` -#### `list` +### `list` ```output Usage: entropy account list|ls [options] @@ -196,7 +100,7 @@ Options: -h, --help display help for command ``` -#### `register` +### `register` ```output Usage: entropy account register [options] @@ -209,7 +113,7 @@ Options: -h, --help display help for command ``` -### `sign` +## `sign` ```output Usage: entropy sign [options] @@ -225,7 +129,7 @@ Options: -h, --help display help for command ``` -### `balance` +## `balance` ```output Usage: entropy balance [options] @@ -240,7 +144,7 @@ Options: -h, --help display help for command ``` -### `transfer` +## `transfer` ```output Usage: entropy transfer [options] @@ -257,7 +161,7 @@ Options: -h, --help display help for command ``` -### `program` +## `program` ```output Usage: entropy program [options] [command] @@ -277,7 +181,7 @@ Commands: help [command] display help for command ``` -#### `deploy` +### `deploy` ```output Usage: entropy program deploy [options] @@ -296,7 +200,7 @@ Options: -h, --help display help for command ``` -#### `get` +### `get` ```output Usage: entropy program get [options] @@ -312,7 +216,7 @@ Options: -h, --help display help for command ``` -#### `listDeployed` +### `listDeployed` ```output Usage: entropy program listDeployed [options] @@ -325,7 +229,7 @@ Options: -h, --help display help for command ``` -#### `add` +### `add` ```output Usage: entropy program add [options] [programConfigPath] @@ -345,7 +249,7 @@ Options: -h, --help display help for command ``` -#### `remove` +### `remove` ```output Usage: entropy program remove|rm [options] @@ -365,7 +269,7 @@ Options: -h, --help display help for command ``` -#### `list` +### `list` ```output Usage: entropy program list|ls [options] @@ -381,237 +285,3 @@ Options: -e, --endpoint Runs entropy with the given endpoint and ignores network endpoints in config. Can also be given a stored endpoint name from config eg: `entropy --endpoint test-net`. (default: "wss://testnet.entropy.xyz/", env: ENTROPY_ENDPOINT) -h, --help display help for command ``` - -## Text-based user interface - -```output - @@@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ - @@@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ - @@@@@@@@@@ @@@@@@@@@@ @@@@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ - @@@@@ @@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ - @@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@ - @@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@ - @@@@@@ TEST - @@@@@@ *NET - @@@@@@ ENTROPY-CLI - @@@@@@ COREv0.3.0 - -? Select Action (Use arrow keys) -❯ Manage Accounts - Entropy Faucet - Balance - Register - Sign - Transfer - Deploy Program - User Programs - Exit -``` - -The following functions are available within the CLI using the text-based user interface (TUI). To start the TUI, simply enter `entropy tui` without any arguments into your terminal: - -```shell -entropy tui -``` - -```output -? Select Action (Use arrow keys) - -❯ Manage Accounts - Balance - Register - Sign - Transfer - Deploy Program - User Programs - Exit -``` - -### Manage Accounts - -Create, import, and list your accounts. - -```output -❯ Create/Import Account - Select Account - List Accounts - Exit to Main Menu -``` - -### Entropy Faucet - -Get test funds to spend on the testnet. - -```output -Account: 5F3xmKa3WRkoHR4o6XjFQaWF2EskhtSh4ST5wY5cfsD9JYbC has been successfully funded with 20,000,000,000 BITS -``` - -### Balance - -Get the balance of an account. You can select any of the accounts stored locally or enter an Entropy address. - -```output -? Select Action Balance -Address 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv has a balance of: 382000000000000 bits -? Return to main menu? (Y/n) -``` - -### Register - -Register a locally stored account with the Entropy network. - -```output -Attempting to register the address: 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv -Your address 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv has been successfully registered. -``` - -The selected account must have available funds. Each registration costs about `400000000` bits. - -### Sign - -Sign a message using a registered account. - -```output -? Choose account: (Use arrow keys) - aragon (5FTwtSAjnKFybzkAKvyEo7owikXcHXmwzN7MzjwDNKEbjkub) -> charlie (5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT) - Other -``` - -### Transfer - -Transfer funds from a locally stored account to any other valid Entropy address. - -```output -? Select Action Transfer -? Input amount to transfer: 12345 -? Input recipient's address: 5G92hBs4UfZpVFYtBmmN3UqPTzGgotq7PSA3XfBMALfvWDUb -Transferring Funds |++++___________________| 22% -``` - -The `amount to transfer` value is in whole units, not bits. So transferring `1` would equal `10000000000` bits. - -### Deploy Program - -Deploy a program from a locally stored account. - -```output -? Select Action Deploy Program -? Select your action: (Use arrow keys) -> Deploy - Get Program Pointers - - Exit -``` - -### User Programs - -View all programs deployed to the network from locally stored accounts. - -```output -? Select Action User Programs -? What would you like to do? (Use arrow keys) -> View My Programs - Add a Program to My List - Remove a Program from My List - Check if Program Exists - Exit to Main Menu -``` - -## Configuration - -The CLI uses a configuration file to set and store basic information. This CLI uses [env-paths](https://www.npmjs.com/package/env-paths) to determine where configurations files should be stored: - -- **Arch**: `~/.config/entropy-cryptography/entropy-cli.json` -- **MacOS**: `/Library/Preferences/entropy-cryptography/entropy-cli.json` -- **Ubuntu**: `~/.config/entropy-cryptography/entropy-cli.json` -- **Windows**: `C:\Users\\AppData\Roaming\entropy-cryptography\Config\entropy-cli.json` - -### Config file contents - -This configuration file contains: - -| Description | Name in configuration file | -| ----------- | -------------------------- | -| Account information | `accounts: [...]` | -| Which account is currently selected | `selectAccount` | -| Endpoints that you are connected to | `endpoints: {...}` | -| Configuration version | `migration-version` | - -{{< callout type="danger" >}} -The config file contains your unencrypted private key. -{{< /callout >}} - -### Deleting your config - -The config file gets generated the first time that you start the CLI. If you somehow _break_ your config, you can delete your existing config and start the CLI -- it will generate a new base config. - -## Logs - -Similar to the configuration file, log files for this CLI can be found in the default [env-paths](https://www.npmjs.com/package/env-paths) locations: - -- **Arch**: `~/.local/state/entropy-cryptography/` -- **MacOS**: `/Library/Logs/entropy-cryptography/` -- **Ubuntu**: `~/.local/state/entropy-cryptography/` -- **Windows**: `C:\Users\\AppData\Local\entropy-cryptography\Log` - -### Log file contents - -There are three types of log file: - -- **Debug**: Contains detailed technical information useful for troubleshooting during software development and maintenance. -- **Error**: Records specific software failures, including the time, severity, and context of each error. -- **Info**: Tracks general system events, providing a high-level overview of the application's behaviour. - -## Troubleshooting - -Here are some common problems you could encounter and how to get around them. - -#### How do I quit the CLI? - -Press `CTRL` + `c` at any point to exit the CLI program, even if you're within a function: - -```output -? Select Action Transfer -? Input amount to transfer: 1000 -? Input recipient's address: <----- Pressed `CTRL` + `c` here. -error Command failed with exit code 130. -info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -user@computer: $ -``` - -#### ERR::: RpcError: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low - -This likely means that you don't have enough funds in the selected account to complete that function. Double-check that you've selected the correct account and that the account has enough funds in it. If you need more test funds, [head over to the faucet for more]({{< relref "../guides/get-funds.md" >}}). - -#### CLI crashes when registering - -You may encounter the following error when registering: - -```output -2024-06-05 00:11:42 REGISTRY: Unknown signed extensions ValidateConfirmRegistered found, treating them as no-effect -2024-06-05 00:11:42 API/INIT: RPC methods not decorated: chainSpec_v1_chainName, chainSpec_v1_genesisHash, chainSpec_v1_properties -Attempting to register the address: 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv -/root/cli/src/config/index.ts:21 - return JSON.parse(configBuffer.toString()) - ^ -SyntaxError: Unexpected end of JSON input - at JSON.parse () - at Object.get (/root/cli/src/config/index.ts:21:15) - - at async EventEmitter. (/root/cli/src/common/initializeEntropy.ts:102:23) -``` - -This is a bug that the Entropy team are aware of, and are working on a fix. In the meantime, restart the CLI and try to register that account again. If it keep failing, please raise an issue in the [Entropy CLI repository](https://github.com/entropyxyz/cli/issues). - -#### How do I enter the text-based user interface? - -[Install]({{< relref "#install" >}}) the `entropy` executable and enter `entropy` from the command line without any arguments. diff --git a/content/reference/command-line-interface/text-based-user-interface.md b/content/reference/command-line-interface/text-based-user-interface.md new file mode 100644 index 00000000..1de741a5 --- /dev/null +++ b/content/reference/command-line-interface/text-based-user-interface.md @@ -0,0 +1,149 @@ +--- +title: "Text-based UI" +lead: "Use the text-based user interface (TUI) to interact with the CLI tool." +aliases: + - "cli" +weight: 20 +--- + +```output + @@@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ + @@@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ + @@@@@@@@@@ @@@@@@@@@@ @@@@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ + @@@@@ @@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ + @@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@ + @@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@ + @@@@@@ TEST + @@@@@@ *NET + @@@@@@ ENTROPY-CLI + @@@@@@ COREv0.3.0 + +? Select Action (Use arrow keys) +❯ Manage Accounts + Entropy Faucet + Balance + Register + Sign + Transfer + Deploy Program + User Programs + Exit +``` + +The following functions are available within the CLI using the text-based user interface (TUI). To start the TUI, simply enter `entropy tui` without any arguments into your terminal: + +```shell +entropy tui +``` + +```output +? Select Action (Use arrow keys) + +❯ Manage Accounts + Balance + Register + Sign + Transfer + Deploy Program + User Programs + Exit +``` + +## Manage Accounts + +Create, import, and list your accounts. + +```output +❯ Create/Import Account + Select Account + List Accounts + Exit to Main Menu +``` + +## Entropy Faucet + +Get test funds to spend on the testnet. + +```output +Account: 5F3xmKa3WRkoHR4o6XjFQaWF2EskhtSh4ST5wY5cfsD9JYbC has been successfully funded with 20,000,000,000 BITS +``` + +## Balance + +Get the balance of an account. You can select any of the accounts stored locally or enter an Entropy address. + +```output +? Select Action Balance +Address 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv has a balance of: 382000000000000 bits +? Return to main menu? (Y/n) +``` + +## Register + +Register a locally stored account with the Entropy network. + +```output +Attempting to register the address: 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv +Your address 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv has been successfully registered. +``` + +The selected account must have available funds. Each registration costs about `400000000` bits. + +## Sign + +Sign a message using a registered account. + +```output +? Choose account: (Use arrow keys) + aragon (5FTwtSAjnKFybzkAKvyEo7owikXcHXmwzN7MzjwDNKEbjkub) +> charlie (5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT) + Other +``` + +## Transfer + +Transfer funds from a locally stored account to any other valid Entropy address. + +```output +? Select Action Transfer +? Input amount to transfer: 12345 +? Input recipient's address: 5G92hBs4UfZpVFYtBmmN3UqPTzGgotq7PSA3XfBMALfvWDUb +Transferring Funds |++++___________________| 22% +``` + +The `amount to transfer` value is in whole units, not bits. So transferring `1` would equal `10000000000` bits. + +## Deploy Program + +Deploy a program from a locally stored account. + +```output +? Select Action Deploy Program +? Select your action: (Use arrow keys) +> Deploy + Get Program Pointers + + Exit +``` + +## User Programs + +View all programs deployed to the network from locally stored accounts. + +```output +? Select Action User Programs +? What would you like to do? (Use arrow keys) +> View My Programs + Add a Program to My List + Remove a Program from My List + Check if Program Exists + Exit to Main Menu +``` diff --git a/content/reference/command-line-interface/troubleshooting.md b/content/reference/command-line-interface/troubleshooting.md new file mode 100644 index 00000000..55169734 --- /dev/null +++ b/content/reference/command-line-interface/troubleshooting.md @@ -0,0 +1,46 @@ +--- +title: "Troubleshooting" +lead: "This page covers some common problems you could encounter while using the Entropy CLI and how to get around them." +weight: 100 +--- + +## How do I quit the CLI? + +Press `CTRL` + `c` at any point to exit the CLI program, even if you're within a function: + +```output +? Select Action Transfer +? Input amount to transfer: 1000 +? Input recipient's address: <----- Pressed `CTRL` + `c` here. +error Command failed with exit code 130. +info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +user@computer: $ +``` + +## ERR::: RpcError: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low + +This likely means that you don't have enough funds in the selected account to complete that function. Double-check that you've selected the correct account and that the account has enough funds in it. If you need more test funds, [head over to the faucet for more]({{< relref "get-funds.md" >}}). + +## CLI crashes when registering + +You may encounter the following error when registering: + +```output +2024-06-05 00:11:42 REGISTRY: Unknown signed extensions ValidateConfirmRegistered found, treating them as no-effect +2024-06-05 00:11:42 API/INIT: RPC methods not decorated: chainSpec_v1_chainName, chainSpec_v1_genesisHash, chainSpec_v1_properties +Attempting to register the address: 5Dcps2RdXPQfiJBxxDnrF8iDzDHcnZC8rb5mcJ3xicqzhYbv +/root/cli/src/config/index.ts:21 + return JSON.parse(configBuffer.toString()) + ^ +SyntaxError: Unexpected end of JSON input + at JSON.parse () + at Object.get (/root/cli/src/config/index.ts:21:15) + + at async EventEmitter. (/root/cli/src/common/initializeEntropy.ts:102:23) +``` + +This is a bug that the Entropy team are aware of, and are working on a fix. In the meantime, restart the CLI and try to register that account again. If it keep failing, please raise an issue in the [Entropy CLI repository](https://github.com/entropyxyz/cli/issues). + +## How do I enter the text-based user interface? + +[Install]({{< relref "#install" >}}) the `entropy` executable and enter `entropy` from the command line without any arguments. diff --git a/themes/hextra/layouts/docs/list.html b/themes/hextra/layouts/docs/list.html index d68fa8bf..d388a76d 100644 --- a/themes/hextra/layouts/docs/list.html +++ b/themes/hextra/layouts/docs/list.html @@ -12,7 +12,7 @@

{{ .Title }}

{{ .Params.Lead }}

- {{ range .RegularPages }} + {{ range .Pages }}