"plain" help formatter with `TERM=dumb`
Right now color can be disabled with NO_COLOR through rich, but there's not default way for users to disable the fancy formatting. Maybe, "plain" should be used when TERM=dumb by default?
What's wrong with just explicitly setting help_formatter="plain"?
I'm thinking of people with accessibility needs or limited terminals who need standard ways of defining CLI behavior. Stuff like borders can cause issues for screen readers.
NO_COLOR and FORCE_COLOR are pretty standard. I think people also use TERM=dumb for the same purpose and getting rid of any fancy characters or formatting in general. Unfortunately, it seems like there isn't great info or standards for this stuff.
I think I understand what you mean, but I think this interdependence might be mixing unrelated ideas. TERM=dumb seems like a terminal with assumed 80-col, and simply prints out characters as they come in. Only control characters are CR and LF. Rich's documentation has this to say:
Setting the environment variable TERM to "dumb" or "unknown" will disable color/style and some features that require moving the cursor, such as progress bars.
This is to say, the output is certainly more limited, but doesn't strongly insinuate that we should also change the formatter to be simpler (seems like the current default formatting prints fine on a dumb-terminal without color). If the current output couldn't be displayed in this configuration, I feel like it would be a much stronger reason to change the default.
All of this said (and I'm sure as you already know), you can achieve the effect you are looking for with:
app = cyclopts.App(
help_formatter="plain" if os.environ.get("TERM") == "dumb" else "default",
)
I'm not totally turned off by the idea, but I don't really feel like it's a significant improvement. Open to more thoughts!
This is why I asked it as a question rather than suggestion. I think these sorts of things should be done in a standard way, but TERM=dumb is the closest thing I could find, and it's not really for that. Most of the CLIs I looked at had some unique ENV var or an argument like --screen-reader.
you're certainly more versed on the topic than me; I'm more than willing to add options like this, I just want to make sure it's as standard/idiomatic as possible!