[{"data":1,"prerenderedAt":286},["ShallowReactive",2],{"repo-pallets-click-zh-CN":3,"i18n-pallets-click-zh-CN":283},{"mirrorPool":4,"detail":13,"relatedProjects":174},[5,9],{"key":6,"label":7,"base":8,"type":6},"github","mirror.github","https:\u002F\u002Fgithub.com\u002F",{"key":10,"label":11,"base":12,"type":10},"auto-proxy","mirror.autoProxy","https:\u002F\u002Fgh-proxy.com\u002F",{"owner":14,"repo":15,"repoId":16,"repoUrl":17,"starCount":18,"language":19,"description":20,"languages":21,"screenshots":24,"homepage":25,"pushedAt":26,"ownerAvatar":27,"ownerName":28,"ownerBio":29,"lastSyncTime":30,"lastReleaseTime":31,"tags":32,"license":35,"category":36,"subgroup":37,"releases":38},"pallets","click",19103692,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick",17817,"Python","Python composable command line interface toolkit",{"Python":22,"Shell":23},100,0,[],"https:\u002F\u002Fclick.palletsprojects.com","2026-11-06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16748505?v=4","Pallets","","2026-11-06T17:45:24.051538+00:00","2026-11-06T17:38:44Z",[33,15,14,34],"cli","python","BSD-3-Clause","development","命令行工具",[39,57,73,92,108,124,141,158],{"tag":40,"publishAt":31,"semVer":41,"prerelease":45,"assets":46},"8.5.1",[42,43,44],8,5,1,false,[47,52],{"fileName":48,"sizeMb":49,"sha256":50,"downloadCount":23,"originUrl":51},"click-8.5.1-py3-none-any.whl",0.12,"8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37","https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.5.1\u002Fclick-8.5.1-py3-none-any.whl",{"fileName":53,"sizeMb":54,"sha256":55,"downloadCount":23,"originUrl":56},"click-8.5.1.tar.gz",0.38,"9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4","https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.5.1\u002Fclick-8.5.1.tar.gz",{"tag":58,"publishAt":59,"semVer":60,"prerelease":45,"assets":61},"8.5.0","2026-08-27T04:00:53Z",[42,43,23],[62,67],{"fileName":63,"sizeMb":49,"sha256":64,"downloadCount":65,"originUrl":66},"click-8.5.0-py3-none-any.whl","255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360",117,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.5.0\u002Fclick-8.5.0-py3-none-any.whl",{"fileName":68,"sizeMb":69,"sha256":70,"downloadCount":71,"originUrl":72},"click-8.5.0.tar.gz",0.36,"ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34",189,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.5.0\u002Fclick-8.5.0.tar.gz",{"tag":74,"publishAt":75,"semVer":76,"prerelease":45,"assets":79},"8.4.2","2026-06-26T16:11:15Z",[42,77,78],4,2,[80,86],{"fileName":81,"sizeMb":82,"sha256":83,"downloadCount":84,"originUrl":85},"click-8.4.2-py3-none-any.whl",0.11,"e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76",49,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.2\u002Fclick-8.4.2-py3-none-any.whl",{"fileName":87,"sizeMb":88,"sha256":89,"downloadCount":90,"originUrl":91},"click-8.4.2.tar.gz",0.32,"9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6",60,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.2\u002Fclick-8.4.2.tar.gz",{"tag":93,"publishAt":94,"semVer":95,"prerelease":45,"assets":96},"8.4.1","2026-05-22T04:08:49Z",[42,77,44],[97,102],{"fileName":98,"sizeMb":82,"sha256":99,"downloadCount":100,"originUrl":101},"click-8.4.1-py3-none-any.whl","482be17c6991b8c19c5429a1e995d9b0efdbb63172824c41f99965dc0ade8ec2",38,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.1\u002Fclick-8.4.1-py3-none-any.whl",{"fileName":103,"sizeMb":104,"sha256":105,"downloadCount":106,"originUrl":107},"click-8.4.1.tar.gz",0.34,"918b5633eddf6b41c32d4f454bf0de810065c74e3f7dbf8ee5452f8be88d3e96",556,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.1\u002Fclick-8.4.1.tar.gz",{"tag":109,"publishAt":110,"semVer":111,"prerelease":45,"assets":112},"8.4.0","2026-05-17T05:12:31Z",[42,77,23],[113,118],{"fileName":114,"sizeMb":82,"sha256":115,"downloadCount":116,"originUrl":117},"click-8.4.0-py3-none-any.whl","40c50b7c6c6adac2823d411041ec84f3f103f1b280d5e9ce0d7f998995832f81",18,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.0\u002Fclick-8.4.0-py3-none-any.whl",{"fileName":119,"sizeMb":120,"sha256":121,"downloadCount":122,"originUrl":123},"click-8.4.0.tar.gz",0.33,"638f1338fe1235c8f4e008e4a8a254fb5c5fbdcbb40ece3c9142ebb78e792973",82,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.0\u002Fclick-8.4.0.tar.gz",{"tag":125,"publishAt":126,"semVer":127,"prerelease":45,"assets":129},"8.3.3","2026-04-22T16:22:12Z",[42,128,128],3,[130,135],{"fileName":131,"sizeMb":82,"sha256":132,"downloadCount":133,"originUrl":134},"click-8.3.3-py3-none-any.whl","a2bf429bb3033c89fa4936ffb35d5cb471e3719e1f3c8a7c3fff0b8314305613",40,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.3\u002Fclick-8.3.3-py3-none-any.whl",{"fileName":136,"sizeMb":137,"sha256":138,"downloadCount":139,"originUrl":140},"click-8.3.3.tar.gz",0.31,"398329ad4837b2ff7cbe1dd166a4c0f8900c3ca3a218de04466f38f6497f18a2",35,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.3\u002Fclick-8.3.3.tar.gz",{"tag":142,"publishAt":143,"semVer":144,"prerelease":45,"assets":145},"8.3.2","2026-04-03T19:14:59Z",[42,128,78],[146,152],{"fileName":147,"sizeMb":148,"sha256":149,"downloadCount":150,"originUrl":151},"click-8.3.2-py3-none-any.whl",0.1,"1924d2c27c5653561cd2cae4548d1406039cb79b858b747cfea24924bbc1616d",23,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.2\u002Fclick-8.3.2-py3-none-any.whl",{"fileName":153,"sizeMb":154,"sha256":155,"downloadCount":156,"originUrl":157},"click-8.3.2.tar.gz",0.29,"14162b8b3b3550a7d479eafa77dfd3c38d9dc8951f6f69c78913a8f9a7540fd5",25,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.2\u002Fclick-8.3.2.tar.gz",{"tag":159,"publishAt":160,"semVer":161,"prerelease":45,"assets":162},"8.3.1","2025-11-15T20:46:24Z",[42,128,44],[163,168],{"fileName":164,"sizeMb":148,"sha256":165,"downloadCount":166,"originUrl":167},"click-8.3.1-py3-none-any.whl","981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6",53,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.1\u002Fclick-8.3.1-py3-none-any.whl",{"fileName":169,"sizeMb":170,"sha256":171,"downloadCount":172,"originUrl":173},"click-8.3.1.tar.gz",0.28,"12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a",66,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.1\u002Fclick-8.3.1.tar.gz",[175,201,221,237,249,262],{"owner":176,"repo":177,"repoId":178,"category":179,"subgroup":37,"language":180,"tags":181,"starCount":190,"ownerUid":191,"latestTag":192,"platforms":193,"lastReleaseTime":198,"downloadCount":199,"description":200},"junegunn","fzf",13807606,"tools","Go",[182,33,183,177,184,185,186,187,188,189],"bash","fish","go","neovim","tmux","unix","vim","zsh",84054,700826,"v0.75.0",[194,195,196,197],"windows","mac","linux","other","2026-11-07T12:03:59Z",1751,"一款通用的命令行模糊查找工具，可作为交互式终端工具包使用。",{"owner":202,"repo":203,"repoId":204,"category":179,"subgroup":37,"language":205,"tags":206,"starCount":214,"ownerUid":215,"latestTag":216,"platforms":217,"lastReleaseTime":218,"downloadCount":219,"description":220},"sharkdp","bat",130464961,"Rust",[33,207,208,209,210,211,212,213],"command-line","git","hacktoberfest","rust","syntax-highlighting","terminal","tool",60669,4209276,"v0.26.1",[194,195,196],"2025-12-02T20:48:10Z",1267736,"一款增强版 `cat` 命令，支持语法高亮、Git 集成和分页显示，适合查看源代码和文本文件。",{"owner":222,"repo":222,"repoId":223,"category":36,"subgroup":37,"language":224,"tags":225,"starCount":230,"ownerUid":231,"latestTag":232,"platforms":233,"lastReleaseTime":234,"downloadCount":235,"description":236},"PowerShell",49609581,"C#",[207,209,196,226,227,228,229,194],"macos","netcore","powershell","shell",56141,11524380,"v7.7.0",[194,195,196],"2026-11-10T20:18:47Z",91728,"PowerShell 是微软官方跨平台自动化框架，Windows \u002F Linux \u002F macOS 一套语法，结构化数据 \u002F REST API \u002F 对象模型一把梭，56 K stars。",{"owner":33,"repo":33,"repoId":238,"category":179,"subgroup":37,"language":180,"tags":239,"starCount":242,"ownerUid":243,"latestTag":244,"platforms":245,"lastReleaseTime":246,"downloadCount":247,"description":248},212613049,[33,208,240,241],"github-api-v4","golang",47233,59704711,"v2.106.0",[194,195,196],"2026-11-25T22:48:46Z",135955,"GitHub 官方命令行工具，将 PR、Issue 等 GitHub 概念带到终端中。",{"owner":202,"repo":250,"repoId":251,"category":179,"subgroup":37,"language":205,"tags":252,"starCount":256,"ownerUid":215,"latestTag":257,"platforms":258,"lastReleaseTime":259,"downloadCount":260,"description":261},"fd",90793418,[33,207,253,209,254,210,255,212,213],"filesystem","regex","search",45105,"v10.5.2",[194,195,196],"2026-11-07T07:23:35Z",14686,"一款简单、快速且用户友好的 `find` 命令替代品，用于在文件系统中查找条目。",{"owner":263,"repo":264,"repoId":265,"category":36,"subgroup":37,"language":266,"tags":267,"starCount":276,"ownerUid":277,"latestTag":278,"platforms":279,"lastReleaseTime":280,"downloadCount":281,"description":282},"Unitech","pm2",10187082,"JavaScript",[207,268,269,270,271,272,273,264,274,275],"command-line-tool","deploy","load-balancer","monitoring","node","nodejs","process-manager","production",43344,757747,"2.9.2-next",[197],"2017-12-21T17:00:21Z",48,"Node.js\u002FBun应用程序的生产进程管理器，内置负载均衡器，可让应用永远保持运行，实现零停机重载。",{"description":284,"readmeHtml":285},"Click 是 Pallets 出品的 Python 命令行工具创建库，用装饰器以极少代码组合出美观的 CLI，支持任意嵌套命令、自动帮助页与子命令运行时懒加载。","\u003Ch2 id=\"项目概述\">项目概述\u003C\u002Fh2>\u003Cp>Click 是一个用于创建命令行界面的 Python 包，全称 Command Line Interface Creation Kit。它以可组合的方式、用尽可能少的代码构建美观的 CLI，高度可配置又自带合理默认值，目标是让写命令行工具的过程快速而有趣。\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>项目\u003C\u002Fth>\n\u003Cth>内容\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>平台\u003C\u002Ftd>\n\u003Ctd>Python\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>开发语言\u003C\u002Ftd>\n\u003Ctd>Python\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>许可证\u003C\u002Ftd>\n\u003Ctd>BSD-3-Clause\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>出品方\u003C\u002Ftd>\n\u003Ctd>Pallets 组织\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n\u003Cblockquote>\n\u003Cp>用装饰器写 CLI：任意嵌套命令、自动生成帮助页、子命令运行时懒加载。\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"主要功能\">主要功能\u003C\u002Fh2>\u003Cul>\n\u003Cli>\u003Cstrong>命令组合\u003C\u002Fstrong>：支持任意层级嵌套的命令结构，复杂 CLI 也能清晰组织\u003C\u002Fli>\n\u003Cli>\u003Cstrong>自动帮助页\u003C\u002Fstrong>：根据函数文档与参数定义自动生成帮助信息\u003C\u002Fli>\n\u003Cli>\u003Cstrong>懒加载子命令\u003C\u002Fstrong>：子命令可在运行时按需加载，加快启动速度\u003C\u002Fli>\n\u003Cli>\u003Cstrong>装饰器定义\u003C\u002Fstrong>：\u003Ccode>@click.command\u003C\u002Fcode> 与 \u003Ccode>@click.option\u003C\u002Fcode> 直接把函数变成命令\u003C\u002Fli>\n\u003Cli>\u003Cstrong>交互提示\u003C\u002Fstrong>：选项支持 prompt，缺少参数时自动向用户询问\u003C\u002Fli>\n\u003Cli>\u003Cstrong>合理默认\u003C\u002Fstrong>：开箱即用即可获得良好行为，同时保持高度可配置\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"适用人群\">适用人群\u003C\u002Fh2>\u003Cul>\n\u003Cli>Python CLI 工具开发者\u003C\u002Fli>\n\u003Cli>运维自动化脚本作者\u003C\u002Fli>\n\u003Cli>多子命令工具构建者\u003C\u002Fli>\n\u003Cli>需要快速封装脚本为命令的开发者\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"快速上手\">快速上手\u003C\u002Fh2>\u003Col>\n\u003Cli>安装：\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cdiv class=\"code-block\">\u003Cpre>\u003Ccode class=\"hljs language-bash\">pip install click\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003Col start=\"2\">\n\u003Cli>用装饰器定义命令：\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cdiv class=\"code-block\">\u003Cpre>\u003Ccode class=\"hljs language-python\">import click\n\n@click.command()\n@click.option('--count', default=1, help='Number of greetings.')\n@click.option('--name', prompt='Your name', help='The person to greet.')\ndef hello(count, name):\n    '''Simple program that greets NAME for a total of COUNT times.'''\n    for _ in range(count):\n        click.echo(f'Hello, {name}!')\n\nif __name__ == '__main__':\n    hello()\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003Col start=\"3\">\n\u003Cli>运行：\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cdiv class=\"code-block\">\u003Cpre>\u003Ccode class=\"hljs language-bash\">python hello.py --count=3\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003Ch2 id=\"核心优势\">核心优势\u003C\u002Fh2>\u003Cul>\n\u003Cli>\u003Cstrong>代码量少\u003C\u002Fstrong>：装饰器声明式定义，几行代码得到完整 CLI\u003C\u002Fli>\n\u003Cli>\u003Cstrong>行为可预期\u003C\u002Fstrong>：帮助页与参数处理自动生成，用户上手快\u003C\u002Fli>\n\u003Cli>\u003Cstrong>组合灵活\u003C\u002Fstrong>：命令可任意嵌套，工具能从小脚本自然长成大工具\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"系统要求\">系统要求\u003C\u002Fh2>\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>项目\u003C\u002Fth>\n\u003Cth>要求\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>运行环境\u003C\u002Ftd>\n\u003Ctd>Python（pip 安装）\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>许可证\u003C\u002Ftd>\n\u003Ctd>BSD-3-Clause\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n\u003Ch2 id=\"注意事项\">注意事项\u003C\u002Fh2>\u003Cul>\n\u003Cli>\u003Cstrong>函数即文档\u003C\u002Fstrong>：命令的 docstring 会成为帮助页描述，写清楚有助于生成更好的帮助信息\u003C\u002Fli>\n\u003Cli>\u003Cstrong>交互提示\u003C\u002Fstrong>：示例中 \u003Ccode>--name\u003C\u002Fcode> 设置了 prompt，未提供该参数时程序会暂停等待输入\u003C\u002Fli>\n\u003C\u002Ful>\n",1795754177554]