Hacker GitHub

← All repos

c-blake/cligen

View on GitHub ↗ ★ 584 Nim

Nim library to infer/generate command-line-interfaces / option / argument parsing; Docs at

57 mentions on Hacker News by 8 people: 1 story, 56 comments · first 2018-08-17 · latest 2026-10-13

Mentions per year 57 mentions · busiest year 2023 (12)
20082026
  1. …you want to give that script a nice, traditional CLI then you can do so with very low effort using https://github.com/c-blake/cligen Should you want "script like" edit-test development cycle ergonomics you can use the TinyCC/tcc backend…
    comment by cb321 · 2020-10-16 · in Nim 1.4
  2. func-argparse seems much like https://pypi.org/project/argh/ the inspiration for the Nim https://github.com/c-blake/cligen which can source its "pseudo specification" from either a proc signature or a type/object definition.
  3. …macro? Really there is always at least 2.5 with the #include <fire.h>, later macro and annotations. https://github.com/c-blake/cligen achieves the actual 1-line of code dream without extra annotations and even leveraging existing API…
  4. …Shell scripts can always export CLIGEN=/dev/null to force more strict and/or default modes. [1] https://github.com/c-blake/cligen/wiki/Example-Config-File
    comment by cb321 · 2020-08-01 · in Conventions for Command Line Options
  5. I feel like argh and plac preceded/inspired Click. Also, it's not Python but in Nim there is https://github.com/c-blake/cligen which also does spellcheck/typo suggestions, and allows --kebab-case --camelCase or --snake_case for long…
    comment by cb321 · 2020-08-01 · in Conventions for Command Line Options
  6. …like this: https://github.com/Xe/within-terraform/blob/master/dyson/src... The fact that cligen ( https://github.com/c-blake/cligen ) exists too makes it super easy for me to define subcommands of the thing:…
    comment by xena · 2019-09-09 · in The Cult of Kubernetes
  7. …from the arguments of the function it is linking to. Follow the repo link for examples. [0]: https://github.com/c-blake/cligen