diff --git a/docs.json b/docs.json index 63f1057..fc81689 100644 --- a/docs.json +++ b/docs.json @@ -329,7 +329,8 @@ "node/node-types", "node/troubleshooting", "node/swagger", - "node/validators" + "node/validators", + "node/cli-reference" ] }, { @@ -1674,4 +1675,4 @@ "content": "**Action required: IBC assets on Sei will become inaccessible** If you hold [USDC.n](https://seiscan.io/address/0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1) (USDC via Noble), [USDT.kava](https://seiscan.io/address/0xb75d0b03c06a926e488e2659df1a861f860bd3d1) (Kava USDT), Wormhole-bridged tokens, or any other IBC asset on Sei, you **must** swap, migrate, or bridge out **before the governance proposal to disable inbound/outbound IBC transfers passes and is activated** to avoid permanent loss of access. After this, Sei will no longer support IBC bridging of assets from Cosmos-based chains to and from Sei Network. Consult the [SIP-03 Migration Guide](/learn/sip-03-migration) for the full list of affected assets, required actions, and supported routes. For USDC.n specifically, see: [Holders of USDC.n Need to Swap or Migrate](https://blog.sei.io/announcements/holders-of-usdcn-need-to-swap-or-migrate/).", "dismissible": true } -} \ No newline at end of file +} diff --git a/node/cli-reference.md b/node/cli-reference.md new file mode 100644 index 0000000..0e85eaf --- /dev/null +++ b/node/cli-reference.md @@ -0,0 +1,90 @@ +--- +title: CLI Reference +description: Reference documentation for node CLI commands and flags. +--- + +# CLI Reference + +This page documents the available CLI commands and flags for node operations. + +--- + +## `apply` + +The `apply` command deploys or updates a node configuration based on a given preset and options. + +### Synopsis + +```bash +apply --preset [flags] +``` + +### Flags + +#### `--preset` + +Specifies the deployment preset to use. For example: + +- `genesis-chain` — deploys a node as part of a new chain with a custom genesis. +- `rpc` — deploys a standard RPC node. + +```bash +apply --preset genesis-chain +``` + +--- + +#### `--genesis-override` + +Sets a key in `spec.genesis.overrides` to customize genesis parameters when deploying with the `genesis-chain` preset. + +**Syntax:** + +```bash +--genesis-override .[....]= +``` + +**Examples:** + +```bash +# Set the staking unbonding time to 600 seconds +apply --preset genesis-chain --genesis-override staking.params.unbonding_time=600s + +# Set the governance voting period +apply --preset genesis-chain --genesis-override gov.params.voting_period=172800s + +# Pass multiple overrides +apply --preset genesis-chain \ + --genesis-override staking.params.unbonding_time=600s \ + --genesis-override gov.params.voting_period=172800s +``` + +**Value parsing:** + +Values are parsed in the following order: + +1. **JSON-compatible types** — numbers, booleans, and JSON objects are parsed as their native JSON types. +2. **Strings** — any value that cannot be parsed as JSON is stored as a plain string (e.g., `600s`). + +| Example value | Stored type | +|---|---| +| `42` | number | +| `true` | boolean | +| `{"key":"val"}` | object | +| `600s` | string | + +**Restrictions and validation:** + +- **`--preset genesis-chain` is required.** Using `--genesis-override` with any other preset (e.g., `rpc`) returns a validation error: + ``` + only valid with --preset genesis-chain + ``` + +- **Keys must have at least two dot-separated segments** in the form `module.field[.field...]`. Single-segment keys (e.g., `staking=value`) are rejected with a validation error. + +- **Empty keys, empty values, and empty path segments are not allowed.** All of the following are invalid: + - `--genesis-override =value` (empty key) + - `--genesis-override staking.params.=value` (empty path segment) + - `--genesis-override staking.params.unbonding_time=` (empty value) + +- The flag is **repeatable** — pass it multiple times to set multiple genesis overrides.