Add piped input support and documentation for cf picker
- Support piped input: cat file.txt | cf | cf - Write picker UI to stderr when stdout is piped - Use /dev/tty for keyboard input independent of stdin - Add select() for non-blocking escape sequence detection - Document cf in CLI reference and Getting Started Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
@@ -35,7 +35,10 @@ cmdforge create # CLI wizard
|
||||
cmdforge registry install official/summarize
|
||||
|
||||
# Use it!
|
||||
cat article.txt | summarize</code></pre>
|
||||
cat article.txt | summarize
|
||||
|
||||
# Or use the interactive picker to browse and run tools
|
||||
cf</code></pre>
|
||||
|
||||
<div class="bg-cyan-50 border-l-4 border-cyan-500 p-4 my-4">
|
||||
<p class="font-semibold text-cyan-800">Two Ways to Build</p>
|
||||
@@ -3949,6 +3952,36 @@ cat file.txt | summarize --provider mock</code></pre>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2 id="interactive-picker">Interactive Tool Picker (cf)</h2>
|
||||
|
||||
<p>The <code>cf</code> command provides a fast, fuzzy-search picker for running tools interactively.
|
||||
Instead of remembering exact tool names, just type a few characters to filter and select.</p>
|
||||
|
||||
<pre><code class="language-bash"># Launch the picker
|
||||
cf
|
||||
|
||||
# Pipe input through the picker
|
||||
cat document.txt | cf
|
||||
|
||||
# Chain pickers for interactive pipelines
|
||||
cf | cf | cf</code></pre>
|
||||
|
||||
<p><strong>Controls:</strong></p>
|
||||
<ul>
|
||||
<li><strong>Type</strong> - Fuzzy filter tools by name or description</li>
|
||||
<li><strong>↑/↓</strong> - Navigate the list</li>
|
||||
<li><strong>Enter</strong> - Run the selected tool</li>
|
||||
<li><strong>Tab</strong> - Configure arguments before running (if tool has arguments)</li>
|
||||
<li><strong>Esc</strong> - Cancel</li>
|
||||
</ul>
|
||||
|
||||
<div class="bg-cyan-50 border-l-4 border-cyan-500 p-4 my-4">
|
||||
<p class="font-semibold text-cyan-800">Interactive Pipelines</p>
|
||||
<p class="text-cyan-700">Chain <code>cf</code> commands to build pipelines on the fly:
|
||||
<code>cat data.txt | cf | cf</code> lets you pick a tool, then pick another tool to process its output.
|
||||
The picker UI is shown on stderr so it doesn't interfere with piped data.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="registry-commands">Registry Commands</h2>
|
||||
|
||||
<table class="w-full my-4">
|
||||
@@ -4166,6 +4199,7 @@ cat file.txt | summarize --provider mock</code></pre>
|
||||
""",
|
||||
"headings": [
|
||||
("tool-commands", "Tool Commands"),
|
||||
("interactive-picker", "Interactive Tool Picker (cf)"),
|
||||
("registry-commands", "Registry Commands"),
|
||||
("collection-commands", "Collection Commands"),
|
||||
("provider-commands", "Provider Commands"),
|
||||
|
||||
Reference in New Issue
Block a user