-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforge-package-manager.html
More file actions
1528 lines (1388 loc) · 88.5 KB
/
forge-package-manager.html
File metadata and controls
1528 lines (1388 loc) · 88.5 KB
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
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forge Kernel - Package Manager</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/docs.css">
</head>
<body class="bg-gray-50 text-gray-900">
<!-- Navigation -->
<nav class="bg-white shadow-sm border-b">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0">
<h1 class="text-xl font-bold text-gray-900">
Forge Kernel
</h1>
</div>
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="index.html"
class="text-gray-900 inline-flex items-center px-1 pt-1 text-sm font-medium hover:text-blue-600">
Home
</a>
<a href="getting-started.html"
class="text-gray-900 inline-flex items-center px-1 pt-1 text-sm font-medium hover:text-blue-600">
Getting Started
</a>
<a href="core-concepts.html"
class="text-gray-900 inline-flex items-center px-1 pt-1 text-sm font-medium hover:text-blue-600">
Core Concepts
</a>
<a href="modules.html"
class="text-blue-600 inline-flex items-center px-1 pt-1 text-sm font-medium border-b-2 border-blue-600">
Capabilities
</a>
<a href="api-reference.html"
class="text-gray-900 inline-flex items-center px-1 pt-1 text-sm font-medium hover:text-blue-600">
API Reference
</a>
<a href="tutorial.html"
class="text-gray-900 inline-flex items-center px-1 pt-1 text-sm font-medium hover:text-blue-600">
Tutorials
</a>
</div>
</div>
<!-- Mobile menu button -->
<div class="flex items-center sm:hidden">
<button id="mobile-menu-button" class="text-gray-700 hover:text-blue-600 p-2">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
</div>
</div>
<!-- Mobile menu -->
<div id="mobile-menu" class="sm:hidden hidden bg-white border-t border-gray-200">
<div class="px-2 pt-2 pb-3 space-y-1">
<a href="index.html"
class="block px-3 py-2 text-gray-900 hover:text-blue-600">
Home
</a>
<a href="getting-started.html"
class="block px-3 py-2 text-gray-900 hover:text-blue-600">
Getting Started
</a>
<a href="core-concepts.html"
class="block px-3 py-2 text-gray-900 hover:text-blue-600">
Core Concepts
</a>
<a href="modules.html"
class="block px-3 py-2 text-blue-600 font-medium">
Capabilities
</a>
<a href="api-reference.html"
class="block px-3 py-2 text-gray-900 hover:text-blue-600">
API Reference
</a>
<a href="tutorial.html"
class="block px-3 py-2 text-gray-900 hover:text-blue-600">
Tutorials
</a>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="flex flex-col lg:flex-row gap-8">
<!-- Sidebar Navigation -->
<div id="sidebar-nav" class="lg:w-1/4">
<!-- Mobile menu overlay -->
<div id="mobile-menu-overlay" class="mobile-menu-overlay"></div>
<div class="bg-white rounded-lg shadow-sm p-6 sticky top-8">
<h3 class="text-lg font-semibold text-gray-900 mb-4">
PackageManager
</h3>
<nav class="space-y-2">
<a href="#overview"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Overview
</a>
<a href="#why-units"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Why Units, Not Source Code
</a>
<a href="#old-school-mirrors"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Old School Mirrors
</a>
<a href="#registry-structure"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Registry Structure
</a>
<a href="#small-business-benefits"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Small Business Benefits
</a>
<a href="#enterprise-benefits"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Enterprise Benefits
</a>
<a href="#host-anywhere"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Host Where You Like
</a>
<a href="#still-use-your-own"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Still Use Your Own Thing
</a>
<a href="#features"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Features
</a>
<a href="#installation"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Installation
</a>
<a href="#configuration"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Configuration
</a>
<a href="#developer-mode"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Developer Mode
</a>
<a href="#usage"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Usage
</a>
<a href="#registries"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Custom Registries
</a>
<a href="#commands"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
CLI Commands
</a>
<a href="#lock-file"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Lock File
</a>
<a href="#best-practices"
class="nav-link block px-3 py-2 text-sm text-gray-700 rounded-md hover:text-blue-600">
Some Suggestions
</a>
</nav>
</div>
</div>
<!-- Main Content -->
<div class="lg:w-3/4">
<div class="bg-white rounded-lg shadow-sm p-8">
<h1 class="text-4xl font-bold text-gray-900 mb-6">
ForgePackageManager
</h1>
<p class="text-xl text-gray-600 mb-8">
Package and capability management for Forge Kernel.
</p>
<!-- Overview -->
<section id="overview" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Overview
</h2>
<p class="text-gray-600 mb-6">
Package manager for Forge capability modules with registry support and integrity verification. Think of it like a trusted supplier system — you explicitly trust sources (like trusting a specific store). You control where things come from. Not a central marketplace you can't control.
</p>
<h3 class="text-lg font-semibold mb-3">Philosophy: Choice, Not Competition</h3>
<p class="text-gray-600 mb-4">
The package manager isn't trying to compete with or replace Composer. It's a choice. You can use it, or you can use your own thing. See <a href="#still-use-your-own" class="text-blue-600 hover:underline">Still Use Your Own Thing</a> for more on this.
</p>
<p class="text-gray-600 mb-4">
<strong>Why it exists:</strong>
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Capabilities are shipped as <strong>units (ZIP files)</strong>, not source code — see <a href="#why-units" class="text-blue-600 hover:underline">Why Units, Not Source Code</a></li>
<li>Works like <strong>old school mirrors</strong> — simple folder navigation — see <a href="#old-school-mirrors" class="text-blue-600 hover:underline">Old School Mirrors: How It Works</a></li>
<li>You want freedom to control your sources</li>
<li>You want it to behave like Linux package managers (apt, yum, pacman)</li>
<li>You want trusted sources, not a central registry you can't control</li>
<li>You want the power and capabilities that approach offers</li>
<li>Perfect for <strong>small business</strong> and <strong>enterprise</strong> — see <a href="#small-business-benefits" class="text-blue-600 hover:underline">Benefits for Small Business</a> and <a href="#enterprise-benefits" class="text-blue-600 hover:underline">Benefits for Enterprise</a></li>
<li>Host capabilities <strong>where you like, how you like</strong> — see <a href="#host-anywhere" class="text-blue-600 hover:underline">Host Where You Like, How You Like</a></li>
</ul>
<p class="text-gray-600 mb-4">
<strong>What you get:</strong>
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Capabilities as complete units (ZIP files) — no build steps, no compilation</li>
<li>Simple folder structure like old school software mirrors</li>
<li>Multiple source types (Git, SFTP, FTP, HTTP, Local, Network)</li>
<li>Trusted sources system (you explicitly trust what you install)</li>
<li>Lock files for reproducible installations</li>
<li>Integrity verification with SHA-256 hashes</li>
<li>No dependency on external package registries</li>
<li>Full control over distribution and hosting</li>
</ul>
<p class="text-gray-600 mb-4">
<strong>Use Composer if you want:</strong> Central package registry, dependency resolution, semantic versioning constraints, that ecosystem.
</p>
<p class="text-gray-600 mb-4">
<strong>Use Forge's package manager if you want:</strong> Control over your sources, Linux package manager-like behavior, trusted sources philosophy, freedom to choose where your capabilities come from, units instead of source code, simple folder-based distribution.
</p>
<p class="text-gray-600 mb-6">
Both can coexist. This is about choice, not competition. You can still use Composer, Git submodules, manual installation, or whatever works for you. The package manager is there if you want it — see <a href="#still-use-your-own" class="text-blue-600 hover:underline">Still Use Your Own Thing</a>.
</p>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-6">
<h3 class="font-semibold text-lg mb-4">Key Benefits</h3>
<div class="grid md:grid-cols-2 gap-4">
<div class="space-y-2">
<div class="flex items-center">
<span>Integrity verification with SHA-256 hashes</span>
</div>
<div class="flex items-center">
<span>Multiple registry support</span>
</div>
<div class="flex items-center">
<span>Version management and constraints</span>
</div>
</div>
<div class="space-y-2">
<div class="flex items-center">
<span>Lock file for reproducible installations</span>
</div>
<div class="flex items-center">
<span>Cached downloads for performance</span>
</div>
<div class="flex items-center">
<span>Seamless Forge integration</span>
</div>
</div>
</div>
</div>
</section>
<!-- Why Units, Not Source Code -->
<section id="why-units" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Why Units, Not Source Code
</h2>
<p class="text-gray-600 mb-4">
Forge capabilities are shipped as complete, self-contained ZIP files — units, not source code. This fundamental design decision shapes how the package manager works and why it's different from traditional package managers.
</p>
<h3 class="text-lg font-semibold mb-3">Complete Units</h3>
<p class="text-gray-600 mb-4">
Each capability version is a single ZIP file containing everything needed to run it. No compilation, no build steps, no processing required. Download the ZIP, extract it, and it's ready to use.
</p>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
<p class="text-sm text-blue-700">
<strong>Think of it like this:</strong> Instead of getting ingredients and a recipe (source code + build instructions), you get a finished meal (complete ZIP file). Just extract and serve.
</p>
</div>
<h3 class="text-lg font-semibold mb-3">Benefits of Units</h3>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li><strong>Faster installation:</strong> No build time, no compilation, just extract and go</li>
<li><strong>No build dependencies:</strong> Don't need Node.js, Composer, or other build tools on production servers</li>
<li><strong>Reproducible deployments:</strong> Same ZIP file = same result, every time</li>
<li><strong>Simple distribution:</strong> Just host ZIP files, no complex build pipelines</li>
<li><strong>Version control:</strong> Each version is a complete, immutable unit</li>
</ul>
<h3 class="text-lg font-semibold mb-3">What's Inside a Unit</h3>
<p class="text-gray-600 mb-4">
Each capability ZIP file contains the complete module structure:
</p>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-text">forge-auth-0.2.4.zip
└── forge-auth/
├── forge.json # Module metadata
├── src/ # Source code
│ ├── Controllers/
│ ├── Services/
│ ├── Middlewares/
│ └── ...
├── config/ # Configuration files
├── resources/ # Views, assets, etc.
└── tests/ # Test files</code></pre>
</div>
</section>
<!-- Old School Mirrors -->
<section id="old-school-mirrors" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Old School Mirrors: How It Works
</h2>
<p class="text-gray-600 mb-4">
The package manager works like old school software mirrors. Remember when you'd navigate through folders on an FTP server to find the file you needed? That's exactly how this works — simple, transparent, and human-readable.
</p>
<h3 class="text-lg font-semibold mb-3">Folder Navigation</h3>
<p class="text-gray-600 mb-4">
Capabilities are organized in a simple folder structure. To find a capability, you navigate through folders:
</p>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-text">modules/
└── forge-auth/ # Navigate to the capability
└── 0.2.4/ # Navigate to the version
└── 0.2.4.zip # There's your file!</code></pre>
</div>
<p class="text-gray-600 mb-4">
The package manager automates this navigation. When you run <code class="bg-gray-100 px-2 py-1 rounded">package:install-module --module=forge-auth@0.2.4</code>, it:
</p>
<ol class="list-decimal list-inside space-y-2 text-gray-600 mb-4">
<li>Reads <code class="bg-gray-100 px-2 py-1 rounded">modules.json</code> to find the capability</li>
<li>Gets the folder path from the <code class="bg-gray-100 px-2 py-1 rounded">url</code> field</li>
<li>Navigates to <code class="bg-gray-100 px-2 py-1 rounded">modules/forge-auth/0.2.4/</code></li>
<li>Downloads <code class="bg-gray-100 px-2 py-1 rounded">0.2.4.zip</code></li>
<li>Verifies the integrity hash</li>
<li>Extracts it to your <code class="bg-gray-100 px-2 py-1 rounded">modules/</code> directory</li>
</ol>
<h3 class="text-lg font-semibold mb-3">You Can Browse Manually</h3>
<p class="text-gray-600 mb-4">
Because it's just folders and files, you can manually browse any registry. If you're using a Git-based registry, you can browse it on GitHub. If it's an HTTP registry, you can navigate the folders in your browser. If it's SFTP, you can use any FTP client. The structure is always the same, always human-readable.
</p>
<div class="bg-green-50 border-l-4 border-green-400 p-4 mb-6">
<p class="text-sm text-green-700">
<strong>Transparency:</strong> There's no magic. You can see exactly where capabilities come from, what versions are available, and download them manually if you want. The package manager just makes it convenient.
</p>
</div>
</section>
<!-- Registry Structure -->
<section id="registry-structure" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Registry Structure
</h2>
<p class="text-gray-600 mb-4">
Every registry follows the same simple structure. Here's how it's organized:
</p>
<h3 class="text-lg font-semibold mb-3">Directory Layout</h3>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-text">registry-root/
├── modules.json # Manifest with all capabilities and versions
└── modules/
└── forge-auth/
├── 0.2.4/
│ └── 0.2.4.zip
├── 0.2.3/
│ └── 0.2.3.zip
├── 0.2.2/
│ └── 0.2.2.zip
└── ...</code></pre>
</div>
<h3 class="text-lg font-semibold mb-3">modules.json Manifest</h3>
<p class="text-gray-600 mb-4">
The <code class="bg-gray-100 px-2 py-1 rounded">modules.json</code> file is the index. It lists all available capabilities, their versions, and where to find them:
</p>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-json">{
"forge-auth": {
"latest": "0.2.4",
"versions": {
"0.2.4": {
"description": "Version 0.2.4 of forge-auth",
"url": "forge-auth/0.2.4",
"integrity": "33bd70eead56a2855e97147e870858bf20bd8416a92cb516066aa31020a09367"
},
"0.2.3": {
"description": "Version 0.2.3 of forge-auth",
"url": "forge-auth/0.2.3",
"integrity": "3a0b1747f2b8d4f3f604e6e070872fd13ebb78aad93b2838a830e8978ad9b6f6"
}
}
}
}</code></pre>
</div>
<h3 class="text-lg font-semibold mb-3">How It Works</h3>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li><strong>url field:</strong> Points to the folder path relative to <code class="bg-gray-100 px-2 py-1 rounded">modules/</code>. For example, <code class="bg-gray-100 px-2 py-1 rounded">"forge-auth/0.2.4"</code> means <code class="bg-gray-100 px-2 py-1 rounded">modules/forge-auth/0.2.4/</code></li>
<li><strong>integrity hash:</strong> SHA-256 hash of the ZIP file. Used to verify the file hasn't been tampered with</li>
<li><strong>latest field:</strong> The default version to install if no version is specified</li>
</ul>
<h3 class="text-lg font-semibold mb-3">ZIP File Naming</h3>
<p class="text-gray-600 mb-4">
The ZIP file is named after the version number. In the folder <code class="bg-gray-100 px-2 py-1 rounded">modules/forge-auth/0.2.4/</code>, you'll find <code class="bg-gray-100 px-2 py-1 rounded">0.2.4.zip</code>. Simple and predictable.
</p>
</section>
<!-- Benefits for Small Business -->
<section id="small-business-benefits" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Benefits for Small Business
</h2>
<p class="text-gray-600 mb-4">
The unit-based approach is perfect for small businesses that want control without complexity.
</p>
<h3 class="text-lg font-semibold mb-3">Host on Your Own Infrastructure</h3>
<p class="text-gray-600 mb-4">
You don't need expensive hosting or complex infrastructure. Host capabilities on:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>GitHub (free for public repos, affordable for private)</li>
<li>GitLab (free tiers available)</li>
<li>Your own web server (just serve files via HTTP)</li>
<li>SFTP server (many hosting providers include this)</li>
<li>FTP server (basic file hosting)</li>
</ul>
<h3 class="text-lg font-semibold mb-3">No Complex Build Systems</h3>
<p class="text-gray-600 mb-4">
You don't need CI/CD pipelines, build servers, or complex tooling. Just:
</p>
<ol class="list-decimal list-inside space-y-2 text-gray-600 mb-4">
<li>Create a ZIP file of your capability</li>
<li>Calculate the SHA-256 hash</li>
<li>Upload it to the right folder</li>
<li>Update <code class="bg-gray-100 px-2 py-1 rounded">modules.json</code></li>
</ol>
<p class="text-gray-600 mb-4">
That's it. No build steps, no compilation, no special tools required.
</p>
<h3 class="text-lg font-semibold mb-3">Full Control</h3>
<p class="text-gray-600 mb-4">
You control:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>What capabilities are available</li>
<li>Which versions to publish</li>
<li>Where they're hosted</li>
<li>Who has access</li>
<li>When updates are released</li>
</ul>
<h3 class="text-lg font-semibold mb-3">Simple Management</h3>
<p class="text-gray-600 mb-4">
Managing a registry is as simple as managing files. No databases, no special services, no complex APIs. Just folders and files.
</p>
</section>
<!-- Benefits for Enterprise -->
<section id="enterprise-benefits" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Benefits for Enterprise
</h2>
<p class="text-gray-600 mb-4">
Enterprise organizations need control, compliance, and security. The unit-based approach delivers all three.
</p>
<h3 class="text-lg font-semibold mb-3">Host Internally</h3>
<p class="text-gray-600 mb-4">
Keep capabilities completely internal:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Private Git repositories (GitLab Enterprise, GitHub Enterprise, Bitbucket Server)</li>
<li>Internal file servers (network shares, NAS devices)</li>
<li>Internal web servers (serve via HTTP/HTTPS)</li>
<li>SFTP servers (secure file transfer)</li>
<li>Any infrastructure you already have</li>
</ul>
<h3 class="text-lg font-semibold mb-3">Complete Control Over Distribution</h3>
<p class="text-gray-600 mb-4">
You control the entire distribution chain:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Who can access which capabilities</li>
<li>Which versions are available to which teams</li>
<li>When updates are rolled out</li>
<li>How capabilities are distributed (internal network, VPN, etc.)</li>
</ul>
<h3 class="text-lg font-semibold mb-3">Audit Trail</h3>
<p class="text-gray-600 mb-4">
Every capability has an integrity hash. You can:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Verify what was installed matches what was published</li>
<li>Track which versions are in use across your organization</li>
<li>Ensure no tampering occurred during distribution</li>
<li>Maintain compliance with security policies</li>
</ul>
<h3 class="text-lg font-semibold mb-3">Works with Existing Infrastructure</h3>
<p class="text-gray-600 mb-4">
No need for special services or new infrastructure. Works with:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Existing Git repositories</li>
<li>Existing file servers</li>
<li>Existing web servers</li>
<li>Existing network shares</li>
<li>Any file-serving infrastructure you already have</li>
</ul>
<h3 class="text-lg font-semibold mb-3">Compliance-Friendly</h3>
<p class="text-gray-600 mb-4">
Perfect for organizations with strict compliance requirements:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>You control where code comes from (no external dependencies)</li>
<li>You can audit every capability before it's installed</li>
<li>You can maintain internal mirrors of approved capabilities</li>
<li>You can enforce policies on which capabilities are allowed</li>
</ul>
<h3 class="text-lg font-semibold mb-3">Mirror and Cache</h3>
<p class="text-gray-600 mb-4">
You can mirror or cache capabilities locally for:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Faster installations (local network is faster than internet)</li>
<li>Offline installations (air-gapped environments)</li>
<li>Bandwidth savings (download once, use many times)</li>
<li>Redundancy (backup copies of critical capabilities)</li>
</ul>
</section>
<!-- Host Where You Like -->
<section id="host-anywhere" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Host Where You Like, How You Like
</h2>
<p class="text-gray-600 mb-4">
The package manager supports multiple source types. Choose what works for you, or use multiple sources at once.
</p>
<h3 class="text-lg font-semibold mb-3">Supported Source Types</h3>
<div class="grid md:grid-cols-2 gap-6 mb-6">
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-semibold mb-2">Git</h4>
<p class="text-sm text-gray-600 mb-2">GitHub, GitLab, Bitbucket, or any Git repository</p>
<p class="text-xs text-gray-500">Perfect for version control and collaboration</p>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-semibold mb-2">SFTP</h4>
<p class="text-sm text-gray-600 mb-2">Secure file transfer protocol</p>
<p class="text-xs text-gray-500">Secure, encrypted file transfers</p>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-semibold mb-2">FTP/FTPS</h4>
<p class="text-sm text-gray-600 mb-2">File transfer protocol (with optional SSL)</p>
<p class="text-xs text-gray-500">Works with standard FTP servers</p>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-semibold mb-2">HTTP/HTTPS</h4>
<p class="text-sm text-gray-600 mb-2">Direct download from URLs</p>
<p class="text-xs text-gray-500">Simple web server hosting</p>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-semibold mb-2">Local</h4>
<p class="text-sm text-gray-600 mb-2">Local file system</p>
<p class="text-xs text-gray-500">For development or air-gapped environments</p>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-semibold mb-2">Network</h4>
<p class="text-sm text-gray-600 mb-2">Network file shares</p>
<p class="text-xs text-gray-500">For enterprise network environments</p>
</div>
</div>
<h3 class="text-lg font-semibold mb-3">Configure in source_list.php</h3>
<p class="text-gray-600 mb-4">
Configure your trusted sources in <code class="bg-gray-100 px-2 py-1 rounded">config/source_list.php</code>:
</p>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-php"><?php
return [
'registry' => [
// Official Forge registry (GitHub)
[
'name' => 'forge-engine-modules',
'type' => 'git',
'url' => 'https://github.com/forge-engine/modules',
'branch' => 'main',
'private' => false
],
// Your company's private registry (SFTP)
[
'name' => 'company-modules',
'type' => 'sftp',
'host' => 'sftp.company.com',
'username' => env('SFTP_USER'),
'password' => env('SFTP_PASS'),
'path' => '/modules'
],
// Internal network share
[
'name' => 'internal-modules',
'type' => 'network',
'path' => '\\\\fileserver\\modules'
]
]
];</code></pre>
</div>
<h3 class="text-lg font-semibold mb-3">You Control the Distribution Chain</h3>
<p class="text-gray-600 mb-4">
Each source is a trusted source you explicitly add. You decide:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li>Which sources to trust</li>
<li>What capabilities come from which source</li>
<li>How sources are accessed (authentication, encryption, etc.)</li>
<li>When to add or remove sources</li>
</ul>
</section>
<!-- Still Use Your Own Thing -->
<section id="still-use-your-own" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Still Use Your Own Thing
</h2>
<p class="text-gray-600 mb-4">
The package manager is a choice, not a requirement. You have complete freedom to use whatever tools and methods work for you.
</p>
<h3 class="text-lg font-semibold mb-3">Use Composer</h3>
<p class="text-gray-600 mb-4">
You can still use Composer for dependencies. The package manager doesn't replace Composer — it's an alternative for managing Forge capabilities. Use both, use one, or use neither. Your choice.
</p>
<h3 class="text-lg font-semibold mb-3">Manual Installation</h3>
<p class="text-gray-600 mb-4">
You can manually download and install capabilities:
</p>
<ol class="list-decimal list-inside space-y-2 text-gray-600 mb-4">
<li>Download the ZIP file from the registry</li>
<li>Extract it to your <code class="bg-gray-100 px-2 py-1 rounded">modules/</code> directory</li>
<li>Update <code class="bg-gray-100 px-2 py-1 rounded">forge.json</code> if needed</li>
</ol>
<p class="text-gray-600 mb-4">
The package manager just automates this process. You can do it manually if you prefer.
</p>
<h3 class="text-lg font-semibold mb-3">Git Submodules</h3>
<p class="text-gray-600 mb-4">
You can use Git submodules to include capabilities directly from their source repositories. The package manager doesn't prevent this — it's just another option.
</p>
<h3 class="text-lg font-semibold mb-3">Custom Scripts</h3>
<p class="text-gray-600 mb-4">
Write your own installation scripts. Use deployment tools. Use whatever works for your workflow. The package manager is there if you want it, but you're not locked into it.
</p>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
<p class="text-sm text-blue-700">
<strong>Freedom:</strong> The package manager is a tool, not a constraint. Use it when it helps, ignore it when it doesn't. You're in control.
</p>
</div>
</section>
<!-- Features -->
<section id="features" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-6">
Features
</h2>
<div class="grid md:grid-cols-2 gap-6">
<div
class="feature-card bg-gradient-to-br from-blue-50 to-indigo-50 border border-blue-200 rounded-lg p-6">
<div class="flex items-center mb-3">
<h3 class="text-lg font-semibold">Multi-Registry Support</h3>
</div>
<p class="text-gray-600 text-sm mb-3">
Connect to multiple registries including official Forge registry and custom private
registries.
</p>
<ul class="text-xs text-gray-500 space-y-1">
<li>• Official Forge registry</li>
<li>• Private GitHub repositories</li>
<li>• Custom registry endpoints</li>
</ul>
</div>
<div
class="feature-card bg-gradient-to-br from-green-50 to-emerald-50 border border-green-200 rounded-lg p-6">
<div class="flex items-center mb-3">
<h3 class="text-lg font-semibold">Integrity Verification</h3>
</div>
<p class="text-gray-600 text-sm mb-3">
Every module download is verified using SHA-256 integrity hashes to ensure security.
</p>
<ul class="text-xs text-gray-500 space-y-1">
<li>• SHA-256 hash verification</li>
<li>• Tamper detection</li>
<li>• Secure downloads</li>
</ul>
</div>
<div
class="feature-card bg-gradient-to-br from-purple-50 to-violet-50 border border-purple-200 rounded-lg p-6">
<div class="flex items-center mb-3">
<h3 class="text-lg font-semibold">Version Management</h3>
</div>
<p class="text-gray-600 text-sm mb-3">
Sophisticated version resolution with support for semantic versioning and
constraints.
</p>
<ul class="text-xs text-gray-500 space-y-1">
<li>• Semantic versioning</li>
<li>• Version constraints</li>
<li>• Latest version detection</li>
</ul>
</div>
<div
class="feature-card bg-gradient-to-br from-orange-50 to-red-50 border border-orange-200 rounded-lg p-6">
<div class="flex items-center mb-3">
<h3 class="text-lg font-semibold">Lock File Support</h3>
</div>
<p class="text-gray-600 text-sm mb-3">
Generate and use lock files for reproducible module installations across
environments.
</p>
<ul class="text-xs text-gray-500 space-y-1">
<li>• Reproducible installations</li>
<li>• Environment consistency</li>
<li>• Team collaboration</li>
</ul>
</div>
</div>
</section>
<!-- Installation -->
<section id="installation" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Installation
</h2>
<p class="text-gray-600 mb-6">
Pre-installed with Forge Kernel. Manual installation options available.
</p>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-bash"># Install ForgePackageManager capability (with wizard)
php forge.php package:install-module
# Install specific module (skip wizard)
php forge.php package:install-module --module=ForgePackageManager
# Install specific version (skip wizard)
php forge.php package:install-module --module=ForgePackageManager@1.0.0
# Verify installation
php forge.php package:list-modules | grep ForgePackageManager</code></pre>
</div>
<div class="bg-green-50 border-l-4 border-green-400 p-4">
<div class="flex">
<div class="ml-3">
<p class="text-sm text-green-700">
<strong>Pre-installed:</strong> ForgePackageManager is included by default in
new Forge installations.
</p>
</div>
</div>
</div>
</section>
<!-- Configuration -->
<section id="configuration" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Configuration
</h2>
<p class="text-gray-600 mb-6">
Configure through <code
class="bg-gray-100 px-2 py-1 rounded">config/source_list.php</code> file. This is where you define your trusted sources — like configuring apt sources on Debian or yum repositories on RHEL.
</p>
<h3 class="text-lg font-semibold mb-3">Trusted Sources Philosophy</h3>
<p class="text-gray-600 mb-4">
Similar to Linux package managers (apt, yum, pacman), you explicitly define and trust your capability sources. You control where your capabilities come from. This gives you freedom and control over your dependencies.
</p>
<h3 class="text-lg font-semibold mb-3">Basic Configuration</h3>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-php"><?php
return [
'registry' => [
// Official Forge registry (included by default)
[
'name' => 'forge-engine-modules',
'type' => 'git',
'url' => 'https://github.com/forge-engine/modules',
'branch' => 'main',
'private' => false,
'description' => 'Forge Kernel Official Modules', // Optional: shown in wizard
'personal_token' => env('GITHUB_TOKEN') // Only needed for private repos
],
// Custom private registry example
[
'name' => 'my-company-modules',
'type' => 'git',
'url' => 'https://github.com/mycompany/private-modules',
'branch' => 'main',
'private' => true,
'description' => 'Company Internal Modules', // Optional: shown in wizard
'personal_token' => env('GITHUB_TOKEN')
],
],
'cache_ttl' => 3600, // Cache time-to-live in seconds
];</code></pre>
</div>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
<p class="text-sm text-blue-700">
<strong>Registry Descriptions:</strong> You can add an optional <code class="bg-blue-100 px-2 py-1 rounded">description</code> field to each registry entry. This description will be displayed in the interactive wizard when selecting registries, helping users identify the purpose of each registry (e.g., "Forge Kernel Official Modules", "Company Internal Modules").
</p>
</div>
<h3 class="text-lg font-semibold mb-3">Supported Source Types</h3>
<p class="text-gray-600 mb-4">
The package manager supports multiple source types:
</p>
<ul class="list-disc list-inside space-y-2 text-gray-600 mb-4">
<li><strong>Git:</strong> GitHub, GitLab, Bitbucket, or any Git repository</li>
<li><strong>SFTP:</strong> Secure file transfer protocol</li>
<li><strong>FTP/FTPS:</strong> File transfer protocol</li>
<li><strong>HTTP/HTTPS:</strong> Direct download from URLs</li>
<li><strong>Local:</strong> Local file system paths</li>
<li><strong>Network:</strong> Network file shares</li>
</ul>
<p class="text-gray-600 mb-4">
See the <a href="https://github.com/forge-engine/forge/blob/main/modules/ForgePackageManager/docs/" class="text-blue-600 hover:underline">ForgePackageManager documentation</a> for detailed configuration of each source type.
</p>
<h3 class="text-lg font-semibold mb-3">Environment Variables</h3>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-6 mb-6">
<p class="text-gray-600 mb-3">Use environment variables for sensitive configuration:</p>
<div class="code-block p-4 text-white rounded-lg">
<pre><code class="language-bash"># .env file
GITHUB_TOKEN=ghp_your_github_personal_access_token
PRIVATE_REGISTRY_TOKEN=your_private_registry_token
CACHE_TTL=7200</code></pre>
</div>
</div>
</section>
<!-- Developer Mode -->
<section id="developer-mode" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Developer Mode
</h2>
<p class="text-gray-600 mb-4">
Enable developer mode to unlock registry management commands. Set <code class="bg-gray-100 px-2 py-1 rounded">FORGE_DEVELOPER_MODE=true</code> in your <code class="bg-gray-100 px-2 py-1 rounded">.env</code> file.
</p>
<h3 class="text-lg font-semibold mb-3">Initializing a Registry</h3>
<p class="text-gray-600 mb-4">
Once developer mode is enabled, you can use <code class="bg-gray-100 px-2 py-1 rounded">dev:registry:init</code> to initialize a new registry. The command uses a wizard that asks:
</p>
<ol class="list-decimal list-inside space-y-2 text-gray-600 mb-4">
<li><strong>Registry type:</strong> Choose <code class="bg-gray-100 px-2 py-1 rounded">framework</code> or <code class="bg-gray-100 px-2 py-1 rounded">modules</code> (defaults to <code class="bg-gray-100 px-2 py-1 rounded">modules</code> if not specified)</li>
<li><strong>Git repository URL:</strong> The URL of your Git repository</li>
<li><strong>Branch name:</strong> The branch to use (defaults to <code class="bg-gray-100 px-2 py-1 rounded">main</code>)</li>
<li><strong>Is this a private repository?</strong> Answer <code class="bg-gray-100 px-2 py-1 rounded">yes</code> or <code class="bg-gray-100 px-2 py-1 rounded">no</code> (defaults to <code class="bg-gray-100 px-2 py-1 rounded">no</code>)</li>
</ol>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-bash"># Initialize with wizard (interactive)
php forge.php dev:registry:init
# Initialize modules registry (skip wizard)
php forge.php dev:registry:init --type=modules
# Initialize framework registry (skip wizard)
php forge.php dev:registry:init --type=framework</code></pre>
</div>
<h3 class="text-lg font-semibold mb-3">Manual Registry Management</h3>
<p class="text-gray-600 mb-4">
You can still manage your registry manually if you prefer. Create the directory structure, add your modules, and update <code class="bg-gray-100 px-2 py-1 rounded">modules.json</code> manually. However, developer mode commands make it easier and ensure proper structure.
</p>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
<p class="text-sm text-blue-700">
<strong>Note:</strong> Developer mode commands are only available when <code>FORGE_DEVELOPER_MODE=true</code> is set in your <code>.env</code> file. This prevents accidental use of development commands in production environments.
</p>
</div>
</section>
<!-- Usage -->
<section id="usage" class="section-anchor mb-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4">
Usage
</h2>
<h3 class="text-lg font-semibold mb-3">Installing Capabilities</h3>
<p class="text-gray-600 mb-3">
The <code class="bg-gray-100 px-2 py-1 rounded">package:install-module</code> command features an interactive wizard that guides you through the installation process. Use the <code class="bg-gray-100 px-2 py-1 rounded">--module=</code> parameter to skip the wizard and specify the module directly.
</p>
<h4 class="text-md font-semibold mb-2 mt-4">Multiple Module Installation</h4>
<p class="text-gray-600 mb-3">
You can install multiple modules at once by providing module names as positional arguments. If no version is specified, the latest version will be installed automatically.
</p>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-bash"># Install multiple modules (latest versions)
php forge.php package:install-module module-one module-two module-three
# Install multiple modules with mixed versions
php forge.php package:install-module module-one module-two@1.0.0 module-three
# Install multiple modules with force flag
php forge.php package:install-module module-one module-two --force</code></pre>
</div>
<h4 class="text-md font-semibold mb-2 mt-4">Interactive Wizard</h4>
<p class="text-gray-600 mb-3">
When you run <code class="bg-gray-100 px-2 py-1 rounded">package:install-module</code> without arguments, an interactive wizard starts:
</p>
<ol class="list-decimal list-inside space-y-2 text-gray-600 mb-4">
<li><strong>Choose installation method:</strong> Select "Enter module name manually" or "Browse available modules"</li>
<li><strong>If browsing:</strong>
<ul class="list-disc list-inside ml-6 mt-2 space-y-1">
<li>Select a registry from the list (registries show descriptions if configured)</li>
<li>Choose "Select a single module" or "Select multiple modules (latest)"</li>
<li>If single: Select a module, then select a version (shows commit messages for git-based registries when available)</li>
<li>If multiple: Use multi-select with checkboxes to select multiple modules (Space to toggle, Enter to confirm) - all install latest version</li>
<li>Choose whether to force download (bypass cache)</li>
</ul>
</li>
<li><strong>If manual entry:</strong>
<ul class="list-disc list-inside ml-6 mt-2 space-y-1">
<li>Enter the module name (with optional version, e.g., <code class="bg-gray-100 px-2 py-1 rounded">forge-welcome@1.0.0</code>)</li>
<li>If no version specified, select from available versions</li>
<li>Choose whether to force download (bypass cache)</li>
</ul>
</li>
</ol>
<div class="code-block p-6 text-white rounded-lg mb-6">
<pre><code class="language-bash"># Install with wizard (interactive)
php forge.php package:install-module
# Install latest version (skip wizard)
php forge.php package:install-module --module=forge-auth
# Install specific version (skip wizard)
php forge.php package:install-module --module=forge-auth@1.2.0
# Install multiple modules (skip wizard)
php forge.php package:install-module forge-auth forge-storage forge-logger
# Install multiple modules with versions (skip wizard)
php forge.php package:install-module forge-auth@1.2.0 forge-storage forge-logger@0.1.0
# Force download bypassing cache (skip wizard)
php forge.php package:install-module --module=forge-auth --force
# Install all capabilities from lock file and scaffold app structure
php forge.php package:install-project</code></pre>
</div>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
<p class="text-sm text-blue-700">
<strong>Version Selection:</strong> When browsing modules from git-based registries, version options display commit messages (truncated to 80 characters) to help you understand what changed in each version, similar to <code class="bg-blue-100 px-2 py-1 rounded">dev:modules:list</code>.
</p>
</div>
<h3 class="text-lg font-semibold mb-3">Removing Capabilities</h3>
<p class="text-gray-600 mb-3">
The <code class="bg-gray-100 px-2 py-1 rounded">package:remove-module</code> command features an interactive wizard that displays all installed modules with their descriptions, making it easy to select which module(s) to remove.