展示HN:Chilli - 一款轻量级的Zig命令行微框架

3作者: habedi022 天前原帖
我创建了一个开源的微框架,用于在Zig编程语言中创建命令行(CLI)应用程序。 这个框架叫做Chilli,目前提供以下功能: - 一个声明式API,用于定义嵌套命令、标志和位置参数。 - 类型安全的命令行和环境变量参数解析。 - 自动生成格式化的`--help`和`--version`输出。 - 支持命令别名、持久标志以及其他常见的CLI模式。 您可以在GitHub上找到该项目: [https://github.com/habedi/chilli](https://github.com/habedi/chilli)
查看原文
I&#x27;ve made an open-source microframework for creating command-line (CLI) applications in the Zig programming language.<p>It&#x27;s called Chilli, and it currently provides the following features:<p>- A declarative API for defining nested commands, flags, and positional arguments.<p>- Type-safe parsing of arguments from the command line and environment variables.<p>- Automatic generation of formatted `--help` and `--version` output.<p>- Support for command aliases, persistent flags, and other common CLI patterns.<p>You can find the project on GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;habedi&#x2F;chilli" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;habedi&#x2F;chilli</a>