I'm developing a CLI tool using ConsoleAppFramework. This tool is designed to be called by LLMs, and I need to provide a customized help message when --help is invoked, rather than the default one.
My tool has over 1000 commands, which I've distributed across dozens of classes using a command hierarchy to organize them. Each class represents a functional module containing related commands.
The Problem:
When invoking --help at the root level, the framework lists all 1000+ commands by default. This quickly fills up my LLM's context window.
Desired Behavior:
- At the root level,
--help should only display the names and brief descriptions of the functional modules
- Only when the user navigates into a specific module, should the detailed command list and help information for that module be shown
What I've Tried:
I attempted to use a Filter to achieve this, but it seems filters do not work for --help in root level.
Question:
Aside from intercepting the arguments before app.Run(args), are there any other ways to customize the --help behavior? If so, could you provide some example code demonstrating how to implement this?
If there is currently no way to achieve this, would it be possible to add such functionality to the framework? This would greatly benefit developers building large-scale CLI tools for AI consumption.
Thank you for this excellent framework! I believe this is an incredibly valuable console library in the AI era, where LLM-powered CLI interactions are becoming increasingly common.
I'm developing a CLI tool using ConsoleAppFramework. This tool is designed to be called by LLMs, and I need to provide a customized help message when
--helpis invoked, rather than the default one.My tool has over 1000 commands, which I've distributed across dozens of classes using a command hierarchy to organize them. Each class represents a functional module containing related commands.
The Problem:
When invoking
--helpat the root level, the framework lists all 1000+ commands by default. This quickly fills up my LLM's context window.Desired Behavior:
--helpshould only display the names and brief descriptions of the functional modulesWhat I've Tried:
I attempted to use a
Filterto achieve this, but it seems filters do not work for--helpin root level.Question:
Aside from intercepting the arguments before
app.Run(args), are there any other ways to customize the--helpbehavior? If so, could you provide some example code demonstrating how to implement this?If there is currently no way to achieve this, would it be possible to add such functionality to the framework? This would greatly benefit developers building large-scale CLI tools for AI consumption.
Thank you for this excellent framework! I believe this is an incredibly valuable console library in the AI era, where LLM-powered CLI interactions are becoming increasingly common.