@@ -62,14 +62,16 @@ bun add -g @iexec/iapp
6262## Quick Start
6363
6464Once installed, you can create and deploy your first iApp. The CLI will guide
65- you through an interactive setup process:
65+ you through an interactive setup process to configure your project name,
66+ programming language, and template:
6667
6768<CLIDemo
6869 initialCommand="iapp init"
6970 asciiText="iApp"
7071 : steps ="[
7172 {
7273 showAt: 2,
74+ completeAt: 4,
7375 question: 'What is your project name? (A folder with this name will be created)',
7476 answer: 'hello-world',
7577 showTyping: true,
@@ -115,79 +117,164 @@ After the interactive setup, continue with development and deployment:
115117
116118## Development and Testing
117119
118- Navigate to your project and run tests locally to simulate the TEE environment:
120+ Navigate to your project and run tests locally to simulate the TEE environment.
121+ The CLI will build a Docker image, run your app, and show you the results:
119122
120123<CLIDemo
121- : initialCommand ="' iapp test' "
124+ initialCommand="iapp test"
122125 : steps ="[
123126 {
124127 showAt: 2,
125- question: 'Running tests in simulated TEE environment...',
126- answer: '✅ All tests passed',
127- showTyping: true,
128- isComplete: false
128+ question: 'No app secret is configured (from iapp.config.json)',
129+ answer: '',
130+ showTyping: false,
131+ isComplete: true
132+ },
133+ {
134+ showAt: 3,
135+ question: 'App docker image built (sha256:9cc0de820aaaf8f86700a3ec4082fe69b9e9a48a117ebb0ade0d82d0879cbe41)',
136+ answer: '',
137+ showTyping: false,
138+ isComplete: true
129139 },
130140 {
131141 showAt: 4,
132- question: 'Building package...',
133- answer: '📦 Package built successfully',
134- showTyping: true,
142+ question: 'App docker image ran and exited successfully.',
143+ answer: '',
144+ showTyping: false,
145+ isComplete: true
146+ },
147+ {
148+ showAt: 5,
149+ completeAt: 6,
150+ question: 'Would you like to see the app logs? (12 lines)',
151+ answer: 'no',
152+ options: [
153+ { label: 'yes', selected: false },
154+ { label: 'no', selected: true }
155+ ] ,
156+ highlighted: false,
157+ showTyping: false,
158+ isComplete: false
159+ },
160+ {
161+ showAt: 7,
162+ question: 'Checked app output',
163+ answer: '',
164+ showTyping: false,
165+ isComplete: true
166+ },
167+ {
168+ showAt: 8,
169+ completeAt: 10,
170+ question: 'Would you like to see the result? (View ./output/)',
171+ answer: 'yes',
172+ options: [
173+ { label: 'yes', selected: true },
174+ { label: 'no', selected: false }
175+ ] ,
176+ highlighted: false,
177+ showTyping: false,
135178 isComplete: false
136179 }
137180 ] "
138- : completionStep ="6 "
139- : completionMessage ="'Running tests and building package... '"
181+ : completionStep ="11 "
182+ : completionMessage ="'📁 output directory content: '"
140183 : completionItems ="[
141- '🧪 Running unit tests...',
142- '✅ All tests passed',
143- '📦 Building package...',
144- '🔍 Code analysis complete',
145- '🚀 Ready for deployment'
184+ '└ computed.json',
185+ '└ result.txt'
146186 ] "
147- : successMessage ="'Build successful! Ready for deployment. '"
148- : autoRestart ="false "
187+ : successMessage ="'hello world '"
188+ : autoRestart ="true "
149189/>
150190
151191## Deployment
152192
153- Once your tests pass and the package is built, deploy your iApp to the iExec
154- network:
193+ After your tests pass and the package is built, you can deploy your iApp to a
194+ supported network. During deployment, you'll enter your DockerHub credentials,
195+ specify your app version, and push both standard and TEE-compatible images:
155196
156197<CLIDemo
157198 initialCommand="iapp deploy"
199+ asciiText="Deploy"
158200 : steps ="[
159201 {
160202 showAt: 2,
161- question: 'Connecting to iExec network...',
162- answer: '🌐 Connected to Arbitrum',
203+ question: 'Using chain bellecour',
204+ answer: '',
205+ showTyping: false,
206+ isComplete: true
207+ },
208+ {
209+ showAt: 3,
210+ question: 'Using saved walletPrivateKey (from iapp.config.json)',
211+ answer: '',
212+ showTyping: false,
213+ isComplete: true
214+ },
215+ {
216+ showAt: 4,
217+ completeAt: 6,
218+ question: 'What is your username on DockerHub? (It will be used to properly tag the Docker image)',
219+ answer: 'bob',
163220 showTyping: true,
164221 isComplete: false
165222 },
166223 {
167- showAt: 4,
168- question: 'Uploading package...',
169- answer: '📤 Package uploaded',
224+ showAt: 6,
225+ completeAt: 8,
226+ question: 'What is your DockerHub access token?',
227+ answer: '********************** ',
228+ showTyping: true,
229+ isComplete: false
230+ },
231+ {
232+ showAt: 8,
233+ completeAt: 10,
234+ question: 'What is the version of your iApp?',
235+ answer: '0.0.1',
170236 showTyping: true,
171237 isComplete: false
238+ },
239+ {
240+ showAt: 10,
241+ question: 'Docker image built (sha256: a53fc4c480f482c384a13266ea2cb6cc5572733c866c44a5f604f4bfab3a744a ) and tagged bob/hello-world:0.0.1',
242+ answer: '',
243+ showTyping: false,
244+ isComplete: true
245+ },
246+ {
247+ showAt: 11,
248+ question: 'Pushed image bob/hello-world:0.0.1 on dockerhub',
249+ answer: '',
250+ showTyping: false,
251+ isComplete: true
252+ },
253+ {
254+ showAt: 12,
255+ question: 'Pushed TEE image bob/hello-world:0.0.1-tee-scone-5.9.1-v16-debug-ce3a01d9c5d7 on dockerhub',
256+ answer: '',
257+ showTyping: false,
258+ isComplete: true
259+ },
260+ {
261+ showAt: 13,
262+ question: 'TEE app deployed',
263+ answer: '',
264+ showTyping: false,
265+ isComplete: true
172266 }
173267 ] "
174- : completionStep ="5 "
175- : completionMessage ="'Deploying to iExec network... '"
268+ : completionStep ="14 "
269+ : completionMessage ="'Deployment of your iApp completed successfully: '"
176270 : completionItems ="[
177- '🌐 Connecting to network...',
178- '🔐 Authenticating...',
179- '📤 Uploading package...',
180- '🔍 Verifying deployment...',
181- '📋 Contract deployed'
271+ '└ Docker image: bob/hello-world:0.0.1-tee-scone-5.9.1-v16-debug-ce3a01d9c5d7',
272+ '└ iApp address: 0x1f80DCebc2EAAff0Db7156413C43B7e88D189923'
182273 ] "
183- : successMessage ="'Successfully deployed to iExec network! '"
184- : autoRestart ="false "
274+ : successMessage ="'Run iapp run 0x1f80DCebc2EAAff0Db7156413C43B7e88D189923 to execute your iApp on an iExec TEE worker '"
275+ : autoRestart ="true "
185276/>
186277
187- <div class =" bg-gradient-to-r from-blue-400/10 to-blue-400/5 rounded-[6px] p-4 border-l-4 border-blue-600 mb-6 " >
188- <p class =" m-0! text-sm " ><strong >Note:</strong > iApp Generator currently supports Python and Node.js, but iApps can be built in any language that runs in Docker.</p >
189- </div >
190-
191278## Real Examples
192279
193280Here are some real-world examples of iApps to help you understand how they work
0 commit comments