Skip to content

Commit 44feb95

Browse files
committed
refactor: update CLI command documentation for iApp initialization and testing
1 parent 2ae480d commit 44feb95

File tree

1 file changed

+75
-37
lines changed

1 file changed

+75
-37
lines changed

src/references/iapp-generator/building-your-iexec-app.md

Lines changed: 75 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ You'll set up:
8181
- **Protected Data** – Encrypted data accessible only inside the TEE.
8282
- **App Secret** – Immutable secret provisioned by the iApp owner.
8383

84-
::: warning 💡
84+
::: tip 💡
8585

8686
The Secret Management Service (SMS) securely stores application developer
8787
secrets. Once set, the App Secret is immutable and cannot be updated. Use with
@@ -126,68 +126,106 @@ algorithms and data processing here.
126126

127127
## 🛠️ CLI Commands Reference
128128

129-
### Core Commands
130-
131-
#### `iapp init`
129+
### `iapp init`
132130

133131
**Purpose**: Initialize a new iApp project
134-
**Usage**: `iapp init`
135-
**Options**: Interactive prompts for project configuration
132+
**Usage**: `iapp init [options]`
136133
**What it does**: Creates project structure, configuration files, and basic
137-
templates
134+
templates through interactive prompts.
138135

139-
#### `iapp test`
136+
### `iapp test`
140137

141138
**Purpose**: Test your iApp locally before deployment
142-
**Usage**: `iapp test`
143-
**Options**: None
144-
**What it does**: Runs a basic test locally to validate your application logic
139+
**Usage**: `iapp test [options]`
140+
**Options**:
141+
142+
- `-v, --version` [boolean] – Show version number
143+
- `--args <string>` – Arguments accessible inside the iApp (use quotes to group)
144+
- `--protectedData <string>` – Specify the protected data mock name (default or
145+
custom via `iapp mock`)
146+
- `--inputFile <string>` – One or multiple input files (public URLs) available
147+
inside the iApp at `$IEXEC_INPUT_FILE_NAME_*`
148+
- `--requesterSecret <array>` – Key-value requester secrets (`index=value`)
149+
available inside the iApp at `$IEXEC_REQUESTER_SECRET_*`
145150

146-
#### `iapp deploy`
151+
### `iapp deploy`
147152

148153
**Purpose**: Deploy your iApp to the iExec network
149-
**Usage**: `iapp deploy`
150-
**Options**: None
151-
**What it does**: Turns your code into a TEE app and registers the iApp on iExec
154+
**Usage**: `iapp deploy [options]`
155+
**Options**:
152156

153-
#### `iapp run <iAppAddress>`
157+
- `--chain <string>` – Specify the blockchain network for deployment (e.g.,
158+
`goerli`, `mainnet`)
159+
160+
### `iapp run <iAppAddress>`
154161

155162
**Purpose**: Execute your deployed iApp on a worker node
156-
**Usage**: `iapp run <iAppAddress>`
157-
**Options**: None
158-
**What it does**: Sends your iApp for execution on the iExec network
163+
**Usage**: `iapp run <iAppAddress> [options]`
164+
**Positional arguments**:
165+
166+
- `<iAppAddress>` – Address of the deployed iApp to run
159167

160-
#### `iapp debug <taskId>`
168+
**Options**:
169+
170+
- `--args <string>` – Arguments accessible inside the iApp (use quotes to group)
171+
- `--protectedData <string>` – Specify the protected data mock name (default or
172+
custom via `iapp mock`)
173+
- `--inputFile <string>` – One or multiple input files (public URLs) available
174+
inside the iApp at `$IEXEC_INPUT_FILE_NAME_*`
175+
- `--requesterSecret <array>` – Key-value requester secrets (`index=value`)
176+
available inside the iApp at `$IEXEC_REQUESTER_SECRET_*`
177+
- `--chain <string>` – Specify the blockchain network to run the iApp on (e.g.,
178+
`goerli`, `mainnet`)
179+
180+
### `iapp debug <taskId>`
161181

162182
**Purpose**: Retrieve detailed execution logs from worker nodes
163-
**Usage**: `iapp debug <taskId>`
164-
**Options**: None
165-
**What it does**: Provides detailed logs for debugging failed or slow executions
183+
**Usage**: `iapp debug <taskId> [options]`
184+
**Positional arguments**:
185+
186+
- `<taskId>` – The ID of the task to debug
166187

167-
#### `iapp mock <inputType>`
188+
**Options**:
189+
190+
- `--chain <string>` – Specify the blockchain network of the task (e.g.,
191+
`goerli`, `mainnet`)
192+
193+
### `iapp mock <inputType>`
168194

169195
**Purpose**: Create mocked input for testing purposes
170-
**Usage**: `iapp mock <inputType>`
171-
**Options**: None
172-
**What it does**: Generates sample input data to test your iApp locally
196+
**Usage**: `iapp mock <inputType> [options]`
197+
**Positional arguments**:
198+
199+
- `<inputType>` – Type of input to mock (e.g., `default`, `custom`)
200+
201+
**Options**:
202+
203+
- `--args <string>` – Arguments to use in the mock data
204+
- `--protectedData <string>` – Protected data mock name to use
205+
- `--inputFile <string>` – Input files to mock
206+
- `--requesterSecret <array>` – Requester secrets to mock
207+
208+
### `iapp wallet <action>`
209+
210+
**Purpose**: Manage wallet-related operations
211+
**Usage**: `iapp wallet <action> [options]`
212+
**Positional arguments**:
173213

174-
#### `iapp --help`
214+
- `<action>` – Wallet action to perform (e.g., `balance`, `address`, `sign`)
175215

176-
**Purpose**: Display all available commands and options
177-
**Usage**: `iapp --help`
178-
**Options**: None
179-
**What it does**: Shows comprehensive help information for all CLI commands
216+
**Options**:
180217

181-
### Advanced Options
218+
- `--chain <string>` – Specify the blockchain network (e.g., `goerli`,
219+
`mainnet`)
220+
- `--data <string>` – Data to sign (for `sign` action)
182221

183-
#### Environment Variables
222+
## Advanced Options <ChainNotSupportedBadge />
184223

185-
##### `EXPERIMENTAL_TDX_APP=true`
224+
### `EXPERIMENTAL_TDX_APP=true`
186225

187226
**Purpose**: Enable experimental Intel TDX support
188227
**Usage**: Set as environment variable before running commands
189-
**Example**: `EXPERIMENTAL_TDX_APP=true iapp test`
190-
**What it does**: Enables TDX mode for testing, deployment, and execution
228+
**Example**: `EXPERIMENTAL_TDX_APP=true iapp test`
191229

192230
**Available with**:
193231

0 commit comments

Comments
 (0)