@@ -231,20 +231,55 @@ See [website/docs/specifications/mlir.md](website/docs/specifications/mlir.md) f
231231## CLI Usage
232232
233233``` bash
234- # Lex (tokenize) a file
235- ./zig-out/bin/ora lex contract.ora
234+ # Compile to EVM bytecode (default)
235+ ./zig-out/bin/ora contract.ora
236236
237- # Parse and show AST
238- ./zig-out/bin/ora parse contract.ora
237+ # Compilation stages
238+ ./zig-out/bin/ora --emit-tokens contract.ora # Stop after lexing
239+ ./zig-out/bin/ora --emit-ast contract.ora # Stop after parsing
240+ ./zig-out/bin/ora --emit-mlir contract.ora # Stop after MLIR generation
241+ ./zig-out/bin/ora --emit-yul contract.ora # Stop after Yul lowering
239242
240- # Generate AST JSON
241- ./zig-out/bin/ora -o build ast contract.ora
243+ # Optimization levels
244+ ./zig-out/bin/ora -O0 contract.ora # No optimization
245+ ./zig-out/bin/ora -O1 contract.ora # Basic optimizations
246+ ./zig-out/bin/ora -O2 contract.ora # Aggressive optimizations
242247
243- # Compile (when Yul backend is complete)
244- ./zig-out/bin/ora compile contract.ora
248+ # Code analysis
249+ ./zig-out/bin/ora --analyze-complexity contract.ora # Analyze function complexity
250+
251+ # Output control
252+ ./zig-out/bin/ora -o build/ contract.ora # Output to directory
253+ ./zig-out/bin/ora --save-all contract.ora # Save all intermediate stages
254+
255+ # Examples
256+ ./zig-out/bin/ora ora-example/smoke.ora # Compile example
257+ ./zig-out/bin/ora --analyze-complexity ora-example/complexity_example.ora # Analyze complexity
258+
259+ # Showcase: Analyze a realistic DeFi contract (400+ lines)
260+ ./zig-out/bin/ora --analyze-complexity ora-example/defi_lending_pool.ora
261+ ```
262+
263+ Run ` ./zig-out/bin/ora --help ` for complete options.
264+
265+ ### 🎯 Complexity Analysis Showcase
266+
267+ Want to see the power of Ora's analysis tools? Try analyzing our realistic DeFi lending pool contract:
268+
269+ ``` bash
270+ ./zig-out/bin/ora --analyze-complexity ora-example/defi_lending_pool.ora
245271```
246272
247- See [ website/docs/specifications/api.md] ( website/docs/specifications/api.md ) for complete CLI reference.
273+ This 400+ line contract demonstrates:
274+ - ** 15 functions** with varying complexity levels
275+ - ** 73% simple functions** - optimal for performance
276+ - ** 26% moderate functions** - well-structured business logic
277+ - Real-world DeFi patterns: lending, borrowing, liquidations, interest calculations
278+
279+ The analysis helps you:
280+ - ✓ Identify functions suitable for ` inline ` optimization
281+ - ○ Ensure moderate complexity stays maintainable
282+ - ✗ Catch overly complex functions before they become technical debt
248283
249284## Roadmap to ASUKA Release
250285
0 commit comments