[{"data":1,"prerenderedAt":284},["ShallowReactive",2],{"repo-pallets-click-zh-CN":3,"i18n-pallets-click-zh-CN":281},{"mirrorPool":4,"detail":13,"relatedProjects":176},[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\u002Fgithub.xxlab.tech\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",17794,"Python","Python composable command line interface toolkit",{"Python":22,"Shell":23},100,0,[],"https:\u002F\u002Fclick.palletsprojects.com","2026-10-06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16748505?v=4","Pallets","","2026-10-20T10:25:22.861920+00:00","2026-08-27T04:00:53Z",[33,15,14,34],"cli","python","BSD-3-Clause","development","命令行工具",[39,58,77,94,110,127,144,160],{"tag":40,"publishAt":31,"semVer":41,"prerelease":44,"assets":45},"8.5.0",[42,43,23],8,5,false,[46,52],{"fileName":47,"sizeMb":48,"sha256":49,"downloadCount":50,"originUrl":51},"click-8.5.0-py3-none-any.whl",0.12,"255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360",50,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.5.0\u002Fclick-8.5.0-py3-none-any.whl",{"fileName":53,"sizeMb":54,"sha256":55,"downloadCount":56,"originUrl":57},"click-8.5.0.tar.gz",0.36,"ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34",106,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.5.0\u002Fclick-8.5.0.tar.gz",{"tag":59,"publishAt":60,"semVer":61,"prerelease":44,"assets":64},"8.4.2","2026-06-26T16:11:15Z",[42,62,63],4,2,[65,71],{"fileName":66,"sizeMb":67,"sha256":68,"downloadCount":69,"originUrl":70},"click-8.4.2-py3-none-any.whl",0.11,"e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76",47,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.2\u002Fclick-8.4.2-py3-none-any.whl",{"fileName":72,"sizeMb":73,"sha256":74,"downloadCount":75,"originUrl":76},"click-8.4.2.tar.gz",0.32,"9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6",58,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.4.2\u002Fclick-8.4.2.tar.gz",{"tag":78,"publishAt":79,"semVer":80,"prerelease":44,"assets":82},"8.4.1","2026-05-22T04:08:49Z",[42,62,81],1,[83,88],{"fileName":84,"sizeMb":67,"sha256":85,"downloadCount":86,"originUrl":87},"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":89,"sizeMb":90,"sha256":91,"downloadCount":92,"originUrl":93},"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":95,"publishAt":96,"semVer":97,"prerelease":44,"assets":98},"8.4.0","2026-05-17T05:12:31Z",[42,62,23],[99,104],{"fileName":100,"sizeMb":67,"sha256":101,"downloadCount":102,"originUrl":103},"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":105,"sizeMb":106,"sha256":107,"downloadCount":108,"originUrl":109},"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":111,"publishAt":112,"semVer":113,"prerelease":44,"assets":115},"8.3.3","2026-04-22T16:22:12Z",[42,114,114],3,[116,121],{"fileName":117,"sizeMb":67,"sha256":118,"downloadCount":119,"originUrl":120},"click-8.3.3-py3-none-any.whl","a2bf429bb3033c89fa4936ffb35d5cb471e3719e1f3c8a7c3fff0b8314305613",39,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.3\u002Fclick-8.3.3-py3-none-any.whl",{"fileName":122,"sizeMb":123,"sha256":124,"downloadCount":125,"originUrl":126},"click-8.3.3.tar.gz",0.31,"398329ad4837b2ff7cbe1dd166a4c0f8900c3ca3a218de04466f38f6497f18a2",33,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.3\u002Fclick-8.3.3.tar.gz",{"tag":128,"publishAt":129,"semVer":130,"prerelease":44,"assets":131},"8.3.2","2026-04-03T19:14:59Z",[42,114,63],[132,138],{"fileName":133,"sizeMb":134,"sha256":135,"downloadCount":136,"originUrl":137},"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":139,"sizeMb":140,"sha256":141,"downloadCount":142,"originUrl":143},"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":145,"publishAt":146,"semVer":147,"prerelease":44,"assets":148},"8.3.1","2025-11-15T20:46:24Z",[42,114,81],[149,154],{"fileName":150,"sizeMb":134,"sha256":151,"downloadCount":152,"originUrl":153},"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":155,"sizeMb":156,"sha256":157,"downloadCount":158,"originUrl":159},"click-8.3.1.tar.gz",0.28,"12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a",65,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.1\u002Fclick-8.3.1.tar.gz",{"tag":161,"publishAt":162,"semVer":163,"prerelease":44,"assets":164},"8.3.0","2025-09-18T17:34:57Z",[42,114,23],[165,170],{"fileName":166,"sizeMb":134,"sha256":167,"downloadCount":168,"originUrl":169},"click-8.3.0-py3-none-any.whl","9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc",43,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.0\u002Fclick-8.3.0-py3-none-any.whl",{"fileName":171,"sizeMb":172,"sha256":173,"downloadCount":174,"originUrl":175},"click-8.3.0.tar.gz",0.26,"e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4",54,"https:\u002F\u002Fgithub.com\u002Fpallets\u002Fclick\u002Freleases\u002Fdownload\u002F8.3.0\u002Fclick-8.3.0.tar.gz",[177,203,223,235,248,269],{"owner":178,"repo":179,"repoId":180,"category":181,"subgroup":37,"language":182,"tags":183,"starCount":192,"ownerUid":193,"latestTag":194,"platforms":195,"lastReleaseTime":200,"downloadCount":201,"description":202},"junegunn","fzf",13807606,"tools","Go",[184,33,185,179,186,187,188,189,190,191],"bash","fish","go","neovim","tmux","unix","vim","zsh",83548,700826,"v0.74.5",[196,197,198,199],"windows","mac","linux","other","2026-10-11T02:39:32Z",3708,"一款通用的命令行模糊查找工具，可作为交互式终端工具包使用。",{"owner":204,"repo":205,"repoId":206,"category":181,"subgroup":37,"language":207,"tags":208,"starCount":216,"ownerUid":217,"latestTag":218,"platforms":219,"lastReleaseTime":220,"downloadCount":221,"description":222},"sharkdp","bat",130464961,"Rust",[33,209,210,211,212,213,214,215],"command-line","git","hacktoberfest","rust","syntax-highlighting","terminal","tool",60669,4209276,"v0.26.1",[196,197,198],"2025-12-02T20:48:10Z",1267736,"一款增强版 `cat` 命令，支持语法高亮、Git 集成和分页显示，适合查看源代码和文本文件。",{"owner":33,"repo":33,"repoId":224,"category":181,"subgroup":37,"language":182,"tags":225,"starCount":228,"ownerUid":229,"latestTag":230,"platforms":231,"lastReleaseTime":232,"downloadCount":233,"description":234},212613049,[33,210,226,227],"github-api-v4","golang",46758,59704711,"v2.103.3",[196,197,198],"2026-10-26T19:20:08Z",103749,"GitHub 官方命令行工具，将 PR、Issue 等 GitHub 概念带到终端中。",{"owner":204,"repo":236,"repoId":237,"category":181,"subgroup":37,"language":207,"tags":238,"starCount":242,"ownerUid":217,"latestTag":243,"platforms":244,"lastReleaseTime":245,"downloadCount":246,"description":247},"fd",90793418,[33,209,239,211,240,212,241,214,215],"filesystem","regex","search",44635,"v10.5.0",[196,197,198],"2026-08-26T07:59:09Z",1416015,"一款简单、快速且用户友好的 `find` 命令替代品，用于在文件系统中查找条目。",{"owner":249,"repo":250,"repoId":251,"category":36,"subgroup":37,"language":252,"tags":253,"starCount":262,"ownerUid":263,"latestTag":264,"platforms":265,"lastReleaseTime":266,"downloadCount":267,"description":268},"Unitech","pm2",10187082,"JavaScript",[209,254,255,256,257,258,259,250,260,261],"command-line-tool","deploy","load-balancer","monitoring","node","nodejs","process-manager","production",43325,757747,"2.9.2-next",[199],"2017-12-21T17:00:21Z",46,"Node.js\u002FBun应用程序的生产进程管理器，内置负载均衡器，可让应用永远保持运行，实现零停机重载。",{"owner":270,"repo":270,"repoId":271,"category":36,"subgroup":37,"language":207,"tags":272,"starCount":274,"ownerUid":275,"latestTag":276,"platforms":277,"lastReleaseTime":278,"downloadCount":279,"description":280},"nushell",186024298,[270,212,273],"shell",40625,50749515,"0.116.1",[196,197,198],"2026-10-04T15:26:13Z",5568,"一种新型 Shell，将数据视为结构化表格而非纯文本流，带来现代化的命令行体验。",{"description":282,"readmeHtml":283},"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",1793197921327]