hlx 1.2.2

Configuration language designed specifically for ml/ai/data systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# HLX - The Beautiful Configuration & Data Processing System

[![Version](https://img.shields.io/badge/version-1.1.9-blue.svg)](https://github.com/helix/hlx)
[![Rust](https://img.shields.io/badge/rust-1.70+-orange.svg)](https://www.rust-lang.org/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

**HLX** is a powerful, elegant configuration and data processing system built in Rust. It combines the simplicity of configuration files with the power of a full programming language, featuring 38+ built-in operators for data manipulation, encoding, hashing, mathematical operations, and more.

## ✨ What Makes HLX Beautiful?

### šŸŽÆ **Elegant Syntax**
```hlx
project "MyAwesomeApp" {
    version = "1.1.9"
    environment = @env var=ENV default=development
    api_key = @base64 input=my-secret-key operation=encode
    timestamp = @timestamp
    uuid = @uuid
}

agent "DataProcessor" {
    name = "HLX Data Engine"
    capabilities = ["processing", "encoding", "hashing"]
    max_connections = @math operation=mul a=100 b=10
    hash_algorithm = "sha256"
}
```

### šŸš€ **39+ Powerful Operators**

#### **Basic Operations**
- `@uuid` - Generate unique identifiers
- `@timestamp` - Current Unix timestamps  
- `@now` - ISO datetime strings
- `@exec` - Execute shell commands and external programs

#### **Data Processing**
- `@base64` - Encode/decode Base64 data
- `@json` - Parse/stringify JSON
- `@url` - URL encoding/decoding
- `@hash` - SHA256/MD5 hashing

#### **String Manipulation**
- `@string` - Transform, analyze, extract text
- `@env` - Environment variable access
- `@var` - Global variable management

#### **Mathematical Operations**
- `@math` - Arithmetic operations (add, sub, mul, div, pow)
- `@calc` - Expression evaluation
- `@min`, `@max`, `@avg`, `@sum` - Statistical functions

#### **Control Flow**
- `@if`, `@switch` - Conditional logic
- `@and`, `@or`, `@not` - Logical operations

#### **Web Integration**
- `@session`, `@cookie` - Session management
- `@param`, `@header` - HTTP context access

### šŸ”§ **Easy Integration**

# Set All Operators Example

```rust
//! HLX Set All Operators Example

use helix::{Hlx, xlh, DnaValue as Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("=== HLX Set All Operators Example ===");
    
    let mut hlx = Hlx::new().await?;
    
    // Basic Operators (No Parameters)
    println!("\n--- Setting Basic Operators ---");
    
    // @uuid - Generate random UUIDs (v4)
    let uuid_result = xlh(&hlx, "@uuid", "").await;
    if let Ok(Value::String(uuid)) = uuid_result {
        hlx.set("basic", "uuid", Value::String(uuid.clone()));
        println!("āœ… UUID: {}", uuid);
    }
    
    // @timestamp - Generate current Unix timestamps  
    let timestamp_result = xlh(&hlx,"@timestamp", "").await;
    if let Ok(Value::Number(timestamp)) = timestamp_result {
        hlx.set("basic", "timestamp", Value::Number(timestamp));
        println!("āœ… Timestamp: {}", timestamp);
    }
    
    // @now - Generate current date/time in ISO format
    let now_result = xlh(&hlx,"@now", "").await;
    if let Ok(Value::String(now)) = now_result {
        hlx.set("basic", "now", Value::String(now.clone()));
        println!("āœ… Now: {}", now);
    }
    
    // Variable and Environment Access
    println!("\n--- Setting Variable & Environment Operators ---");
    
    // @var - Get/set global variables
    let var_result = xlh(&hlx,"@var", "name=project_name, value=MyAwesomeProject").await;
    if let Ok(Value::String(var)) = var_result {
        hlx.set("variables", "project_name", Value::String(var.clone()));
        println!("āœ… Variable: {}", var);
    }
    
    // @env - Read environment variables
    let env_result = xlh(&hlx,"@env", "var=HOME").await;
    if let Ok(Value::String(home)) = env_result {
        hlx.set("environment", "home", Value::String(home.clone()));
        println!("āœ… Home directory: {}", home);
    }
    
    // @exec - Execute shell commands
    let exec_result = xlh(&hlx,"@exec", "command=git rev-parse HEAD 2>/dev/null || echo 'no-commit'").await;
    if let Ok(Value::Object(obj)) = exec_result {
        if let Some(Value::String(stdout)) = obj.get("stdout") {
            if stdout != "no-commit" {
                hlx.set("git", "commit", Value::String(stdout.clone()));
                println!("āœ… Git commit: {}", stdout);
            }
        }
    }
    
    // Math and Calculations
    println!("\n--- Setting Math Operators ---");
    
    // @math - Mathematical operations
    let math_result = xlh(&hlx,"@math", "operation=add, a=5, b=3").await;
    if let Ok(Value::Number(result)) = math_result {
        hlx.set("math", "add_5_3", Value::Number(result));
        println!("āœ… Math (5+3): {}", result);
    }
    
    // @calc - Expression evaluation
    let calc_result = xlh(&hlx,"@calc", "expression=5+3").await;
    if let Ok(Value::Number(result)) = calc_result {
        hlx.set("math", "calc_5_3", Value::Number(result));
        println!("āœ… Calc (5+3): {}", result);
    }
    
    // @min - Find minimum value
    let min_result = xlh(&hlx,"@min", "{\"values\":[1,2,3,4,5]}").await;
    if let Ok(Value::Object(obj)) = min_result {
        if let Some(Value::Number(result)) = obj.get("min") {
            hlx.set("math", "min_1_to_5", Value::Number(*result));
            println!("āœ… Min (1,2,3,4,5): {}", result);
        }
    }
    
    // @max - Find maximum value
    let max_result = xlh(&hlx,"@max", "{\"values\":[1,2,3,4,5]}").await;
    match max_result {
        Ok(Value::Object(obj)) => {
            if let Some(Value::Number(result)) = obj.get("max") {
                hlx.set("math", "max_1_to_5", Value::Number(*result));
                println!("āœ… Max (1,2,3,4,5): {}", result);
            }
        }
        Ok(value) => println!("āŒ Max: Unexpected type: {:?}", value),
        Err(e) => println!("āŒ Max failed: {}", e),
    }
    
    // @avg - Calculate average
    let avg_result = xlh(&hlx,"@avg", "{\"values\":[1,2,3,4,5]}").await;
    if let Ok(Value::Number(result)) = avg_result {
        hlx.set("math", "avg_1_to_5", Value::Number(result));
        println!("āœ… Avg (1,2,3,4,5): {}", result);
    }
    
    // @sum - Calculate sum
    let sum_result = xlh(&hlx,"@sum", "{\"values\":[1,2,3,4,5]}").await;
    if let Ok(Value::Number(result)) = sum_result {
        hlx.set("math", "sum_1_to_5", Value::Number(result));
        println!("āœ… Sum (1,2,3,4,5): {}", result);
    }
    
    // @round - Round numbers
    let round_result = xlh(&hlx,"@round", "value=3.14159").await;
    if let Ok(Value::Number(result)) = round_result {
        hlx.set("math", "round_pi", Value::Number(result));
        println!("āœ… Round (3.14159): {}", result);
    }
    
    // Date and Time
    println!("\n--- Setting Date & Time Operators ---");
    
    // @date - Format dates
    let date_result = xlh(&hlx,"@date", "format=%Y-%m-%d").await;
    if let Ok(Value::String(result)) = date_result {
        hlx.set("datetime", "date", Value::String(result.clone()));
        println!("āœ… Date: {}", result);
    }
    
    // @time - Format times
    let time_result = xlh(&hlx,"@time", "format=%H:%M:%S").await;
    if let Ok(Value::String(result)) = time_result {
        hlx.set("datetime", "time", Value::String(result.clone()));
        println!("āœ… Time: {}", result);
    }
    
    // @format - Format values
    let format_result = xlh(&hlx,"@format", "value=2024-01-01, format=%Y-%m-%d").await;
    if let Ok(Value::String(result)) = format_result {
        hlx.set("datetime", "formatted_date", Value::String(result.clone()));
        println!("āœ… Formatted Date: {}", result);
    }
    
    // @timezone - Timezone operations
    let timezone_result = xlh(&hlx,"@timezone", "zone=UTC").await;
    if let Ok(Value::String(result)) = timezone_result {
        hlx.set("datetime", "timezone", Value::String(result.clone()));
        println!("āœ… Timezone: {}", result);
    }
    
    // Array and Collections
    println!("\n--- Setting Array & Collection Operators ---");
    
    // @array - Array operations
    let array_result = xlh(&hlx,"@array", "{\"operation\":\"create\",\"items\":[1,2,3]}").await;
    match array_result {
        Ok(Value::Array(result)) => {
            hlx.set("collections", "array_1_2_3", Value::Array(result));
            println!("āœ… Array [1,2,3]: Created");
        }
        Ok(value) => println!("āŒ Array: Unexpected type: {:?}", value),
        Err(e) => println!("āŒ Array failed: {}", e),
    }
    
    // @map - Transform arrays
    let map_result = xlh(&hlx,"@map", "{\"action\":\"transform\",\"array\":[1,2,3],\"function\":\"x*2\"}").await;
    if let Ok(Value::Array(result)) = map_result {
        hlx.set("collections", "mapped_array", Value::Array(result));
        println!("āœ… Map (x*2): Transformed");
    }
    
    // @filter - Filter arrays
    let filter_result = xlh(&hlx,"@filter", "{\"action\":\"filter\",\"array\":[1,2,3,4,5],\"condition\":\"x>2\"}").await;
    if let Ok(Value::Array(result)) = filter_result {
        hlx.set("collections", "filtered_array", Value::Array(result));
        println!("āœ… Filter (x>2): Filtered");
    }
    
    // @sort - Sort arrays
    let sort_result = xlh(&hlx,"@sort", "{\"action\":\"sort\",\"array\":[3,1,4,2]}").await;
    if let Ok(Value::Array(result)) = sort_result {
        hlx.set("collections", "sorted_array", Value::Array(result));
        println!("āœ… Sort: Sorted");
    }
    
    // @join - Join arrays
    let join_result = xlh(&hlx,"@join", "{\"action\":\"join\",\"array\":[\"a\",\"b\",\"c\"],\"separator\":\",\"}").await;
    if let Ok(Value::String(result)) = join_result {
        hlx.set("collections", "joined_array", Value::String(result.clone()));
        println!("āœ… Join: {}", result);
    }
    
    // @split - Split strings
    let split_result = xlh(&hlx,"@split", "{\"action\":\"split\",\"text\":\"a,b,c\",\"separator\":\",\"}").await;
    if let Ok(Value::Array(result)) = split_result {
        hlx.set("collections", "split_string", Value::Array(result));
        println!("āœ… Split: Split");
    }
    
    // @length - Get length
    let length_result = xlh(&hlx,"@length", "{\"value\":[1,2,3,4,5]}").await;
    if let Ok(Value::Number(result)) = length_result {
        hlx.set("collections", "array_length", Value::Number(result));
        println!("āœ… Length: {}", result);
    }
    
    // Conditional and Logic
    println!("\n--- Setting Conditional & Logic Operators ---");
    
    // @if - Conditional logic
    let if_result = xlh(&hlx,"@if", "condition=true, then=yes, else=no").await;
    if let Ok(Value::String(result)) = if_result {
        hlx.set("logic", "if_true", Value::String(result.clone()));
        println!("āœ… If (true): {}", result);
    }
    
    // @case - Pattern matching
    let case_result = xlh(&hlx,"@case", "{\"value\":2,\"pattern\":[1,2,3]}").await;
    if let Ok(Value::String(result)) = case_result {
        hlx.set("logic", "case_2", Value::String(result.clone()));
        println!("āœ… Case (2): {}", result);
    }
    
    // @default - Default values
    let default_result = xlh(&hlx,"@default", "{\"value\":\"fallback\"}").await;
    if let Ok(Value::String(result)) = default_result {
        hlx.set("logic", "default_value", Value::String(result.clone()));
        println!("āœ… Default: {}", result);
    }
    
    // @and - Logical AND
    let and_result = xlh(&hlx,"@and", "{\"values\":[true,true,false]}").await;
    if let Ok(Value::Bool(result)) = and_result {
        hlx.set("logic", "and_true_true_false", Value::Bool(result));
        println!("āœ… And (true,true,false): {}", result);
    }
    
    // @or - Logical OR
    let or_result = xlh(&hlx,"@or", "{\"values\":[false,false,true]}").await;
    if let Ok(Value::Bool(result)) = or_result {
        hlx.set("logic", "or_false_false_true", Value::Bool(result));
        println!("āœ… Or (false,false,true): {}", result);
    }
    
    // @not - Logical NOT
    let not_result = xlh(&hlx,"@not", "{\"value\":true}").await;
    if let Ok(Value::Bool(result)) = not_result {
        hlx.set("logic", "not_true", Value::Bool(result));
        println!("āœ… Not (true): {}", result);
    }
    
    // HTTP and Request Data
    println!("\n--- Setting HTTP & Request Operators ---");
    
    // @session - Session data
    let session_result = xlh(&hlx,"@session", "{\"action\":\"get\",\"key\":\"user_id\"}").await;
    if let Ok(Value::String(result)) = session_result {
        hlx.set("http", "session_user_id", Value::String(result.clone()));
        println!("āœ… Session: {}", result);
    }
    
    // @cookie - Cookie data
    let cookie_result = xlh(&hlx,"@cookie", "{\"action\":\"get\",\"name\":\"session\"}").await;
    if let Ok(Value::String(result)) = cookie_result {
        hlx.set("http", "cookie_session", Value::String(result.clone()));
        println!("āœ… Cookie: {}", result);
    }
    
    // @param - URL parameters
    let param_result = xlh(&hlx,"@param", "{\"action\":\"get\",\"name\":\"id\"}").await;
    if let Ok(Value::String(result)) = param_result {
        hlx.set("http", "param_id", Value::String(result.clone()));
        println!("āœ… Param: {}", result);
    }
    
    // @query - Query parameters
    let query_result = xlh(&hlx,"@query", "{\"action\":\"get\",\"name\":\"search\"}").await;
    if let Ok(Value::String(result)) = query_result {
        hlx.set("http", "query_search", Value::String(result.clone()));
        println!("āœ… Query: {}", result);
    }
    
    // String Processing
    println!("\n--- Setting String Processing Operators ---");
    
    // @string - String transformations
    let string_result = xlh(&hlx,"@string", "{\"input\":\"hello\",\"operation\":\"upper\"}").await;
    if let Ok(Value::String(result)) = string_result {
        hlx.set("strings", "hello_upper", Value::String(result.clone()));
        println!("āœ… String (hello->upper): {}", result);
    }
    
    // Data Encoding/Decoding
    println!("\n--- Setting Data Encoding/Decoding Operators ---");
    
    // @base64 - Base64 encoding/decoding
    let base64_result = xlh(&hlx,"@base64", "{\"input\":\"hello\",\"operation\":\"encode\"}").await;
    if let Ok(Value::String(result)) = base64_result {
        hlx.set("encoding", "base64_hello", Value::String(result.clone()));
        println!("āœ… Base64 (hello->encode): {}", result);
    }
    
    // @hash - Hashing operations
    let hash_result = xlh(&hlx,"@hash", "{\"input\":\"hello\",\"algorithm\":\"sha256\"}").await;
    if let Ok(Value::String(result)) = hash_result {
        hlx.set("encoding", "hash_hello_sha256", Value::String(result.clone()));
        println!("āœ… Hash (hello->sha256): {}", result);
    }
    
    // @json - JSON operations
    let json_result = xlh(&hlx,"@json", "{\"input\":\"{\\\"key\\\":\\\"value\\\"}\",\"operation\":\"parse\"}").await;
    if let Ok(Value::Object(result)) = json_result {
        hlx.set("encoding", "json_parsed", Value::Object(result));
        println!("āœ… JSON: Parsed");
    }
    
    // @url - URL encoding/decoding
    let url_result = xlh(&hlx,"@url", "{\"input\":\"https://example.com\",\"operation\":\"encode\"}").await;
    if let Ok(Value::String(result)) = url_result {
        hlx.set("encoding", "url_encoded", Value::String(result.clone()));
        println!("āœ… URL (encode): {}", result);
    }
    
    // Switch operations
    println!("\n--- Setting Switch Operations ---");
    
    // @switch - Switch/case operations
    let switch_result = xlh(&hlx,"@switch", "{\"value\":2,\"cases\":[{\"match\":1,\"result\":\"one\"},{\"match\":2,\"result\":\"two\"}]}").await;
    if let Ok(Value::String(result)) = switch_result {
        hlx.set("control", "switch_2", Value::String(result.clone()));
        println!("āœ… Switch (2): {}", result);
    }
    hlx.file_path = Some(std::path::PathBuf::from("all-ops.hlx"));

    hlx.save()?;
    println!("āœ… Saved to all-ops.hlx");
    println!("\n=== HLX Set All Operators Example Complete ===");
    Ok(())
}

```
# Get All Values Example
```rust
//! HLX Get All Values Example

use helix::{Hlx, DnaValue as Value};



#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("=== HLX Get All Values Example ===");
    
    let mut hlx = Hlx::load("all-ops.hlx").await?;
    
    if let Some(Value::String(now)) = hlx.get("basic", "now") {
        println!("āœ… Now: {}", now);
    } else {
        println!("āŒ Now: Not found");
    }
    
    // Variable and Environment Access
    println!("\n--- Getting Variable & Environment Operators ---");
    
    if let Some(Value::String(var)) = hlx.get("variables", "project_name") {
        println!("āœ… Variable: {}", var);
    } else {
        println!("āŒ Variable: Not found");
    }
    
    if let Some(Value::String(home)) = hlx.get("environment", "home") {
        println!("āœ… Home directory: {}", home);
    } else {
        println!("āŒ Home directory: Not found");
    }
    
    // Math and Calculations
    println!("\n--- Getting Math Operators ---");
    
    if let Some(Value::Number(result)) = hlx.get("math", "add_5_3") {
        println!("āœ… Math (5+3): {}", result);
    } else {
        println!("āŒ Math (5+3): Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("math", "calc_5_3") {
        println!("āœ… Calc (5+3): {}", result);
    } else {
        println!("āŒ Calc (5+3): Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("math", "min_1_to_5") {
        println!("āœ… Min (1,2,3,4,5): {}", result);
    } else {
        println!("āŒ Min (1,2,3,4,5): Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("math", "max_1_to_5") {
        println!("āœ… Max (1,2,3,4,5): {}", result);
    } else {
        println!("āŒ Max (1,2,3,4,5): Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("math", "avg_1_to_5") {
        println!("āœ… Avg (1,2,3,4,5): {}", result);
    } else {
        println!("āŒ Avg (1,2,3,4,5): Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("math", "sum_1_to_5") {
        println!("āœ… Sum (1,2,3,4,5): {}", result);
    } else {
        println!("āŒ Sum (1,2,3,4,5): Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("math", "round_pi") {
        println!("āœ… Round (3.14159): {}", result);
    } else {
        println!("āŒ Round (3.14159): Not found");
    }
    
    // Date and Time
    println!("\n--- Getting Date & Time Operators ---");
    
    if let Some(Value::String(result)) = hlx.get("datetime", "date") {
        println!("āœ… Date: {}", result);
    } else {
        println!("āŒ Date: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("datetime", "time") {
        println!("āœ… Time: {}", result);
    } else {
        println!("āŒ Time: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("datetime", "formatted_date") {
        println!("āœ… Formatted Date: {}", result);
    } else {
        println!("āŒ Formatted Date: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("datetime", "timezone") {
        println!("āœ… Timezone: {}", result);
    } else {
        println!("āŒ Timezone: Not found");
    }
    
    // Array and Collections
    println!("\n--- Getting Array & Collection Operators ---");
    
    if let Some(Value::Array(result)) = hlx.get("collections", "array_1_2_3") {
        println!("āœ… Array [1,2,3]: {:?}", result);
    } else {
        println!("āŒ Array [1,2,3]: Not found");
    }
    
    if let Some(Value::Array(result)) = hlx.get("collections", "mapped_array") {
        println!("āœ… Mapped Array: {:?}", result);
    } else {
        println!("āŒ Mapped Array: Not found");
    }
    
    if let Some(Value::Array(result)) = hlx.get("collections", "filtered_array") {
        println!("āœ… Filtered Array: {:?}", result);
    } else {
        println!("āŒ Filtered Array: Not found");
    }
    
    if let Some(Value::Array(result)) = hlx.get("collections", "sorted_array") {
        println!("āœ… Sorted Array: {:?}", result);
    } else {
        println!("āŒ Sorted Array: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("collections", "joined_array") {
        println!("āœ… Joined Array: {}", result);
    } else {
        println!("āŒ Joined Array: Not found");
    }
    
    if let Some(Value::Array(result)) = hlx.get("collections", "split_string") {
        println!("āœ… Split String: {:?}", result);
    } else {
        println!("āŒ Split String: Not found");
    }
    
    if let Some(Value::Number(result)) = hlx.get("collections", "array_length") {
        println!("āœ… Array Length: {}", result);
    } else {
        println!("āŒ Array Length: Not found");
    }
    
    // Conditional and Logic
    println!("\n--- Getting Conditional & Logic Operators ---");
    
    if let Some(Value::String(result)) = hlx.get("logic", "if_true") {
        println!("āœ… If (true): {}", result);
    } else {
        println!("āŒ If (true): Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("logic", "case_2") {
        println!("āœ… Case (2): {}", result);
    } else {
        println!("āŒ Case (2): Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("logic", "default_value") {
        println!("āœ… Default: {}", result);
    } else {
        println!("āŒ Default: Not found");
    }
    
    if let Some(Value::Bool(result)) = hlx.get("logic", "and_true_true_false") {
        println!("āœ… And (true,true,false): {}", result);
    } else {
        println!("āŒ And (true,true,false): Not found");
    }
    
    if let Some(Value::Bool(result)) = hlx.get("logic", "or_false_false_true") {
        println!("āœ… Or (false,false,true): {}", result);
    } else {
        println!("āŒ Or (false,false,true): Not found");
    }
    
    if let Some(Value::Bool(result)) = hlx.get("logic", "not_true") {
        println!("āœ… Not (true): {}", result);
    } else {
        println!("āŒ Not (true): Not found");
    }
    
    // HTTP and Request Data
    println!("\n--- Getting HTTP & Request Operators ---");
    
    if let Some(Value::String(result)) = hlx.get("http", "session_user_id") {
        println!("āœ… Session: {}", result);
    } else {
        println!("āŒ Session: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("http", "cookie_session") {
        println!("āœ… Cookie: {}", result);
    } else {
        println!("āŒ Cookie: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("http", "param_id") {
        println!("āœ… Param: {}", result);
    } else {
        println!("āŒ Param: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("http", "query_search") {
        println!("āœ… Query: {}", result);
    } else {
        println!("āŒ Query: Not found");
    }
    
    // String Processing
    println!("\n--- Getting String Processing Operators ---");
    
    if let Some(Value::String(result)) = hlx.get("strings", "hello_upper") {
        println!("āœ… String (hello->upper): {}", result);
    } else {
        println!("āŒ String (hello->upper): Not found");
    }
    
    // Data Encoding/Decoding
    println!("\n--- Getting Data Encoding/Decoding Operators ---");
    
    if let Some(Value::String(result)) = hlx.get("encoding", "base64_hello") {
        println!("āœ… Base64 (hello->encode): {}", result);
    } else {
        println!("āŒ Base64 (hello->encode): Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("encoding", "hash_hello_sha256") {
        println!("āœ… Hash (hello->sha256): {}", result);
    } else {
        println!("āŒ Hash (hello->sha256): Not found");
    }
    
    if let Some(Value::Object(result)) = hlx.get("encoding", "json_parsed") {
        println!("āœ… JSON Parsed: {:?}", result);
    } else {
        println!("āŒ JSON Parsed: Not found");
    }
    
    if let Some(Value::String(result)) = hlx.get("encoding", "url_encoded") {
        println!("āœ… URL (encode): {}", result);
    } else {
        println!("āŒ URL (encode): Not found");
    }
    
    // Switch operations
    println!("\n--- Getting Switch Operations ---");
    
    if let Some(Value::String(result)) = hlx.get("control", "switch_2") {
        println!("āœ… Switch (2): {}", result);
    } else {
        println!("āŒ Switch (2): Not found");
    }
    
    // Display all sections and keys
    println!("\n--- All Available Sections and Keys ---");
    
    for (section_name, section_data) in &hlx.data {
        println!("\nšŸ“ Section: {}", section_name);
        for (key_name, value) in section_data {
            match value {
                Value::String(s) => println!("  šŸ”¤ {} = \"{}\"", key_name, s),
                Value::Number(n) => println!("  šŸ”¢ {} = {}", key_name, n),
                Value::Bool(b) => println!("  āœ… {} = {}", key_name, b),
                Value::Array(arr) => println!("  šŸ“‹ {} = {:?}", key_name, arr),
                Value::Object(obj) => println!("  šŸ“¦ {} = {:?}", key_name, obj),
                Value::Null => println!("  āŒ {} = null", key_name),
                Value::Duration(d) => println!("  ā±ļø {} = {:?}", key_name, d),
                Value::Reference(r) => println!("  šŸ”— {} = @{}", key_name, r),
                Value::Identifier(i) => println!("  šŸ·ļø {} = {}", key_name, i),
            }
        }
    }
    
    // Generate updated HLX content
    println!("\n--- Generating Updated HLX Content ---");
    let content = hlx.make()?;
    
    // Save to get-all-results.hlx
    std::fs::write("get-all-results.hlx", &content)?;
    println!("āœ… Saved to get-all-results.hlx");
    
    // Display the content
    println!("\n--- Generated HLX Content ---");
    println!("{}", content);
    
    println!("\n=== HLX Get All Values Example Complete ===");
    Ok(())
}

```

## šŸŽØ **Real-World Examples**

### **Configuration Management**
```hlx
project "WebService" {
    name = "HLX API Server"
    version = "1.1.9"
    port = @env var=PORT default=8080
    database_url = @base64 input=postgresql://user:pass@localhost/db operation=encode
    api_key_hash = @hash input=my-secret-key algorithm=sha256
    startup_time = @timestamp
    instance_id = @uuid
}

agent "Database" {
    name = "PostgreSQL Connection Pool"
    max_connections = @math operation=mul a=10 b=100
    timeout_ms = @math operation=mul a=30 b=1000
    cache_size = @math operation=pow a=2 b=10
}
```

### **Data Processing Pipeline**
```hlx
workflow "DataPipeline" {
    name = "ETL Processing"
    input_format = "json"
    output_format = "hlx"
    
    # Process incoming data
    processed_data = @json input={"name":"John","age":30} operation=parse
    name_upper = @string input=John operation=upper
    age_hash = @hash input=30 algorithm=md5
    
    # Generate output
    output_id = @uuid
    processed_at = @now
    data_hash = @hash input={"name":"JOHN","age":"30"} algorithm=sha256
}
```

### **Counter & Statistics Management**
```hlx
context "Analytics" {
    # Initialize counters
    page_views = 0
    user_registrations = 0
    api_calls = 0
    
    # Increment counters (via hlx.increase())
    # page_views = 1, 2, 3...
    # user_registrations = 1, 2, 3...
    # api_calls = 100, 150, 200...
}

context "Session" {
    # Track session metrics
    duration_minutes = 0.0
    interactions = 0
    errors = 0
    
    # Increment session data
    # duration_minutes = 15.5, 23.75...
    # interactions = 1, 2, 3...
}
```

### **Security & Validation**
```hlx
context "Security" {
    # Hash sensitive data
    password_hash = @hash input=user_password algorithm=sha256
    api_key_encoded = @base64 input=secret_api_key operation=encode
    
    # Validate input
    is_valid_email = @string input=user@example.com operation=length
    sanitized_input = @string input=user_input operation=trim
    
    # Generate secure tokens
    session_token = @uuid
    csrf_token = @hash input=session_data algorithm=sha256
    timestamp = @timestamp
}
```

## šŸ› ļø **Installation**

### **From Source**
```bash
git clone https://github.com/helix/hlx.git
cd hlx
cargo build --release
```

### **Add to Your Project**
```toml
[dependencies]
hlx = { path = "../hlx" }
tokio = { version = "1.0", features = ["full"] }
```

## šŸ“š **Documentation**

### **Operator Reference**
- [Complete Operator List]hlx_test/examples/working_operators_summary.md
- [Parameter Formats]docs/operators.md
- [Best Practices]docs/best-practices.md

### **Examples**
- [Basic Usage]hlx_test/examples/basic_set_get.rs
- [Increase Method]hlx_test/examples/hlx_increase_1017.rs
- [All Operators Demo]hlx_test/examples/set_all.rs - Demonstrates all 38 operators
- [Operator Examples]hlx_test/examples/
- [Advanced Patterns]docs/advanced-patterns.md

## šŸŽÆ **Key Features**

### **āœ… What HLX Does Well**
- **38 Working Operators** - Comprehensive data processing capabilities
- **Increase Method** - Built-in counter increment functionality
- **Type Safety** - Rust's type system ensures reliability
- **Async Support** - Built for modern async/await patterns
- **Extensible** - Easy to add custom operators
- **Fast** - Rust performance with zero-cost abstractions
- **Memory Safe** - No garbage collection overhead
- **Cross-Platform** - Works on Linux, macOS, Windows

### **šŸ”§ Operator Categories**
- **Basic**: UUID, timestamps, current time
- **Data**: Base64, JSON, URL encoding/decoding
- **Security**: SHA256/MD5 hashing, data integrity
- **Math**: Arithmetic, statistical functions
- **String**: Transform, analyze, extract text
- **Logic**: Conditional operations, pattern matching
- **Web**: Session, cookie, HTTP context
- **Variables**: Global state, environment access

## šŸš€ **Performance**

HLX is built for performance:
- **Zero-cost abstractions** - Operator calls compile to efficient code
- **Memory efficient** - No garbage collection, predictable memory usage
- **Fast execution** - Rust's performance with async support
- **Scalable** - Handles large configurations and data processing

## šŸ¤ **Contributing**

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

### **Development Setup**
```bash
git clone https://github.com/helix/hlx.git
cd hlx
cargo test
cargo run --example basic_set_get
```

## šŸ“„ **License**

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## šŸ™ **Acknowledgments**

- Built with ā¤ļø using Rust
- Inspired by modern configuration management needs
- Designed for developer happiness and system reliability

---

**HLX - Where Configuration Meets Power** šŸš€

*Transform your configuration files into powerful data processing pipelines with HLX's beautiful operator system.*