google

python-fire

google

Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.

AI 简介

Python Fire 是一个用于从任意 Python 对象自动生成命令行接口(CLI)的轻量级库。它无需手动编写参数解析逻辑,支持函数、类、模块、字典、列表等各类对象,自动推导命令结构、参数类型与帮助信息,并提供交互式 REPL 支持和 Bash-Python 协作能力。核心特点包括零配置 CLI 生成、嵌套命令自动展开、内置 --help 与类型转换、以及调试/探索现有代码的便捷性。适用于快速构建工具脚本、开发调试辅助、将已有 Python 代码暴露为命令行工具,以及简化数据处理或运维任务的命令化封装。

Python
Other
28.2k
Stars
1.5k
Forks
358
Watchers
131
Issues

Star 增长

今日0
近 7 天0
近 30 天+9
综合评分70.41
默认分支master