-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.html
More file actions
1275 lines (1224 loc) · 72.2 KB
/
index.html
File metadata and controls
1275 lines (1224 loc) · 72.2 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">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="color-scheme" content="dark">
<title>Forge | Local-first, multi-agent, programmable software-engineering runtime</title>
<meta name="description" content="Forge - A local-first, multi-agent, programmable software-engineering CLI runtime.">
<meta name="keywords" content="Forge, CLI, AI agent, local-first, multi-agent, software engineering, LLM, coding assistant, open source, developer tools, typescript, runtime">
<meta name="author" content="Son Nguyen">
<meta name="robots" content="index, follow">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://github.com/hoangsonww/Forge-Agentic-Coding-CLI">
<meta property="og:title" content="Forge | Local-first, multi-agent, programmable software-engineering runtime">
<meta property="og:description" content="Forge - A local-first, multi-agent, programmable software-engineering CLI runtime.">
<meta property="og:image" content="https://opengraph.githubassets.com/1/hoangsonw/Forge-Agentic-Coding-CLI">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://github.com/hoangsonww/Forge-Agentic-Coding-CLI">
<meta property="twitter:title" content="Forge | Local-first, multi-agent, programmable software-engineering runtime">
<meta property="twitter:description" content="Forge - A local-first, multi-agent, programmable software-engineering CLI runtime.">
<meta property="twitter:image" content="https://opengraph.githubassets.com/1/hoangsonw/Forge-Agentic-Coding-CLI">
<!-- Theme & Icons -->
<meta name="theme-color" content="#0891b2">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='100' y2='100' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%232dd4bf'/%3E%3Cstop offset='1' stop-color='%230891b2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='100' height='100' rx='22' fill='url(%23g)'/%3E%3Cpath d='M25 20 L75 20 L75 34 L40 34 L40 46 L65 46 L65 58 L40 58 L40 80 L25 80 Z' fill='white'/%3E%3C/svg%3E">
<link rel="canonical" href="https://github.com/hoangsonww/Forge-Agentic-Coding-CLI">
<link rel="stylesheet" href="wiki/styles.css">
</head>
<body>
<!-- ============================================================
TOP NAV + PROGRESS
============================================================ -->
<header class="topbar">
<div class="row">
<a class="logo" href="#top">
<svg viewBox="0 0 100 100" aria-hidden="true"><defs><linearGradient id="lg" x1="0" y1="0" x2="100" y2="100" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2dd4bf"/><stop offset="1" stop-color="#0891b2"/></linearGradient></defs><rect width="100" height="100" rx="22" fill="url(#lg)"/><path d="M25 20 L75 20 L75 34 L40 34 L40 46 L65 46 L65 58 L40 58 L40 80 L25 80 Z" fill="white"/></svg>
<span class="title">Forge</span>
</a>
<nav class="nav-links" aria-label="primary">
<a href="#overview">Overview</a>
<a href="#features">Features</a>
<a href="#vscode">VS Code</a>
<a href="#loop">Loop</a>
<a href="#executor">Executor</a>
<a href="#memory">Memory</a>
<a href="#providers">Providers</a>
<a href="#security">Safety</a>
<a href="#modes">Modes</a>
<a href="#cli">CLI</a>
<a href="#install">Install</a>
<a href="#cicd">CI/CD</a>
<a href="#numbers">Metrics</a>
</nav>
<a class="nav-gh" href="https://www.npmjs.com/package/@hoangsonw/forge">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M2 6h20v12H2V6zm3 3v6h3V9H5zm5 0v6h3v-3h1v3h3V9h-7zm9 0v6h-2V9h2z"/></svg>
<span>npm</span>
</a>
<a class="nav-gh" href="https://github.com/hoangsonww/Forge-Agentic-Coding-CLI">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 .5A12 12 0 0 0 0 12.7a12 12 0 0 0 8.2 11.5c.6.1.8-.3.8-.6v-2.1c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1.1-.8.1-.8.1-.8 1.2.1 1.9 1.3 1.9 1.3 1.1 2 3 1.4 3.7 1 .1-.8.4-1.4.8-1.7-2.7-.3-5.5-1.3-5.5-6 0-1.3.5-2.4 1.3-3.2-.1-.3-.6-1.6.1-3.2 0 0 1-.3 3.3 1.2a11 11 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.7 1.6.2 2.9.1 3.2.8.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.7-5.5 6 .4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 24 12.7 12 12 0 0 0 12 .5z"/></svg>
<span>GitHub</span>
</a>
</div>
<div class="progress" aria-hidden="true"><div class="progress-bar" id="progress-bar"></div></div>
</header>
<!-- ============================================================
HERO
============================================================ -->
<header class="hero" id="top">
<div class="hero-inner">
<span class="eyebrow"><span class="pulse"></span> Local-first · Multi-agent · Programmable</span>
<h1>
<span class="line"><span>A <em>runtime</em>.</span></span>
<span class="line"><span>Not a chat wrapper.</span></span>
</h1>
<p class="lede">
Forge ships its own scheduler, sandbox, permission system, state
machine, iterative tool-use executor, four-tier memory, and plugin
ecosystem. <strong style="color:var(--fg)">You pick the model.
You approve the actions.</strong> Everything is inspectable,
replayable, and yours.
</p>
<div class="cta">
<a class="btn primary" href="#install">Install Forge →</a>
<a class="btn" href="#overview">Read the wiki <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg></a>
<a class="btn" href="https://www.npmjs.com/package/@hoangsonw/forge">npm package <svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M2 6h20v12H2V6zm3 3v6h3V9H5zm5 0v6h3v-3h1v3h3V9h-7zm9 0v6h-2V9h2z"/></svg></a>
<a class="btn" href="https://github.com/hoangsonww/Forge-Agentic-Coding-CLI">GitHub <svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M12 .5A12 12 0 0 0 0 12.7a12 12 0 0 0 8.2 11.5c.6.1.8-.3.8-.6v-2.1c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1.1-.8.1-.8.1-.8 1.2.1 1.9 1.3 1.9 1.3 1.1 2 3 1.4 3.7 1 .1-.8.4-1.4.8-1.7-2.7-.3-5.5-1.3-5.5-6 0-1.3.5-2.4 1.3-3.2-.1-.3-.6-1.6.1-3.2 0 0 1-.3 3.3 1.2a11 11 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.7 1.6.2 2.9.1 3.2.8.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.7-5.5 6 .4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 24 12.7 12 12 0 0 0 12 .5z"/></svg></a>
</div>
<div class="hero-stats">
<div class="hero-stat"><div class="n"><span class="cu" data-to="173">0</span> ms</div><div class="l">doctor cold-start</div></div>
<div class="hero-stat"><div class="n"><span class="cu" data-to="89">0</span> KB</div><div class="l">UI shell · 0 CDN</div></div>
<div class="hero-stat"><div class="n"><span class="cu" data-to="1.5" data-decimals="1">0</span> s</div><div class="l">provider probe</div></div>
<div class="hero-stat"><div class="n"><span class="cu" data-to="6">0</span> · <span class="cu" data-to="41">0</span></div><div class="l">providers · families</div></div>
<div class="hero-stat"><div class="n"><span class="cu" data-to="203">0</span></div><div class="l">tests · 100% pass</div></div>
</div>
</div>
</header>
<!-- ============================================================
MARQUEES
============================================================ -->
<div class="marquee-band" aria-hidden="true">
<div class="marquee" style="--dur:38s;--gap:56px">
<span class="mq-item"><span class="dot"></span>Local-first</span><span class="mq-item ghost">Agentic</span><span class="mq-item accent">Inspectable</span><span class="mq-item ghost">Default-deny</span><span class="mq-item"><span class="dot"></span>Mode-driven</span><span class="mq-item ghost">Reproducible</span><span class="mq-item accent">Concurrent-writer-safe</span><span class="mq-item ghost">Programmable</span><span class="mq-item"><span class="dot"></span>Sandboxed</span><span class="mq-item ghost">Permissioned</span>
<span class="mq-item"><span class="dot"></span>Local-first</span><span class="mq-item ghost">Agentic</span><span class="mq-item accent">Inspectable</span><span class="mq-item ghost">Default-deny</span><span class="mq-item"><span class="dot"></span>Mode-driven</span><span class="mq-item ghost">Reproducible</span><span class="mq-item accent">Concurrent-writer-safe</span><span class="mq-item ghost">Programmable</span><span class="mq-item"><span class="dot"></span>Sandboxed</span><span class="mq-item ghost">Permissioned</span>
</div>
</div>
<div class="marquee-band" aria-hidden="true">
<div class="marquee reverse" style="--dur:44s;--gap:28px">
<span class="mq-small">Ollama</span><span class="mq-small">LM Studio</span><span class="mq-small">vLLM</span><span class="mq-small">llama.cpp</span><span class="mq-small">Anthropic</span><span class="mq-small">OpenAI-compat</span><span class="mq-small">LocalAI</span><span class="mq-small">Together AI</span><span class="mq-small">Groq</span><span class="mq-small">Azure OpenAI</span><span class="mq-small">Llama 3.x / 4.x</span><span class="mq-small">Qwen 2.5 / 3</span><span class="mq-small">DeepSeek V3 / R1 / Coder</span><span class="mq-small">Gemma 2 / 3</span><span class="mq-small">Phi 3 / 4</span><span class="mq-small">Mistral · Mixtral · Nemo</span><span class="mq-small">Command-R+</span><span class="mq-small">Granite · Granite-Code</span><span class="mq-small">Codestral · CodeLlama · StarCoder</span>
<span class="mq-small">Ollama</span><span class="mq-small">LM Studio</span><span class="mq-small">vLLM</span><span class="mq-small">llama.cpp</span><span class="mq-small">Anthropic</span><span class="mq-small">OpenAI-compat</span><span class="mq-small">LocalAI</span><span class="mq-small">Together AI</span><span class="mq-small">Groq</span><span class="mq-small">Azure OpenAI</span><span class="mq-small">Llama 3.x / 4.x</span><span class="mq-small">Qwen 2.5 / 3</span><span class="mq-small">DeepSeek V3 / R1 / Coder</span><span class="mq-small">Gemma 2 / 3</span><span class="mq-small">Phi 3 / 4</span><span class="mq-small">Mistral · Mixtral · Nemo</span><span class="mq-small">Command-R+</span><span class="mq-small">Granite · Granite-Code</span><span class="mq-small">Codestral · CodeLlama · StarCoder</span>
</div>
</div>
<!-- ============================================================
TOC
============================================================ -->
<section style="padding-top:clamp(48px,6vw,80px);padding-bottom:0">
<div class="container narrow">
<div class="section-head">
<span class="tag">Wiki contents</span>
<h2>Jump anywhere</h2>
</div>
<div class="toc">
<a href="#overview"><span class="n">01</span>Overview</a>
<a href="#features"><span class="n">02</span>Features</a>
<a href="#demos"><span class="n">▶</span>Live demos</a>
<a href="#vscode"><span class="n">▶</span>VS Code extension</a>
<a href="#loop"><span class="n">03</span>Agentic loop</a>
<a href="#state"><span class="n">04</span>State machine</a>
<a href="#executor"><span class="n">05</span>Executor & validation</a>
<a href="#memory"><span class="n">06</span>Memory layers</a>
<a href="#providers"><span class="n">07</span>Providers & routing</a>
<a href="#security"><span class="n">08</span>Safety & sandbox</a>
<a href="#modes"><span class="n">09</span>Modes</a>
<a href="#cli"><span class="n">10</span>CLI reference</a>
<a href="#fs"><span class="n">11</span>Filesystem</a>
<a href="#skills"><span class="n">12</span>Skills & MCP</a>
<a href="#requirements"><span class="n">13</span>System requirements</a>
<a href="#install"><span class="n">14</span>Install</a>
<a href="#container"><span class="n">15</span>Containers</a>
<a href="#cicd"><span class="n">16</span>CI/CD</a>
<a href="#numbers"><span class="n">17</span>Runtime metrics</a>
<a href="#agents"><span class="n">18</span>Agent files</a>
</div>
</div>
</section>
<!-- ============================================================
01 · OVERVIEW
============================================================ -->
<section id="overview" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">01 · Overview</span>
<h2>What <em>is</em> Forge?</h2>
<p>A TypeScript CLI runtime for local-first agentic software engineering. Every piece below lives in <code>src/</code>. Node 20+. Ships via npm and a multi-arch Docker image.</p>
</div>
<div class="grid grid-2">
<div class="card"><div class="num">/ ORCHESTRATION</div><h3>Agentic loop</h3><p>Classify → plan → approve → execute with iterative tool-use → validate → review → complete → learn. Failures escalate to <code>diagnose</code> — never a silent loop.</p></div>
<div class="card"><div class="num">/ STATE</div><h3>Inspectable everything</h3><p>Tasks JSON, sessions JSONL, events JSONL. Conversations are JSONL with <code>O_APPEND</code> concurrency. Prompt hashes are deterministic.</p></div>
<div class="card"><div class="num">/ SAFETY</div><h3>Default-deny permissions</h3><p>Every tool call classified by risk × side-effect × sensitivity. Paths realpath-confined. Shell risk-rated; <code>critical</code> hard-blocked. Credentials in OS keychain.</p></div>
<div class="card"><div class="num">/ MODELS</div><h3>Bring your own LLM</h3><p>Auto-detects Ollama, LM Studio, vLLM, llama.cpp on default ports. 41 model families classified for role routing; auto-substitutes when your configured model isn't installed.</p></div>
</div>
</div>
</section>
<!-- ============================================================
02 · FEATURES
============================================================ -->
<section id="features">
<div class="container">
<div class="section-head">
<span class="tag">02 · Features</span>
<h2>Every capability, <em>highlighted</em>.</h2>
<p>Every feature below is in <code>src/</code>. Grep from any claim to a file.</p>
</div>
<div class="grid grid-2" style="margin-bottom: 32px;">
<div class="code-win" style="margin: 0; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">Forge REPL Interface</span></div>
<img src="images/repl.png" alt="Forge REPL Interface" style="display: block; width: 100%; flex: 1; object-fit: cover; object-position: top;">
</div>
<div class="code-win" style="margin: 0; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">Forge CLI</span></div>
<img src="images/cli.png" alt="Forge CLI" style="display: block; width: 100%; flex: 1; object-fit: cover; object-position: top;">
</div>
</div>
<div class="code-win" style="margin: 0 0 32px; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">Forge Web Dashboard</span></div>
<img src="images/ui.png" alt="Forge Web Dashboard" style="display: block; width: 100%; height: auto; object-fit: cover; object-position: left top;">
</div>
<div class="grid grid-3">
<div class="card"><div class="num">/ 01</div><h3>Local-first</h3><p>Auto-detects Ollama, LM Studio, vLLM, llama.cpp. Hosted Anthropic / OpenAI / Azure / Groq / LocalAI / Together / Fireworks are opt-in.</p><div class="tags"><span>ollama</span><span>lmstudio</span><span>vllm</span><span>llama.cpp</span></div></div>
<div class="card"><div class="num">/ 02</div><h3>Iterative executor</h3><p>Model sees every tool result (stdout / stderr / exit) and adapts within a step. Mode-capped turn budgets.</p><div class="tags"><span>adaptive</span><span>bounded</span></div></div>
<div class="card"><div class="num">/ 03</div><h3>Validation gate</h3><p>Post-step <code>typecheck</code> / <code>lint</code> failures re-enter the loop as tool results — fixed before the next step runs.</p><div class="tags"><span>tsc</span><span>eslint</span></div></div>
<div class="card"><div class="num">/ 04</div><h3>DAG planner</h3><p>Plans have step dependencies, risk annotations, explicit tool calls. Auto-fixer repairs common issues; cycles rejected.</p><div class="tags"><span>topo-sort</span></div></div>
<div class="card"><div class="num">/ 05</div><h3>Reviewer + debugger</h3><p>Reviewer gates completion. On terminal failure, debugger agent diagnoses root cause before marking <code>failed</code>.</p><div class="tags"><span>diagnose</span></div></div>
<div class="card"><div class="num">/ 06</div><h3>4-tier memory</h3><p>Hot (session) · warm (SQLite recent) · cold (lazy project index) · learning (patterns with decaying confidence).</p><div class="tags"><span>SQLite</span><span>FTS5</span></div></div>
<div class="card"><div class="num">/ 07</div><h3>Default-deny permissions</h3><p>Risk × side-effect × sensitivity classified at every call. <code>--skip-permissions</code> only waives routine prompts.</p><div class="tags"><span>trust-calibrated</span></div></div>
<div class="card"><div class="num">/ 08</div><h3>Realpath sandbox</h3><p>Every path resolved to realpath, confined to project root. Always-forbidden targets (SSH keys, AWS creds) hard-blocked.</p><div class="tags"><span>symlink-proof</span></div></div>
<div class="card"><div class="num">/ 09</div><h3>Shell risk classifier</h3><p>Commands rated before execution. <code>rm -rf /</code>, <code>sudo</code>, fork bombs, curl-to-shell hard-blocked.</p><div class="tags"><span>sandbox</span></div></div>
<div class="card"><div class="num">/ 10</div><h3>OS keychain</h3><p>macOS Security, libsecret, Windows DPAPI. AES-GCM encrypted fallback if unavailable.</p><div class="tags"><span>DPAPI</span><span>libsecret</span></div></div>
<div class="card"><div class="num">/ 11</div><h3>Concurrent-writer safe</h3><p>REPL + UI + subagents edit the same conversation via POSIX <code>O_APPEND</code> + <code>mkdir</code> lockfile fallback.</p><div class="tags"><span>POSIX</span></div></div>
<div class="card"><div class="num">/ 12</div><h3>Prompt-injection defence</h3><p>Untrusted content (web / MCP) fenced as data, never instructions. Redactor scrubs secrets before logs.</p><div class="tags"><span>fence</span><span>redact</span></div></div>
<div class="card"><div class="num">/ 13</div><h3>MCP bridge</h3><p>Model Context Protocol: stdio + HTTP-stream. OAuth 2.0 + PKCE or API-key auth. Tokens in keychain.</p><div class="tags"><span>MCP</span><span>OAuth2</span></div></div>
<div class="card"><div class="num">/ 14</div><h3>Skills & instructions</h3><p>Markdown + YAML frontmatter in <code>~/.forge/skills/</code>. Per-project overrides.</p><div class="tags"><span>.md skills</span></div></div>
<div class="card"><div class="num">/ 15</div><h3>Live dashboard</h3><p>HTTP + WebSocket UI. Vanilla JS, < 100 KB, zero CDN. Delta watchers ref-counted across tabs.</p><div class="tags"><span>vanilla JS</span></div></div>
<div class="card"><div class="num">/ 16</div><h3>Router reliability</h3><p>Per-provider rate limit, circuit breaker, prompt cache, USD cost ledger. 1.5 s provider probes.</p><div class="tags"><span>breaker</span></div></div>
<div class="card"><div class="num">/ 17</div><h3>Release signing</h3><p>Manifest signed with Ed25519. SHA-256 per artefact. npm publishes with provenance.</p><div class="tags"><span>Ed25519</span><span>provenance</span></div></div>
<div class="card"><div class="num">/ 18</div><h3>Multi-arch containers</h3><p>Single Dockerfile serves CLI + UI. Non-root, HEALTHCHECK, OCI labels, ~355 MB.</p><div class="tags"><span>amd64</span><span>arm64</span></div></div>
</div>
</div>
</section>
<!-- ============================================================
LIVE DEMOS
============================================================ -->
<section id="demos">
<div class="container">
<div class="section-head">
<span class="tag">Live demos</span>
<h2>See it <em>running</em>.</h2>
<p>Screen captures of each Forge surface — the interactive REPL, the one-shot CLI, and the web dashboard — all driving the same runtime. The VS Code extension has its own showcase <a href="#vscode">below</a>.</p>
</div>
<div class="grid grid-3" style="margin-bottom: 32px;">
<div class="card">
<div class="num">▶ REPL</div>
<h3>Interactive session</h3>
<p>Multi-turn prompts with slash-command autocomplete, status line, digit shortcuts for prompts, streamed markdown rendering, and live file-change tracking.</p>
<div class="tags"><span>stream</span><span>slash</span><span>autocomplete</span></div>
</div>
<div class="card">
<div class="num">▶ CLI</div>
<h3>One-shot runs</h3>
<p><code>forge run "…"</code> launches a full classify → plan → approve → execute → verify pipeline in the terminal with a progress rail and completion block.</p>
<div class="tags"><span>--yes</span><span>--plan-only</span><span>ci-friendly</span></div>
</div>
<div class="card">
<div class="num">▶ UI</div>
<h3>Web dashboard</h3>
<p>Live WebSocket stream of plan approval, permission prompts, model deltas, and task results. Historical tasks replay from disk; follow-ups thread the conversation.</p>
<div class="tags"><span>WebSocket</span><span>stream</span><span>history</span></div>
</div>
</div>
<div class="grid grid-2" style="margin-bottom: 32px;">
<div class="card">
<h3>What every demo is actually showing</h3>
<p>The same <code>src/core/orchestrator.ts</code> runtime drives all three surfaces. Any task you run in one surface is a real row in the SQLite index — pickable from another surface, visible in <code>forge sessions</code>, cancellable from the dashboard.</p>
<p>Deltas stream token-by-token from the provider (<code>emitDelta</code> → event bus → WebSocket / REPL progress rail). Markdown reflows in place so headings, fences, and lists form up live instead of dumping at the end.</p>
</div>
<div class="card">
<h3>Run these for yourself</h3>
<p class="small" style="margin:0 0 6px;opacity:.8">REPL</p>
<pre style="margin:0 0 12px"><code>forge</code></pre>
<p class="small" style="margin:0 0 6px;opacity:.8">One-shot</p>
<pre style="margin:0 0 12px"><code>forge run "summarize src/core/loop.ts"</code></pre>
<p class="small" style="margin:0 0 6px;opacity:.8">Dashboard</p>
<pre style="margin:0"><code>forge ui start # http://127.0.0.1:7823</code></pre>
</div>
</div>
<div class="code-win" style="margin: 0 0 32px; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">REPL demo · forge</span></div>
<div class="video-wrap" style="position:relative">
<video src="https://github.com/user-attachments/assets/eb592bbf-62a1-4d74-a540-7e066ebe56a4
" poster="images/repl.png" controls muted playsinline preload="metadata"
style="display:block;width:100%;max-height:70vh;height:auto;object-fit:contain;background:#000"></video>
<a class="video-overlay-btn" href="https://drive.google.com/drive/folders/1YJLQblgGl_2fNZ0-8-lX9TvQsGGZ12sn?usp=sharing" target="_blank" rel="noopener noreferrer" title="Open all demos on Google Drive">Drive</a>
</div>
</div>
<div class="code-win" style="margin: 0 0 32px; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">CLI demo · forge run</span></div>
<div class="video-wrap" style="position:relative">
<video src="https://github.com/user-attachments/assets/bc3b3204-fd87-436f-9467-604535edb4e2
" poster="images/cli.png" controls muted playsinline preload="metadata"
style="display:block;width:100%;max-height:70vh;height:auto;object-fit:contain;background:#000"></video>
<a class="video-overlay-btn" href="https://drive.google.com/drive/folders/1YJLQblgGl_2fNZ0-8-lX9TvQsGGZ12sn?usp=sharing" target="_blank" rel="noopener noreferrer" title="Open all demos on Google Drive">Drive</a>
</div>
</div>
<div class="code-win" style="margin: 0; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">Web dashboard demo · forge ui start</span></div>
<div class="video-wrap" style="position:relative">
<video src="https://github.com/user-attachments/assets/218cd64f-40fe-4836-9c62-c7a08538056b
" poster="images/ui.png" controls muted playsinline preload="metadata"
style="display:block;width:100%;height:auto;background:#000"></video>
<a class="video-overlay-btn" href="https://drive.google.com/drive/folders/1YJLQblgGl_2fNZ0-8-lX9TvQsGGZ12sn?usp=sharing" target="_blank" rel="noopener noreferrer" title="Open all demos on Google Drive">Drive</a>
</div>
</div>
</div>
</section>
<!-- ============================================================
▶ VS CODE EXTENSION
============================================================ -->
<section id="vscode">
<div class="container">
<div class="section-head">
<span class="tag">▶ VS Code</span>
<h2>The full workflow, <em>in your editor.</em></h2>
<p>A first-class Forge surface that lives next to your code. Same runtime, same persisted state, same agents — surfaced through an activity-bar sidebar, integrated terminals, and an embedded dashboard webview.</p>
</div>
<div class="code-win" style="margin: 0 0 32px; display: flex; flex-direction: column;">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">forge-agentic-coding-cli · activity-bar sidebar</span></div>
<div class="video-wrap" style="position:relative">
<img src="vscode-extension/vscode.png" alt="Forge for VS Code — activity-bar sidebar with stats, recent tasks, and quick actions"
style="display:block;width:100%;height:auto;background:#000;object-fit:contain">
<a class="video-overlay-btn" href="https://marketplace.visualstudio.com/items?itemName=hoangsonw.forge-agentic-coding-cli" target="_blank" rel="noopener noreferrer" title="Open on the VS Code Marketplace">Marketplace</a>
</div>
</div>
<div class="grid grid-2">
<div class="card">
<h3>What the extension brings to your editor</h3>
<p>The activity-bar webview reads straight from <code>~/.forge/global/index.db</code> via the system <code>sqlite3</code>, so lifetime stats (tokens, calls, task counts) stay accurate even with no Forge process running. When the dashboard server <em>is</em> up, the sidebar layers in live provider state on top.</p>
<p>Click any task in the recent list and the embedded webview opens directly to its conversation view — not the dashboard home. Cross-project lookups work because the runtime's <code>/api/tasks/:id</code> endpoint resolves the project automatically from the index.</p>
<div class="tags"><span>sidebar</span><span>deep-link</span><span>offline-stats</span><span>cross-project</span></div>
</div>
<div class="card">
<h3>Install the extension</h3>
<p class="small" style="margin:0 0 6px;opacity:.8">From the command line</p>
<pre style="margin:0 0 12px"><code>code --install-extension hoangsonw.forge-agentic-coding-cli</code></pre>
<p class="small" style="margin:0 0 6px;opacity:.8">From the Marketplace</p>
<pre style="margin:0 0 12px"><code>https://marketplace.visualstudio.com/items?itemName=hoangsonw.forge-agentic-coding-cli</code></pre>
<p class="small" style="margin:0 0 6px;opacity:.8">Prereq</p>
<pre style="margin:0"><code>npm install -g @hoangsonw/forge # the runtime</code></pre>
</div>
</div>
<div class="grid grid-3" style="margin-top: 24px;">
<div class="card">
<div class="num">⌘ ⇧ P</div>
<h3>Run anything as a task</h3>
<p>Highlight a TODO comment, right-click → <em>Run Selection as Task</em>. Or use the whole buffer with <em>Use Active File as Task</em>. Each run opens its own integrated terminal and streams in real time.</p>
<div class="tags"><span>selection</span><span>file</span><span>palette</span></div>
</div>
<div class="card">
<div class="num">◫</div>
<h3>Dashboard, embedded</h3>
<p>One click launches <code>forge ui start</code> in the background, polls until reachable, and embeds the dashboard in a webview right next to your code. Reload + open-in-browser shortcuts at the top.</p>
<div class="tags"><span>webview</span><span>auto-start</span><span>iframe</span></div>
</div>
<div class="card">
<div class="num">◉</div>
<h3>Status-bar pill + workspace meta</h3>
<p>Single rocket pill flips between <em>live</em> and <em>idle</em>. The sidebar's workspace card shows <code>cwd</code>, <code>url</code>, provider and mode with one-click copy. <em>Change Working Directory</em> retargets per workspace.</p>
<div class="tags"><span>status-bar</span><span>cwd-picker</span><span>copy</span></div>
</div>
</div>
</div>
</section>
<!-- ============================================================
03 · AGENTIC LOOP
============================================================ -->
<section id="loop" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">03 · Agentic loop</span>
<h2>Classify · plan · approve · <em>execute</em> · validate · review · complete.</h2>
<p>Source: <code>src/core/loop.ts</code>. Retry cap is 3. The debugger agent runs root-cause diagnosis before marking a task <code>failed</code>.</p>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
look: handDrawn
theme: base
themeVariables:
fontSize: 16px
---
flowchart LR
IN(("USER<br/>prompt")) --> CLS["CLASSIFY<br/><small>intent · risk · scope</small>"]
CLS --> PL["PLAN<br/><small>DAG · steps · deps</small>"]
PL --> AP{"Approve?"}
AP -- edit --> PL
AP -- no --> CNCL(["cancelled"])
AP -- yes --> EX["EXECUTE<br/><small>iterative tool-use</small>"]
EX --> VG{"Validate<br/>(tsc · lint)"}
VG -- fails + budget --> EX
VG -- fails + out --> DX["DIAGNOSE"]
DX --> FL(["failed"])
VG -- pass --> RV["REVIEW<br/><small>reviewer agent</small>"]
RV -- bounce --> EX
RV -- pass --> DONE(["completed"])
DONE --> LRN["LEARN<br/><small>patterns updated</small>"]
classDef term fill:#0a1a14,stroke:#10b981,color:#d1fae5,stroke-width:2px
classDef fail fill:#1a0909,stroke:#f87171,color:#fee2e2,stroke-width:2px
classDef step fill:#0f1726,stroke:#38bdf8,color:#e0f2fe,stroke-width:1.8px
classDef gate fill:#1a1634,stroke:#a78bfa,color:#ede9fe,stroke-width:1.8px
classDef io fill:#0c1a24,stroke:#22d3ee,color:#cffafe,stroke-width:2px
class IN io
class CNCL,FL fail
class DONE term
class CLS,PL,EX,RV,DX,LRN step
class AP,VG gate
</pre>
</div>
</div>
</section>
<!-- ============================================================
04 · STATE MACHINE
============================================================ -->
<section id="state">
<div class="container">
<div class="section-head">
<span class="tag">04 · State machine</span>
<h2>10 task statuses. <em>Every move gated.</em></h2>
<p>Enforced by <code>LEGAL_TRANSITIONS</code> in <code>src/persistence/tasks.ts</code>. Illegal moves throw <code>state_invalid</code>. Terminal states only re-enter via <code>forge resume</code>, which resets them to <code>draft</code>.</p>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 16px
---
stateDiagram-v2
direction LR
[*] --> draft
draft --> planned : planner output
draft --> cancelled : user
planned --> approved : user approves
planned --> blocked : missing deps
planned --> cancelled
approved --> scheduled
approved --> cancelled
scheduled --> running
scheduled --> blocked
scheduled --> cancelled
running --> verifying
running --> failed
running --> blocked
running --> cancelled
verifying --> completed
verifying --> failed
verifying --> running : reviewer bounces
completed --> draft : forge resume
failed --> draft : forge resume
blocked --> draft : forge resume
cancelled --> draft : forge resume
blocked --> cancelled
completed --> [*]
failed --> [*]
cancelled --> [*]
</pre>
</div>
</div>
</section>
<!-- ============================================================
05 · EXECUTOR
============================================================ -->
<section id="executor" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">05 · Executor</span>
<h2>Iterative tool use, <em>inside</em> each step.</h2>
<p>Model sees every tool result — stdout, stderr, exit, error — and can adapt. Source: <code>src/agents/executor.ts</code>.</p>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 15px
actorFontSize: 14px
messageFontSize: 13px
---
sequenceDiagram
autonumber
participant L as loop.ts
participant E as executor
participant M as model
participant T as tool
participant V as validator
L->>E: runStep(step)
loop up to maxExecutorTurns
E->>M: prompt + JSON schema
M-->>E: {actions, done?}
alt done
E-->>L: completed
else actions
E->>T: execute
T-->>E: stdout / stderr / exit
E->>E: digest + append
end
end
opt files changed
loop up to maxValidationRetries
E->>V: typecheck / lint
alt pass
E-->>L: completed
else fail
E->>M: VALIDATION_FAILED
M-->>E: corrective actions
E->>T: execute
end
end
end
</pre>
</div>
</div>
</section>
<!-- ============================================================
06 · MEMORY
============================================================ -->
<section id="memory">
<div class="container">
<div class="section-head">
<span class="tag">06 · Memory</span>
<h2>Four tiers. <em>Decays over time.</em></h2>
<p>Planner reads top-K learning patterns before every plan.</p>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 15px
---
flowchart TB
Q["query<br/>retrieve.ts"] --> H["🔥 HOT<br/>in-session facts<br/><small>cleared on task end</small>"]
Q --> W["☀️ WARM<br/>recent tasks · SQLite<br/><small>ages out</small>"]
Q --> C["❄️ COLD<br/>project files · grep · AST<br/><small>lazy-indexed</small>"]
Q --> L["🧠 LEARNING<br/>patterns + confidence<br/><small>decays if unused</small>"]
classDef t fill:#0f1726,stroke:#38bdf8,color:#e0f2fe,stroke-width:2px
classDef src fill:#0c1a24,stroke:#22d3ee,color:#cffafe,stroke-width:2px
class Q src
class H,W,C,L t
</pre>
</div>
</div>
</section>
<!-- ============================================================
07 · PROVIDERS
============================================================ -->
<section id="providers" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">07 · Providers & routing</span>
<h2>Bring your own LLM. <em>Forge auto-adapts.</em></h2>
<p>6 providers, auto-detected on default ports. 41 model families classified for role routing.</p>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 15px
---
flowchart LR
R["router<br/>resolveModel"] --> AD["adapter<br/>resolveLocalModel"]
AD --> L1["🟢 ollama<br/>:11434"]
AD --> L2["🔵 lmstudio<br/>:1234"]
AD --> L3["🟠 vllm<br/>:8000"]
AD --> L4["🟡 llama.cpp<br/>:8080"]
R --> H1["⬛ anthropic"]
R --> H2["⬛ openai-compat"]
R --> RL["rate limit"]
R --> CB["circuit breaker"]
R --> PC["prompt cache"]
R --> CT["USD ledger"]
classDef route fill:#0f1726,stroke:#38bdf8,color:#e0f2fe,stroke-width:2px
classDef local fill:#0a1a14,stroke:#10b981,color:#d1fae5,stroke-width:2px
classDef hosted fill:#1a1634,stroke:#a78bfa,color:#ede9fe,stroke-width:2px
classDef util fill:#16121a,stroke:#f472b6,color:#fce7f3,stroke-width:1.8px
class R,AD route
class L1,L2,L3,L4 local
class H1,H2 hosted
class RL,CB,PC,CT util
</pre>
</div>
<h3 class="subhead">Model families → preferred roles</h3>
<div class="table-wrap">
<table class="mx">
<thead><tr><th>Role</th><th>Preferred families</th></tr></thead>
<tbody>
<tr><td>architect · reviewer · debugger</td><td>Llama 3.x / 4.x, Mixtral, Command-R+, DeepSeek V3 / R1, Mistral-Large</td></tr>
<tr><td>planner</td><td>Qwen 2.5 / 3, Llama 3.x, DeepSeek V3, Gemma 3, Mistral-Nemo, Command-R, Phi 4</td></tr>
<tr><td>executor (code)</td><td>DeepSeek-Coder, Qwen 2.5-Coder, CodeLlama, Codestral, StarCoder, Granite-Code</td></tr>
<tr><td>fast</td><td>Phi 3 / 4, Gemma 2, TinyLlama, SmolLM, MiniCPM</td></tr>
</tbody>
</table>
</div>
<h3 class="subhead" style="margin-top:28px">Model size & capability tiers</h3>
<p style="max-width:780px;opacity:0.85">
The agentic loop is multi-turn tool use with strict JSON output. Small
local models can drive it, but not every kind of work is realistic at
every size. Pick by the work you intend to do, and set a hosted
fallback for when you hit the ceiling — the router degrades gracefully
via its circuit breaker.
</p>
<div class="table-wrap">
<table class="mx">
<thead>
<tr><th>Work</th><th>Local floor we trust</th><th>Example pulls</th></tr>
</thead>
<tbody>
<tr><td>Chat / concept Q&A</td><td>3B instruct</td><td><code>phi3:mini</code> · <code>gemma3:2b</code> · <code>qwen2.5:3b</code></td></tr>
<tr><td>Summarize / explain code</td><td>7B instruct</td><td><code>qwen2.5:7b</code> · <code>llama3.1:8b</code></td></tr>
<tr><td>Single-file edits / small features</td><td><strong>7B+ code specialist</strong></td><td><code>deepseek-coder:6.7b</code> · <code>qwen2.5-coder:7b</code></td></tr>
<tr><td>Multi-file refactors / new features</td><td>14B+ code specialist</td><td><code>qwen2.5-coder:14b</code> · <code>deepseek-coder:33b</code></td></tr>
<tr><td>Architecture-level changes</td><td>hosted only, realistically</td><td>Claude Opus/Sonnet · GPT-4-class</td></tr>
</tbody>
</table>
</div>
<h3 class="subhead" style="margin-top:28px">Observed small-model failure modes & runtime guards</h3>
<p style="max-width:780px;opacity:0.85">
Below the tier floor, models fail in recognisable ways. Forge catches
each so a small model fails <em>loudly</em> instead of corrupting
state.
</p>
<div class="table-wrap">
<table class="mx">
<thead><tr><th>Failure mode</th><th>Runtime guard</th></tr></thead>
<tbody>
<tr><td>Picks <code>run_command</code> to write file contents</td><td>Executor prompt spells out <code>step.type → tool</code> mapping and forbids <code>run_command</code> for file writes.</td></tr>
<tr><td>Escalates to <code>ask_user</code> on any tool error, stalling the step</td><td><code>ask_user</code> rejects empty / too-short questions as non-retryable; model has to switch tools.</td></tr>
<tr><td>Splits "create empty file → edit to fill"</td><td><code>edit_file</code> with <code>oldText=""</code> on an empty/missing file writes the full body.</td></tr>
<tr><td><code>write_file</code> <code>ENOENT</code> because parent dir doesn't exist</td><td><code>createDirs</code> defaults to <code>true</code> (mkdir-p).</td></tr>
<tr><td>Cold-load timeout interpreted as model failure</td><td>Headers-timeout floor 300 s; proactive <code>warm()</code> with <code>/api/ps</code> preflight.</td></tr>
<tr><td>Reviewer rejects analysis tasks for "no file changes"</td><td>Classifier sets <code>requiresReview=false</code> for <code>intent=analysis</code>; narrator pass writes the real answer.</td></tr>
<tr><td>Two concurrent edits race on the same file</td><td>Per-process path-mutex + atomic temp+rename.</td></tr>
</tbody>
</table>
</div>
</div>
</section>
<!-- ============================================================
08 · SECURITY
============================================================ -->
<section id="security">
<div class="container">
<div class="section-head">
<span class="tag">08 · Safety model</span>
<h2>Default-deny. <em>Every tool call gated.</em></h2>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 15px
---
flowchart TB
REQ["tool call"] --> C["classify<br/>risk · sideEffect · sensitivity"]
C --> S{"path in sandbox?<br/>cmd allow-listed?"}
S -->|"no"| X["⛔ HARD-BLOCK<br/>sandbox_violation"]
S -->|"yes"| G{"risk × sideEffect"}
G -->|"low / read"| A["✅ auto-allow"]
G -->|"med / write"| K["❓ ask user"]
G -->|"high / exec"| ST["🔒 ask · strict"]
K --> F{"session flags?"}
F -->|"allow-* flag"| A
F -->|"non-interactive"| D["⛔ deny silently"]
F -->|"interactive"| P["user prompt"]
P -->|"allow"| A
P -->|"deny"| D
A --> E["execute"]
E --> TR["trust calibration<br/>auto-allow after N confirms"]
classDef ok fill:#0a1a14,stroke:#10b981,color:#d1fae5,stroke-width:2px
classDef bad fill:#1a0909,stroke:#f87171,color:#fee2e2,stroke-width:2px
classDef gate fill:#1a1634,stroke:#a78bfa,color:#ede9fe,stroke-width:2px
classDef step fill:#0f1726,stroke:#38bdf8,color:#e0f2fe,stroke-width:1.8px
class A,E,TR ok
class X,D bad
class S,G,F gate
class REQ,C,K,ST,P step
</pre>
</div>
</div>
</section>
<!-- ============================================================
09 · MODES
============================================================ -->
<section id="modes" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">09 · Modes</span>
<h2>Nine modes. <em>Enforceable budgets.</em></h2>
<p>Each mode is a runtime cap, not a hint. Read from <code>src/core/mode-policy.ts</code>.</p>
</div>
<div class="table-wrap">
<table class="mx">
<thead><tr><th>Mode</th><th>Executor turns</th><th>Validation retries</th><th>Mutations</th><th>Max auto-risk</th></tr></thead>
<tbody>
<tr><td><code>fast</code></td><td>2</td><td>0</td><td class="y">yes</td><td>low</td></tr>
<tr><td><code>balanced</code></td><td>4</td><td>1</td><td class="y">yes</td><td>medium</td></tr>
<tr><td><code>heavy</code></td><td>8</td><td>2</td><td class="y">yes</td><td>high</td></tr>
<tr><td><code>plan</code></td><td>0 → 1</td><td>0</td><td class="n">no</td><td>low</td></tr>
<tr><td><code>execute</code></td><td>4</td><td>1</td><td class="y">yes</td><td>medium</td></tr>
<tr><td><code>audit</code></td><td>3</td><td>0</td><td class="n">no</td><td>low</td></tr>
<tr><td><code>debug</code></td><td>6</td><td>2</td><td class="y">yes</td><td>medium</td></tr>
<tr><td><code>architect</code></td><td>3</td><td>1</td><td class="y">yes</td><td>medium</td></tr>
<tr><td><code>offline-safe</code></td><td>3</td><td>1</td><td class="y">yes</td><td>medium</td></tr>
</tbody>
</table>
</div>
</div>
</section>
<!-- ============================================================
10 · CLI
============================================================ -->
<section id="cli">
<div class="container">
<div class="section-head">
<span class="tag">10 · CLI reference</span>
<h2>24 subcommands. <em>55 slash commands in the REPL.</em></h2>
</div>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">~ — forge --help</span><span class="lang">bash</span></div>
<pre><span class="com"># Core</span>
forge <span class="com"># REPL (default)</span>
forge init <span class="com"># create ~/.forge + ./.forge</span>
forge run <span class="str">"<prompt>"</span> <span class="com"># full agentic loop</span>
forge plan <span class="str">"<prompt>"</span> <span class="com"># plan-only</span>
forge execute <span class="str">"<prompt>"</span> <span class="com"># auto-approve + execute</span>
forge resume [taskId] <span class="com"># resume any prior task</span>
forge status <span class="com"># runtime state</span>
forge doctor <span class="com"># health + role→model mapping</span>
<span class="com"># State inspection</span>
forge task list|search <span class="com"># task history</span>
forge session list|replay <span class="com"># session JSONL</span>
forge memory {hot|warm|cold} <span class="com"># memory layers</span>
<span class="com"># Models & config</span>
forge model list
forge config get|set|path
forge cost <span class="com"># USD ledger</span>
<span class="com"># Integrations</span>
forge mcp list|add|remove
forge skills list|new
forge agents list
forge web {search|fetch}
<span class="com"># Ops</span>
forge ui start <span class="com"># dashboard :7823</span>
forge daemon start|stop|status
forge container up|down <span class="com"># compose wrapper</span>
forge bundle pack|unpack <span class="com"># offline bundles</span>
forge update <span class="com"># self-update</span>
</pre>
</div>
</div>
</section>
<!-- ============================================================
11 · FILESYSTEM
============================================================ -->
<section id="fs" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">11 · Filesystem</span>
<h2>XDG-aware. <em>Per-project overrides.</em></h2>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 14px
---
flowchart TB
subgraph GLOBAL["global · ~/.forge"]
G1[config.json]
G2[instructions.md]
G3[skills/]
G4[agents/]
G5[mcp/]
G6[index.db]
G7["projects · tasks · sessions · events"]
end
subgraph PROJECT["per-project · ./.forge"]
P1[config.json]
P2[instructions.md]
P3[skills/]
P4[agents/]
P5[mcp/]
end
</pre>
</div>
</div>
</section>
<!-- ============================================================
12 · SKILLS & MCP
============================================================ -->
<section id="skills">
<div class="container">
<div class="section-head">
<span class="tag">12 · Skills & MCP</span>
<h2>Extend without <em>rebuilding</em>.</h2>
</div>
<h3 class="subhead">Skill example</h3>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">~/.forge/skills/conventional-commit.md</span><span class="lang">md</span></div>
<pre><span class="com">---</span>
<span class="kw">name:</span> <span class="str">conventional-commit</span>
<span class="kw">description:</span> <span class="str">Enforce Conventional Commits.</span>
<span class="kw">triggers:</span> [commit, git]
<span class="com">---</span>
When writing commit messages, use Conventional Commits:
feat(scope): …
fix(scope): …
refactor(scope): …
</pre>
</div>
<h3 class="subhead" style="margin-top:28px">Add MCP connector</h3>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">forge mcp add</span><span class="lang">bash</span></div>
<pre><span class="prompt"></span>forge mcp list
<span class="prompt"></span>forge mcp add <span class="vi">linear</span> --transport stdio --command <span class="str">"mcp-linear-server"</span>
<span class="prompt"></span>forge mcp add <span class="vi">postgres</span> --transport http --url https://mcp.example/v1 --auth oauth2-pkce
<span class="prompt"></span>forge mcp status
</pre>
</div>
</div>
</section>
<!-- ============================================================
13 · SYSTEM REQUIREMENTS
============================================================ -->
<section id="requirements">
<div class="container">
<div class="section-head">
<span class="tag">13 · System requirements</span>
<h2>Node 20+. <em>Or just Docker.</em></h2>
</div>
<p style="max-width:780px;opacity:0.85">
Forge runs on any platform Node 20 runs on, or anywhere Docker runs. There is no host-side Python, Rust, or Go requirement. <code>better-sqlite3</code> is the only native module and ships prebuilts for every supported triple — no toolchain needed on <code>npm install</code>.
</p>
<div class="grid grid-3" style="margin-top:18px">
<div class="card">
<div class="num">/ host</div>
<h3>Host toolchain</h3>
<p>
<strong>Node.js ≥ 20</strong> (22 tested).<br>
<strong>OS:</strong> macOS · Linux · Windows (native or WSL).<br>
<strong>Architectures:</strong> x64 · arm64.<br>
<strong>Docker ≥ 25</strong> (only if you prefer the container path).
</p>
<div class="tags"><span>node 20+</span><span>darwin</span><span>linux</span><span>win32</span><span>arm64</span></div>
</div>
<div class="card">
<div class="num">/ footprint</div>
<h3>Disk & RAM</h3>
<p>
<strong>Disk:</strong> ~150 MB <code>node_modules</code>; state under <code>~/.forge</code> grows with session history (override with <code>FORGE_HOME</code>).<br>
<strong>RAM:</strong> ~100 MB for Forge itself. Your local model uses its own RAM/VRAM on top.<br>
<strong>Cold start:</strong> <code>forge doctor</code> ~170 ms.
</p>
<div class="tags"><span>~150 MB</span><span>~100 MB RAM</span></div>
</div>
<div class="card">
<div class="num">/ model</div>
<h3>Model source (pick ≥ 1)</h3>
<p>
<strong>Local:</strong> Ollama · LM Studio · vLLM · llama.cpp — auto-detected on standard ports.<br>
<strong>Hosted:</strong> <code>ANTHROPIC_API_KEY</code> · <code>OPENAI_API_KEY</code> (+ <code>OPENAI_BASE_URL</code> for any OpenAI-compatible server).<br>
<code>forge doctor</code> probes all of them and tells you which are reachable.
</p>
<div class="tags"><span>local-first</span><span>hosted fallback</span></div>
</div>
</div>
<h3 class="subhead" style="margin-top:32px">Runtime npm dependencies</h3>
<p style="max-width:780px;opacity:0.85">
13 runtime packages, <strong>zero optional dependencies</strong>. Listed below so you can audit them before <code>npm install</code>.
</p>
<div class="code-win" style="margin-top:12px">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">package.json · dependencies</span><span class="lang">13 total</span></div>
<pre>@modelcontextprotocol/sdk <span class="com"># MCP bridge (stdio / http_stream / websocket)</span>
better-sqlite3 <span class="com"># local index DB · FTS5 cold memory · native, prebuilt</span>
chalk <span class="com"># ANSI color</span>
cli-table3 <span class="com"># tables in `forge doctor`, `task list`</span>
commander <span class="com"># CLI argv parsing</span>
dotenv <span class="com"># .env loading</span>
ora <span class="com"># progress spinner</span>
prompts <span class="com"># non-TTY fallback for the numbered-select helper</span>
semver <span class="com"># update-check version comparison</span>
undici <span class="com"># HTTP client · Ollama / Anthropic / OpenAI streams</span>
ws <span class="com"># UI dashboard WebSocket</span>
yaml <span class="com"># skill-file frontmatter</span>
zod <span class="com"># runtime validation of plans & tool args</span>
</pre>
</div>
<h3 class="subhead" style="margin-top:26px">Recommended <small style="opacity:0.7">(not required)</small></h3>
<p style="max-width:780px;opacity:0.85">
<code>ripgrep</code> — fast path for the <code>grep</code> tool; falls back to a Node glob walker.<br>
<code>git</code> — enables <code>git_diff</code> / <code>git_status</code> tools and project-root detection.<br>
<code>$EDITOR</code> — used when you pick "Edit" on a plan approval; falls back to <code>vi</code>.
</p>
</div>
</section>
<!-- ============================================================
14 · INSTALL
============================================================ -->
<section id="install" class="alt">
<div class="container">
<div class="section-head">
<span class="tag">14 · Install</span>
<h2>Four paths. <em>Pick one.</em></h2>
</div>
<div class="grid grid-4">
<div>
<h4>01 / npm</h4>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">global install</span><span class="lang">bash</span></div>
<pre><span class="prompt"></span>npm i -g @hoangsonw/forge
<span class="prompt"></span>forge doctor
<span class="prompt"></span>forge run <span class="str">"…"</span>
</pre>
</div>
<p style="margin-top:12px"><a href="https://www.npmjs.com/package/@hoangsonw/forge">View the published npm package</a></p>
</div>
<div>
<h4>02 / VS Code</h4>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">marketplace</span><span class="lang">bash</span></div>
<pre><span class="prompt"></span>npm i -g @hoangsonw/forge
<span class="prompt"></span>code --install-extension \
hoangsonw.forge-agentic-coding-cli
</pre>
</div>
<p style="margin-top:12px"><a href="https://marketplace.visualstudio.com/items?itemName=hoangsonw.forge-agentic-coding-cli">Open on the VS Code Marketplace</a></p>
</div>
<div>
<h4>03 / Docker</h4>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">zero local Node</span><span class="lang">bash</span></div>
<pre><span class="prompt"></span>docker run --rm -it \
-v forge-home:/data \
-v <span class="str">"$PWD:/workspace"</span> \
ghcr.io/hoangsonw/forge-agentic-coding-cli:latest
</pre>
</div>
</div>
<div>
<h4>04 / Compose</h4>
<div class="code-win">
<div class="titlebar"><div class="traffic"><i></i><i></i><i></i></div><span class="ttl">full stack</span><span class="lang">bash</span></div>
<pre><span class="prompt"></span>docker compose \
-f docker/docker-compose.yml \
up -d
<span class="com"># podman-compose works</span>
</pre>
</div>
</div>
</div>
</div>
</section>
<!-- ============================================================
14 · CONTAINERS
============================================================ -->
<section id="container">
<div class="container">
<div class="section-head">
<span class="tag">15 · Container posture</span>
<h2>Single image. <em>CLI + UI + daemon.</em></h2>
</div>
<div class="mermaid-wrap">
<pre class="mermaid">
---
config:
theme: base
themeVariables:
fontSize: 14px
---
flowchart LR
subgraph BUILD["Stage 1 · builder"]
direction TB