Loading...
Loading...
Use this when writing Python argparse CLI scripts that require colorful --help output with customizable color control, including support for NO_COLOR and FORCE_COLOR environment variables.
npx skill4agent add canyangliunian/agent-skills pycli-color-h/--help--helpargparseColorHelpFormatter(argparse.HelpFormatter)_format_action_invocation(self, action)ArgumentParser(formatter_class=ColorHelpFormatter)--h--titlep.isupper()_TITLEAJG_CSV\x1b[0m\x1b[36;1m\x1b[33;1msupports_color() -> boolsys.stdout.isatty()TERMdumbNO_COLORFORCE_COLOR=1colorize(text: str, ansi_code: str) -> strNO_COLOR=1FORCE_COLOR=1 python3 your_script.py -hrequired=Truechoices=if __name__ == "__main__": main()NO_COLOR=1 python your_script.py -hFORCE_COLOR=1 python your_script.py -h./scripts/demo_pycli_color.py