Skip to content

Commit 8e8c5f3

Browse files
committed
updated documentation regadles cli
1 parent 318eebc commit 8e8c5f3

2 files changed

Lines changed: 60 additions & 2 deletions

File tree

core-concepts.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,21 @@ <h2 class="text-2xl font-bold text-gray-900 mb-4">CLI Kernel</h2>
13501350
The kernel provides a powerful CLI system for creating custom commands and automating tasks. Commands can be created in your application or provided by capabilities (modules).
13511351
</p>
13521352

1353+
<h3 class="text-lg font-semibold mb-3 text-gray-900">Interactive Command Browser</h3>
1354+
<p class="text-gray-600 mb-4">
1355+
Forge includes a retro-styled interactive command browser. Simply run <code class="bg-gray-100 px-2 py-1 rounded">php forge.php</code> without arguments to access it. The browser features a splash screen, multi-column command listings, category-based browsing, and allows you to execute commands or view help directly. Use arrow keys (↑↓←→) to navigate and Esc to exit.
1356+
</p>
1357+
<div class="code-block p-6 text-white rounded-lg mb-6">
1358+
<pre><code class="language-bash"># Launch interactive browser
1359+
php forge.php
1360+
1361+
# Skip splash screen
1362+
php forge.php --no-splash
1363+
1364+
# Show traditional command list
1365+
php forge.php --list</code></pre>
1366+
</div>
1367+
13531368
<h3 class="text-lg font-semibold mb-3 text-gray-900">Creating Custom Commands</h3>
13541369
<p class="text-gray-600 mb-4">
13551370
Commands use the <code class="bg-gray-100 px-2 py-1 rounded">#[Cli]</code> attribute to define the command name, description, usage, and examples. Arguments are defined using the <code class="bg-gray-100 px-2 py-1 rounded">#[Arg]</code> attribute on class properties.

getting-started.html

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,46 @@ <h2 class="text-2xl font-bold text-gray-900 mb-4">CLI Commands</h2>
685685
Most commands use interactive wizards by default. You can skip wizards by providing options with <code class="bg-gray-100 px-2 py-1 rounded">--option=value</code> flags.
686686
</p>
687687

688+
<h3 class="text-lg font-semibold mb-3 text-gray-900">Interactive Command Browser</h3>
689+
<p class="text-gray-600 mb-4">
690+
Forge includes a retro-styled interactive command browser that makes it easy to discover and execute commands. Simply run <code class="bg-gray-100 px-2 py-1 rounded">php forge.php</code> without any arguments to access it.
691+
</p>
692+
<div class="bg-blue-50 border-l-4 border-blue-500 p-4 mb-6">
693+
<div class="flex">
694+
<div class="flex-shrink-0">
695+
<i class="fas fa-info-circle text-blue-500"></i>
696+
</div>
697+
<div class="ml-3">
698+
<p class="text-sm text-blue-700">
699+
<strong>Features:</strong> The interactive browser includes a splash screen (skippable with <code class="bg-blue-100 px-1 py-0.5 rounded text-xs">--no-splash</code>), multi-column command listings that adapt to your terminal width, category-based browsing, and the ability to execute commands or view help directly from the interface. Use arrow keys to navigate and Esc to exit.
700+
</p>
701+
</div>
702+
</div>
703+
</div>
704+
<div class="code-block p-6 text-white rounded-lg mb-6">
705+
<pre><code class="language-bash"># Launch interactive command browser
706+
php forge.php
707+
708+
# Skip splash screen
709+
php forge.php --no-splash
710+
711+
# Show traditional command list
712+
php forge.php --list
713+
714+
# Launch interactive browser directly
715+
php forge.php --interactive</code></pre>
716+
</div>
717+
<p class="text-gray-600 mb-4">
718+
The interactive browser allows you to:
719+
</p>
720+
<ul class="list-disc list-inside text-gray-600 mb-6 space-y-2">
721+
<li>Browse commands by category (General, Database, Modules, etc.)</li>
722+
<li>View all commands in a searchable multi-column layout</li>
723+
<li>Execute commands directly from the browser</li>
724+
<li>View detailed help for any command</li>
725+
<li>Navigate with arrow keys (↑↓←→) and exit with Esc</li>
726+
</ul>
727+
688728
<h3 class="text-lg font-semibold mb-3 text-gray-900">Generate Commands</h3>
689729
<div class="code-block p-6 text-white rounded-lg mb-6">
690730
<pre><code class="language-bash"># Generate files (wizards ask for type: app/module, name, etc.)
@@ -750,8 +790,11 @@ <h3 class="text-lg font-semibold mb-3 text-gray-900">Other Commands</h3>
750790
<pre><code class="language-bash"># Generate application key
751791
php forge.php key:generate
752792

753-
# See all available commands
754-
php forge.php help</code></pre>
793+
# See all available commands (traditional list)
794+
php forge.php help
795+
796+
# Launch interactive command browser
797+
php forge.php</code></pre>
755798
</div>
756799
</section>
757800

0 commit comments

Comments
 (0)