[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-0xacx--chatGPT-shell-cli":3,"tool-0xacx--chatGPT-shell-cli":62},[4,18,28,37,45,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":24,"last_commit_at":25,"category_tags":26,"status":17},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,2,"2026-04-19T23:22:26",[16,14,13,15,27],"插件",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":10,"last_commit_at":34,"category_tags":35,"status":17},10095,"AutoGPT","Significant-Gravitas\u002FAutoGPT","AutoGPT 是一个旨在让每个人都能轻松使用和构建 AI 的强大平台，核心功能是帮助用户创建、部署和管理能够自动执行复杂任务的连续型 AI 智能体。它解决了传统 AI 应用中需要频繁人工干预、难以自动化长流程工作的痛点，让用户只需设定目标，AI 即可自主规划步骤、调用工具并持续运行直至完成任务。\n\n无论是开发者、研究人员，还是希望提升工作效率的普通用户，都能从 AutoGPT 中受益。开发者可利用其低代码界面快速定制专属智能体；研究人员能基于开源架构探索多智能体协作机制；而非技术背景用户也可直接选用预置的智能体模板，立即投入实际工作场景。\n\nAutoGPT 的技术亮点在于其模块化“积木式”工作流设计——用户通过连接功能块即可构建复杂逻辑，每个块负责单一动作，灵活且易于调试。同时，平台支持本地自托管与云端部署两种模式，兼顾数据隐私与使用便捷性。配合完善的文档和一键安装脚本，即使是初次接触的用户也能在几分钟内启动自己的第一个 AI 智能体。AutoGPT 正致力于降低 AI 应用门槛，让人人都能成为 AI 的创造者与受益者。",183572,"2026-04-20T04:47:55",[13,36,27,14,15],"语言模型",{"id":38,"name":39,"github_repo":40,"description_zh":41,"stars":42,"difficulty_score":10,"last_commit_at":43,"category_tags":44,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":46,"name":47,"github_repo":48,"description_zh":49,"stars":50,"difficulty_score":24,"last_commit_at":51,"category_tags":52,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",161147,"2026-04-19T23:31:47",[14,13,36],{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":59,"last_commit_at":60,"category_tags":61,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,27],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":74,"owner_location":77,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":78,"languages":79,"stars":84,"forks":85,"last_commit_at":86,"license":87,"difficulty_score":24,"env_os":88,"env_gpu":89,"env_ram":90,"env_deps":91,"category_tags":97,"github_topics":98,"view_count":24,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":113,"updated_at":114,"faqs":115,"releases":150},10140,"0xacx\u002FchatGPT-shell-cli","chatGPT-shell-cli","Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required. Formerly https:\u002F\u002Fgptshell.cc","chatGPT-shell-cli 是一款轻量级的命令行工具，让你无需安装 Python 或 Node.js 环境，直接在终端中调用 OpenAI 的 ChatGPT 和 DALL-E 能力。它通过简单的 Shell 脚本封装了官方 API，解决了传统 AI 工具依赖复杂运行环境、启动繁琐的痛点，让开发者能像使用普通系统命令一样与 AI 交互。\n\n这款工具特别适合习惯终端操作的开发者、运维工程师及极客用户。它不仅支持多轮对话上下文记忆，还能根据文本提示生成图片、列出可用模型、自定义请求参数，甚至直接生成并执行系统命令。其独特的技术亮点在于极简的依赖设计（仅需 curl 和 jq），支持管道传输（pipe）和脚本参数调用，可轻松集成到自动化工作流中。此外，它还允许用户设定初始人设（如扮演特定角色），让对话更具趣味性。无论是快速查询技术文档、调试正则表达式，还是生成创意图像，chatGPT-shell-cli 都能让你在熟悉的终端环境中高效完成，是提升命令行工作效率的得力助手。","\n![shell](https:\u002F\u002Fuser-images.githubusercontent.com\u002F99351112\u002F207697723-a3fabc0b-f067-4f83-96fd-1f7225a0bb38.svg)\n\u003Cdiv align=\"center\">\n\u003Cp>\n\n✨Join the new \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FfwfYAZWKqu\">Discord server\u003C\u002Fa> and start contributing to this project!✨\u003C\u002Fp>\n\n\n\u003Ch1>chatGPT-shell-cli\u003C\u002Fh1>\n\nA simple, lightweight shell script to use OpenAI's chatGPT and DALL-E from the terminal without installing python or node.js. The script uses the official ChatGPT model `gpt-3.5-turbo` with the OpenAI API endpoint `\u002Fchat\u002Fcompletions`. You can also use the new `gpt-4` model, if you have access.  \nThe script supports the use of all other OpenAI models with the `completions` endpoint and the `images\u002Fgenerations` endpoint for generating images.\n\u003C\u002Fdiv>\n\n## Features\n\n- [Chat](#use-the-official-chatgpt-model) with the ✨ [official ChatGPT API](https:\u002F\u002Fopenai.com\u002Fblog\u002Fintroducing-chatgpt-and-whisper-apis) ✨ from the terminal\n- [Generate images](#commands) from a text prompt\n- View your [chat history](#commands)\n- [Chat context](#chat-context), GPT remembers previous chat questions and answers\n- Pass the input prompt with [pipe](#pipe-mode), as a [script parameter](#script-parameters) or normal [chat mode](#chat-mode)\n- List all available [OpenAI models](#commands) \n- Set OpenAI [request parameters](#set-request-parameters)\n- Generate a [command](#commands) and run it in terminal\n\n![Screenshot 2023-01-12 at 13 59 08](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_readme_92943aa4df6d.png)\n\n![Screenshot 2023-01-13 at 16 39 27](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_readme_51542ad2c1fa.png)\n\n![faster_convert](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_readme_74979c808ddf.gif)\n\n\n[Chat mode](#chat-mode):\n```shell\n$ chatgpt\nWelcome to chatgpt. You can quit with 'exit'.\n\nEnter a prompt:\n\n```\n\nChat mode with [initial prompt](#set-chat-initial-prompt):\n```shell\n$ chatgpt -i \"You are Rick, from Rick and Morty. Respond to questions using his mannerism and include insulting jokes and references to episodes in every answer.\"\nWelcome to chatgpt. You can quit with 'exit'.\n\nEnter a prompt:\nExplain in simple terms how GPT3 works\n\nchatgpt  Ah, you want me to explain GPT3 in simple terms? Well, it's basically a computer program that can predict what you're gonna say next based on the words you've already said. Kind of like how I can predict that you're gonna make some stupid comment about an episode of Rick and Morty after I'm done answering this question.\n\nEnter a prompt:\n\n```\n\nUsing [pipe](#pipe-mode):\n```shell\necho \"How to view running processes on Ubuntu?\" | chatgpt\n```\nUsing [script parameters](#script-parameters):\n```shell\nchatgpt -p \"What is the regex to match an email address?\"\n```\n\n\n\n## Getting Started\n\n### Prerequisites\n\nThis script relies on curl for the requests to the api and jq to parse the json response.\n\n* [curl](https:\u002F\u002Fwww.curl.se)\n  ```sh\n  brew install curl\n  ```\n* [jq](https:\u002F\u002Fstedolan.github.io\u002Fjq\u002F)\n  ```sh\n  brew install jq\n  ```\n* An OpenAI API key. Create an account and get a free API Key at [OpenAI](https:\u002F\u002Fbeta.openai.com\u002Faccount\u002Fapi-keys)\n\n* Optionally, you can install [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow) to render responses in markdown \n\n### Installation\n\n   To install, run this in your terminal and provide your OpenAI API key when asked.\n   \n   ```sh\n   curl -sS https:\u002F\u002Fraw.githubusercontent.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fmain\u002Finstall.sh | sudo -E bash\n   ```\n   \n#### ArchLinux\n\n  If you are using ArchLinux you can install the [AUR package](https:\u002F\u002Faur.archlinux.org\u002Fpackages\u002Fchatgpt-shell-cli) with:\n  \n  ```\n  paru -S chatgpt-shell-cli\n  ```\n\n### Manual Installation\n\n  If you want to install it manually, all you have to do is:\n\n  - Download the `chatgpt.sh` file in a directory you want\n  - Add the path of `chatgpt.sh` to your `$PATH`. You do that by adding this line to your shell profile: `export PATH=$PATH:\u002Fpath\u002Fto\u002Fchatgpt.sh`\n  - Add the OpenAI API key to your shell profile by adding this line `export OPENAI_KEY=your_key_here`\n  - If you are using iTerm and want to view images in terminal, install [imgcat](https:\u002F\u002Fiterm2.com\u002Futilities\u002Fimgcat)\n\n## Usage\n\n### Start\n\n#### Chat Mode\n  - Run the script by using the `chatgpt` command anywhere. By default the script uses the `gpt-3.5-turbo` model.\n#### Pipe Mode\n  - You can also use it in pipe mode `echo \"What is the command to get all pdf files created yesterday?\" | chatgpt`\n#### Script Parameters\n  - You can also pass the prompt as a command line argument `chatgpt -p \"What is the regex to match an email address?\"`\n\n### Commands\n\n  - `image:` To generate images, start a prompt with `image:`\n    If you are using iTerm, you can view the image directly in the terminal. Otherwise the script will ask to open the image in your browser.\n  - `history` To view your chat history, type `history`\n  - `models` To get a list of the models available at OpenAI API, type `models`\n  - `model:` To view all the information on a specific model, start a prompt with `model:` and the model `id` as it appears in the list of models. For example: `model:text-babbage:001` will get you all the fields for `text-babbage:001` model\n  - `command:` To get a command with the specified functionality and run it, just type `command:` and explain what you want to achieve. The script will always ask you if you want to execute the command. i.e. `command: show me all files in this directory that have more than 150 lines of code` \n  *If a command modifies your file system or dowloads external files the script will show a warning before executing.*\n\n### Chat context\n\n  - For models other than `gpt-3.5-turbo` and `gpt-4` where the chat context is not supported by the OpenAI api, you can use the chat context build in this script. You can enable chat context mode for the model to remember your previous chat questions and answers. This way you can ask follow-up questions. In chat context the model gets a prompt to act as ChatGPT and is aware of today's date and that it's trained with data up until 2021. To enable this mode start the script with `-c` or `--chat-context`. i.e. `chatgpt --chat-context` and start to chat. \n\n#### Set chat initial prompt\n  - You can set your own initial chat prompt to use in chat context mode. The initial prompt will be sent on every request along with your regular prompt so that the OpenAI model will \"stay in character\". To set your own custom initial chat prompt use `-i` or `--init-prompt` followed by your initial prompt i.e. `chatgpt -i \"You are Rick from Rick and Morty, reply with references to episodes.\"` \n  - You can also set an initial chat prompt from a file with `--init-prompt-from-file` i.e. `chatgpt --init-prompt-from-file myprompt.txt`\n  \n  *When you set an initial prompt you don't need to enable the chat context. \n\n### Use the official ChatGPT model\n\n  - The default model used when starting the script is `gpt-3.5-turbo`.\n  \n### Use GPT4\n  - If you have access to the GPT4 model you can use it by setting the model to `gpt-4`, i.e. `chatgpt --model gpt-4`\n\n### Set request parameters\n\n  - To set request parameters you can start the script like this: `chatgpt --temperature 0.9 --model text-babbage:001 --max-tokens 100 --size 1024x1024`\n  \n    The available parameters are: \n      - temperature,  `-t` or `--temperature`\n      - model, `-m` or `--model`\n      - max number of tokens, `--max-tokens`\n      - image size, `-s` or `--size` (The sizes that are accepted by the OpenAI API are 256x256, 512x512, 1024x1024)\n      - prompt, `-p` or `--prompt` \n      - prompt from a file in your file system, `--prompt-from-file`  \n      \n    To learn more about these parameters you can view the [API documentation](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fapi-reference\u002Fcompletions\u002Fcreate)\n    \n    \n## Contributors\n:pray: Thanks to all the people who used, tested, submitted issues, PRs and proposed changes:\n\n[pfr-dev](https:\u002F\u002Fwww.github.com\u002Fpfr-dev), [jordantrizz](https:\u002F\u002Fwww.github.com\u002Fjordantrizz), [se7en-x230](https:\u002F\u002Fwww.github.com\u002Fse7en-x230), [mountaineerbr](https:\u002F\u002Fwww.github.com\u002Fmountaineerbr), [oligeo](https:\u002F\u002Fwww.github.com\u002Foligeo), [biaocy](https:\u002F\u002Fwww.github.com\u002Fbiaocy), [dmd](https:\u002F\u002Fwww.github.com\u002Fdmd), [goosegit11](https:\u002F\u002Fwww.github.com\u002Fgoosegit11), [dilatedpupils](https:\u002F\u002Fwww.github.com\u002Fdilatedpupils), [direster](https:\u002F\u002Fwww.github.com\u002Fdirester), [rxaviers](https:\u002F\u002Fwww.github.com\u002Frxaviers), [Zeioth](https:\u002F\u002Fwww.github.com\u002FZeioth), [edshamis](https:\u002F\u002Fwww.github.com\u002Fedshamis), [nre-ableton](https:\u002F\u002Fwww.github.com\u002Fnre-ableton), [TobiasLaving](https:\u002F\u002Fwww.github.com\u002FTobiasLaving), [RexAckermann](https:\u002F\u002Fwww.github.com\u002FRexAckermann), [emirkmo](https:\u002F\u002Fwww.github.com\u002Femirkmo), [np](https:\u002F\u002Fwww.github.com\u002Fnp), [camAtGitHub](https:\u002F\u002Fgithub.com\u002FcamAtGitHub), [keyboardsage](https:\u002F\u002Fgithub.com\u002Fkeyboardsage) [tomas223](https:\u002F\u002Fgithub.com\u002Ftomas223)\n\n## Contributing\nContributions are very welcome!\n\nIf you have ideas or need help to get started join the [Discord server](https:\u002F\u002Fdiscord.gg\u002FfwfYAZWKqu)\n\n![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1090696025162928158?label=Discord&style=for-the-badge)\n","![shell](https:\u002F\u002Fuser-images.githubusercontent.com\u002F99351112\u002F207697723-a3fabc0b-f067-4f83-96fd-1f7225a0bb38.svg)\n\u003Cdiv align=\"center\">\n\u003Cp>\n\n✨加入新的\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FfwfYAZWKqu\">Discord服务器\u003C\u002Fa>,一起为这个项目贡献力量吧！✨\u003C\u002Fp>\n\n\n\u003Ch1>chatGPT-shell-cli\u003C\u002Fh1>\n\n一个简单轻量的 Shell 脚本，无需安装 Python 或 Node.js 即可在终端中使用 OpenAI 的 ChatGPT 和 DALL-E。该脚本使用 OpenAI API 端点 `\u002Fchat\u002Fcompletions` 上的官方 ChatGPT 模型 `gpt-3.5-turbo`。如果您有权限，也可以使用新的 `gpt-4` 模型。  \n此外，该脚本还支持使用所有其他具有 `completions` 端点的 OpenAI 模型，以及用于生成图片的 `images\u002Fgenerations` 端点。\n\u003C\u002Fdiv>\n\n## 功能\n\n- [聊天](#use-the-official-chatgpt-model)：通过 ✨[官方 ChatGPT API](https:\u002F\u002Fopenai.com\u002Fblog\u002Fintroducing-chatgpt-and-whisper-apis)✨ 在终端中与 ChatGPT 互动\n- [生成图片](#commands)：根据文本提示生成图像\n- 查看您的 [聊天历史](#commands)\n- [聊天上下文](#chat-context)：ChatGPT 会记住之前的对话内容\n- 支持通过 [管道](#pipe-mode)、[脚本参数](#script-parameters) 或普通 [聊天模式](#chat-mode) 传递输入提示\n- 列出所有可用的 [OpenAI 模型](#commands)\n- 设置 OpenAI [请求参数](#set-request-parameters)\n- 生成 [命令](#commands)，并在终端中执行\n\n![Screenshot 2023-01-12 at 13 59 08](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_readme_92943aa4df6d.png)\n\n![Screenshot 2023-01-13 at 16 39 27](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_readme_51542ad2c1fa.png)\n\n![faster_convert](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_readme_74979c808ddf.gif)\n\n\n[聊天模式](#chat-mode)：\n```shell\n$ chatgpt\n欢迎使用 chatgpt。您可以用 'exit' 退出。\n\n请输入提示：\n\n```\n\n带有 [初始提示](#set-chat-initial-prompt) 的聊天模式：\n```shell\n$ chatgpt -i \"你是《瑞克和莫蒂》中的瑞克。请用他的说话方式回答问题，并在每次回答中加入侮辱性的笑话和对剧集的引用。\"\n欢迎使用 chatgpt。您可以用 'exit' 退出。\n\n请输入提示：\n用简单的语言解释一下 GPT3 是如何工作的？\n\nchatgpt 哎呀，你想让我用简单的话解释 GPT3 吗？其实它就是一个计算机程序，可以根据你已经说过的词来预测你接下来要说什么。就像在我回答完这个问题后，我就能猜到你会发表一些关于《瑞克和莫蒂》某集的愚蠢评论一样。\n\n请输入提示：\n\n```\n\n使用 [管道](#pipe-mode)：\n```shell\necho \"如何在 Ubuntu 上查看正在运行的进程？\" | chatgpt\n```\n使用 [脚本参数](#script-parameters)：\n```shell\nchatgpt -p \"匹配电子邮件地址的正则表达式是什么？\"\n```\n\n\n\n## 快速开始\n\n### 前提条件\n\n此脚本依赖 curl 发送 API 请求，并使用 jq 解析 JSON 响应。\n\n* [curl](https:\u002F\u002Fwww.curl.se)\n  ```sh\n  brew install curl\n  ```\n* [jq](https:\u002F\u002Fstedolan.github.io\u002Fjq\u002F)\n  ```sh\n  brew install jq\n  ```\n* 一个 OpenAI API 密钥。请在 [OpenAI](https:\u002F\u002Fbeta.openai.com\u002Faccount\u002Fapi-keys) 创建账户并获取免费的 API 密钥。\n\n* 您还可以选择安装 [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow)，以 Markdown 格式渲染响应。\n\n### 安装\n\n要安装，请在终端中运行以下命令，并在提示时提供您的 OpenAI API 密钥。\n   \n   ```sh\n   curl -sS https:\u002F\u002Fraw.githubusercontent.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fmain\u002Finstall.sh | sudo -E bash\n   ```\n   \n#### ArchLinux\n\n如果您使用的是 ArchLinux，可以通过以下命令安装 [AUR 包](https:\u002F\u002Faur.archlinux.org\u002Fpackages\u002Fchatgpt-shell-cli)：\n  \n  ```\n  paru -S chatgpt-shell-cli\n  ```\n\n### 手动安装\n\n如果您想手动安装，只需执行以下步骤：\n\n  - 将 `chatgpt.sh` 文件下载到您希望存放的目录中。\n  - 将 `chatgpt.sh` 的路径添加到您的 `$PATH` 中。您可以通过在 shell 配置文件中添加以下行来实现：`export PATH=$PATH:\u002Fpath\u002Fto\u002Fchatgpt.sh`\n  - 将 OpenAI API 密钥添加到您的 shell 配置文件中，方法是添加一行：`export OPENAI_KEY=your_key_here`\n  - 如果您使用 iTerm 并希望在终端中查看图片，可以安装 [imgcat](https:\u002F\u002Fiterm2.com\u002Futilities\u002Fimgcat)。\n\n## 使用方法\n\n### 启动\n\n#### 聊天模式\n  - 您可以在任何地方使用 `chatgpt` 命令来运行脚本。默认情况下，脚本使用 `gpt-3.5-turbo` 模型。\n#### 管道模式\n  - 您也可以使用管道模式：`echo \"获取昨天创建的所有 PDF 文件的命令是什么？\" | chatgpt`\n#### 脚本参数\n  - 您还可以将提示作为命令行参数传递：`chatgpt -p \"匹配电子邮件地址的正则表达式是什么？\"`\n\n### 命令\n\n  - `image:` 若要生成图片，只需在提示前加上 `image:`。\n    如果您使用 iTerm，可以直接在终端中查看图片。否则，脚本会提示您在浏览器中打开图片。\n  - `history` 若要查看聊天历史，请输入 `history`。\n  - `models` 若要获取 OpenAI API 上可用的模型列表，请输入 `models`。\n  - `model:` 若要查看特定模型的所有信息，只需在提示前加上 `model:`，然后输入模型的 ID（如模型列表中所示）。例如：`model:text-babbage:001` 将为您提供有关 `text-babbage:001` 模型的所有字段。\n  - `command:` 若要获得具有指定功能的命令并执行它，只需输入 `command:`，然后说明您想要实现的目标。脚本始终会询问您是否要执行该命令。例如：`command: 显示当前目录中所有代码行数超过 150 行的文件`\n  *如果某个命令会修改您的文件系统或下载外部文件，脚本会在执行前显示警告。*\n\n### 聊天上下文\n\n  - 对于不支持 OpenAI API 聊天上下文的 `gpt-3.5-turbo` 和 `gpt-4` 以外的其他模型，您可以使用本脚本内置的聊天上下文功能。启用聊天上下文模式后，模型将记住您之前的提问和回答，这样您就可以提出后续问题。在聊天上下文中，模型会收到一条提示，表明其身份为 ChatGPT，并且知道当前日期以及它所训练的数据截止至 2021 年。要启用此模式，请使用 `-c` 或 `--chat-context` 参数启动脚本。例如：`chatgpt --chat-context`，然后开始聊天。\n\n#### 设置初始聊天提示\n  - 您可以设置自己的初始聊天提示，以便在聊天上下文模式下使用。初始提示将在每次请求时与您的常规提示一起发送，从而使 OpenAI 模型“保持角色一致性”。要设置自定义的初始聊天提示，请使用 `-i` 或 `--init-prompt` 参数，后接您的初始提示，例如：`chatgpt -i \"你是《瑞克和莫蒂》中的瑞克，请在回答中引用剧集内容。\"`\n  - 您还可以通过 `--init-prompt-from-file` 参数从文件中设置初始聊天提示，例如：`chatgpt --init-prompt-from-file myprompt.txt`\n  \n  *当您设置初始提示时，无需启用聊天上下文模式。*\n\n### 使用官方 ChatGPT 模型\n\n  - 启动脚本时默认使用的模型是 `gpt-3.5-turbo`。\n\n### 使用 GPT-4\n  - 如果您有 GPT-4 模型的访问权限，可以通过将模型设置为 `gpt-4` 来使用它，即 `chatgpt --model gpt-4`。\n\n### 设置请求参数\n\n  - 要设置请求参数，您可以这样启动脚本：`chatgpt --temperature 0.9 --model text-babbage:001 --max-tokens 100 --size 1024x1024`\n  \n    可用的参数包括：\n      - 温度，`-t` 或 `--temperature`\n      - 模型，`-m` 或 `--model`\n      - 最大 token 数量，`--max-tokens`\n      - 图像尺寸，`-s` 或 `--size`（OpenAI API 接受的尺寸为 256x256、512x512、1024x1024）\n      - 提示词，`-p` 或 `--prompt`\n      - 从您文件系统中的文件读取提示词，`--prompt-from-file`\n      \n    如需了解更多关于这些参数的信息，您可以查看 [API 文档](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fapi-reference\u002Fcompletions\u002Fcreate)。\n    \n    \n## 贡献者\n:pray: 感谢所有使用、测试、提交问题、拉取请求以及提出改进建议的朋友们：\n\n[pfr-dev](https:\u002F\u002Fwww.github.com\u002Fpfr-dev), [jordantrizz](https:\u002F\u002Fwww.github.com\u002Fjordantrizz), [se7en-x230](https:\u002F\u002Fwww.github.com\u002Fse7en-x230), [mountaineerbr](https:\u002F\u002Fwww.github.com\u002Fmountaineerbr), [oligeo](https:\u002F\u002Fwww.github.com\u002Foligeo), [biaocy](https:\u002F\u002Fwww.github.com\u002Fbiaocy), [dmd](https:\u002F\u002Fwww.github.com\u002Fdmd), [goosegit11](https:\u002F\u002Fwww.github.com\u002Fgoosegit11), [dilatedpupils](https:\u002F\u002Fwww.github.com\u002Fdilatedpupils), [direster](https:\u002F\u002Fwww.github.com\u002Fdirester), [rxaviers](https:\u002F\u002Fwww.github.com\u002Frxaviers), [Zeioth](https:\u002F\u002Fwww.github.com\u002FZeioth), [edshamis](https:\u002F\u002Fwww.github.com\u002Fedshamis), [nre-ableton](https:\u002F\u002Fwww.github.com\u002Fnre-ableton), [TobiasLaving](https:\u002F\u002Fwww.github.com\u002FTobiasLaving), [RexAckermann](https:\u002F\u002Fwww.github.com\u002FRexAckermann), [emirkmo](https:\u002F\u002Fwww.github.com\u002Femirkmo), [np](https:\u002F\u002Fwww.github.com\u002Fnp), [camAtGitHub](https:\u002F\u002Fgithub.com\u002FcamAtGitHub), [keyboardsage](https:\u002F\u002Fgithub.com\u002Fkeyboardsage) [tomas223](https:\u002F\u002Fgithub.com\u002Ftomas223)\n\n## 参与贡献\n我们非常欢迎您的参与！\n\n如果您有任何想法或需要帮助开始，请加入我们的 [Discord 服务器](https:\u002F\u002Fdiscord.gg\u002FfwfYAZWKqu)。\n\n![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1090696025162928158?label=Discord&style=for-the-badge)","# chatGPT-shell-cli 快速上手指南\n\n`chatGPT-shell-cli` 是一个轻量级的 Shell 脚本，允许你在终端中直接使用 OpenAI 的 ChatGPT（包括 gpt-3.5-turbo 和 gpt-4）及 DALL-E 图像生成功能，无需安装 Python 或 Node.js。\n\n## 环境准备\n\n在开始之前，请确保你的系统满足以下要求：\n\n1.  **操作系统**：macOS 或 Linux（包括 ArchLinux）。\n2.  **前置依赖**：\n    *   `curl`：用于发送 API 请求。\n    *   `jq`：用于解析 JSON 响应。\n    *   *(可选)* `glow`：用于在终端中以 Markdown 格式美化输出。\n    *   *(可选，仅限 iTerm2)* `imgcat`：用于直接在终端内预览生成的图片。\n\n**安装依赖命令：**\n\n*   **macOS (使用 Homebrew):**\n    ```sh\n    brew install curl jq glow\n    # 如果使用 iTerm2，还需安装 imgcat\n    brew install --cask iterm2\n    ```\n*   **Linux (以 Ubuntu\u002FDebian 为例):**\n    ```sh\n    sudo apt-get update\n    sudo apt-get install curl jq\n    ```\n*   **ArchLinux:**\n    依赖通常已预装，若缺失请使用 `pacman -S curl jq` 安装。\n\n3.  **OpenAI API Key**：\n    你需要拥有一个有效的 OpenAI API Key。如果没有，请访问 [OpenAI 官网](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys) 注册并获取。\n\n## 安装步骤\n\n### 方法一：一键自动安装（推荐）\n\n运行以下命令，脚本会自动下载并配置环境变量。执行过程中会提示你输入 OpenAI API Key。\n\n```sh\ncurl -sS https:\u002F\u002Fraw.githubusercontent.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fmain\u002Finstall.sh | sudo -E bash\n```\n\n### 方法二：ArchLinux 用户\n\n如果你使用的是 ArchLinux，可以通过 AUR 安装：\n\n```sh\nparu -S chatgpt-shell-cli\n```\n\n### 方法三：手动安装\n\n如果不想使用自动脚本，可按以下步骤操作：\n\n1.  下载 `chatgpt.sh` 文件到指定目录。\n2.  将该文件路径添加到 `$PATH` 环境变量中（编辑 `~\u002F.bashrc` 或 `~\u002F.zshrc`）：\n    ```sh\n    export PATH=$PATH:\u002Fpath\u002Fto\u002Fchatgpt.sh\n    ```\n3.  设置 API Key 环境变量：\n    ```sh\n    export OPENAI_KEY=your_key_here\n    ```\n    *(建议将此行也加入 shell 配置文件以便永久生效)*\n\n## 基本使用\n\n安装完成后，你可以在终端的任何位置使用 `chatgpt` 命令。默认使用的模型是 `gpt-3.5-turbo`。\n\n### 1. 交互聊天模式 (Chat Mode)\n\n直接输入命令进入交互式对话：\n\n```shell\nchatgpt\n```\n\n**示例会话：**\n```shell\n$ chatgpt\nWelcome to chatgpt. You can quit with 'exit'.\n\nEnter a prompt:\n如何用 Python 读取 CSV 文件？\n\nchatgpt  你可以使用 pandas 库... (此处为 AI 回复)\n\nEnter a prompt:\n```\n\n### 2. 管道模式 (Pipe Mode)\n\n将其他命令的输出通过管道传递给 `chatgpt` 进行处理：\n\n```shell\necho \"如何在 Ubuntu 上查看正在运行的进程？\" | chatgpt\n```\n\n或者结合错误日志分析：\n```shell\ncat error.log | chatgpt\n```\n\n### 3. 命令行参数模式\n\n直接通过 `-p` 参数传递提示词，适合在脚本中使用：\n\n```shell\nchatgpt -p \"匹配电子邮件地址的正则表达式是什么？\"\n```\n\n### 4. 常用功能指令\n\n在交互模式中，你可以使用以下特殊指令：\n\n*   **生成图片**：以 `image:` 开头。\n    ```text\n    image: 一只在太空中喝咖啡的猫\n    ```\n    *(如果在 iTerm2 中且安装了 imgcat，图片将直接显示；否则会在浏览器中打开)*\n\n*   **生成并执行终端命令**：以 `command:` 开头。\n    ```text\n    command: 列出当前目录下代码行数超过 150 行的所有文件\n    ```\n    *(脚本会生成命令并询问是否执行，涉及文件系统修改时会发出警告)*\n\n*   **查看历史**：输入 `history`。\n*   **查看可用模型**：输入 `models`。\n\n### 进阶技巧\n\n*   **使用 GPT-4** (需有访问权限)：\n    ```shell\n    chatgpt --model gpt-4\n    ```\n*   **设定角色\u002F初始提示词**：\n    ```shell\n    chatgpt -i \"你是瑞克（Rick and Morty），请用他的语气回答，并在每个回答中包含对剧集的引用和讽刺笑话。\"\n    ```\n*   **开启上下文记忆** (针对非原生支持上下文的模型)：\n    ```shell\n    chatgpt --chat-context\n    ```","一位 Linux 系统管理员正在排查生产服务器的异常日志，需要快速生成分析脚本并查询复杂的命令语法。\n\n### 没有 chatGPT-shell-cli 时\n- **环境依赖繁琐**：为了调用 AI 接口，必须先安装 Python 或 Node.js 环境，并配置虚拟环境和依赖包，在受限的服务器环境中往往无法执行。\n- **工作流频繁中断**：遇到不懂的正则或命令参数时，需手动切换浏览器搜索或打开网页版 ChatGPT，复制粘贴内容严重打断排查思路。\n- **上下文难以延续**：在网页端多轮对话后，回到终端时容易忘记之前的代码逻辑，导致生成的脚本与当前终端环境不兼容。\n- **自动化能力弱**：无法直接将 `grep` 或 `awk` 的输出通过管道传递给 AI 进行即时分析，必须先将日志保存为文件再上传处理。\n\n### 使用 chatGPT-shell-cli 后\n- **零依赖即刻启动**：仅需 `curl` 和 `jq` 这两个 Linux 标配工具，无需安装任何重型运行时，一条命令即可在任意终端直接对话。\n- **终端内无缝闭环**：直接在命令行输入 `chatgpt -p \"如何查找占用端口 8080 的进程\"`，结果即时返回，全程无需离开终端界面。\n- **智能上下文记忆**：支持多轮对话模式，AI 能记住前一次生成的脚本逻辑，可根据管理员的反馈连续优化代码，确保方案落地。\n- **强大的管道集成**：可直接执行 `cat error.log | chatgpt \"分析错误原因\"`，将实时日志流喂给 AI 并获得诊断建议，极大提升排错效率。\n\nchatGPT-shell-cli 将大模型能力原生融入命令行工作流，让开发者在不切换上下文的前提下实现“所想即所得”的高效运维。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F0xacx_chatGPT-shell-cli_51542ad2.png","0xacx",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002F0xacx_5bf073a4.png","\"I watched C-beams glitter in the dark near the Tannhäuser Gate.\" ","127.0.0.1","https:\u002F\u002Fgithub.com\u002F0xacx",[80],{"name":81,"color":82,"percentage":83},"Shell","#89e051",100,1239,166,"2026-03-29T23:29:24","MIT","Linux, macOS","不需要 GPU","未说明",{"notes":92,"python":93,"dependencies":94},"该工具是一个轻量级 Shell 脚本，无需安装 Python 或 Node.js。必须拥有 OpenAI API 密钥。可选安装 'glow' 以在终端渲染 Markdown 格式回复，若在 iTerm2 中查看生成的图片需安装 'imgcat'。Arch Linux 用户可通过 AUR 安装。","不需要 Python",[95,96],"curl","jq",[27,15,36],[99,100,101,102,103,104,105,106,107,108,109,110,111,112],"chatbot","chatgpt","chatgpt-api","chatgpt-api-wrapper","terminal","shell","shell-script","bash","zsh","cli","dall-e","dalle2","image-generation","dalle","2026-03-27T02:49:30.150509","2026-04-20T19:21:26.178299",[116,121,126,131,136,141,146],{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},45525,"如何在 Arch Linux (AUR) 上安装此工具？","Arch 官方仓库不包含此包，需通过 AUR (Arch User Repository) 安装。Arch 默认不提供 AUR 助手，用户需自行选择安装 paru、yay 或其他 AUR 助手。安装命令示例（使用 yay）：`yay -S chatgpt-shell-cli`。注意：不要尝试使用 pacman 直接安装第三方 AUR 包。","https:\u002F\u002Fgithub.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fissues\u002F47",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},45526,"遇到 'invalid_request_error: We could not parse the JSON body' 错误怎么办？","这通常是由于本地环境残留文件或配置冲突导致的“用户端问题”，而非脚本本身的 Bug。解决方案是彻底清理所有相关版本（包括 CLI、Git 克隆文件夹等），重启系统，然后重新从 AUR 或源码安装。如果使用的是 FISH shell，尝试改用 Bash 运行（例如：`bash chatgpt \u003Ccommand>`），因为某些命令在 FISH 中可能不兼容。","https:\u002F\u002Fgithub.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fissues\u002F94",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},45527,"运行时报错 'fold: illegal width value' 如何解决？","此错误通常发生在管道模式（pipe mode）下，原因是 $COLUMNS 变量未正确初始化。解决方法有两种：1. 移除脚本中涉及列宽变量的相关代码；2. 显式使用 Bash 运行脚本，特别是在使用 Zsh 时，因为 Zsh 中可能缺少 `shopt` 命令。尝试执行：`bash chatgpt.sh \u003C你的命令>`。","https:\u002F\u002Fgithub.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fissues\u002F107",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},45528,"使用 curl 管道安装脚本时在 Zsh 中挂起（suspended）怎么办？","这是 Zsh 与 sudo 交互时的已知问题。不要直接使用 `curl ... | sudo bash`。解决方法是先将安装脚本保存为本地文件，然后再执行。步骤如下：\n1. 下载脚本：`curl -sS https:\u002F\u002Fraw.githubusercontent.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fmain\u002Finstall.sh -o install.sh`\n2. 运行安装：`sudo -E bash .\u002Finstall.sh`","https:\u002F\u002Fgithub.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fissues\u002F51",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},45529,"为什么无法像网页版 ChatGPT 那样进行多轮对话（追问）？","本脚本使用的是 OpenAI 官方 API（Completions 或 Chat Completions），每次请求默认是独立的，不像网页版 ChatGPT 那样自动维护上下文历史。若要实现追问功能，需要脚本手动管理上下文历史并发送给 API。此外，官方 API 与网页版使用的后端逻辑有所不同。如果需要完全一致的体验，可能需要寻找非官方的 API 客户端（如基于 Python 或 JS 的项目），但它们稳定性较差且可能违反服务条款。","https:\u002F\u002Fgithub.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fissues\u002F16",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},45530,"如何配置和验证 OpenAI API Key 是否正确？","不需要在脚本中专门设置 'prompt'，提示词是在脚本运行时直接输入的。关键在于正确配置 API Key。请确保在 `~\u002F.profile` 或 `~\u002F.bashrc` 中导出变量：`export OPENAI_API_KEY='你的密钥'`（加不加引号通常都可以）。验证方法是在终端直接使用 curl 测试 API 连通性：\n`curl https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fcompletions -sS -H 'Content-Type: application\u002Fjson' -H \"Authorization: Bearer 你的密钥\" -d '{\"model\": \"text-davinci-003\", \"prompt\": \"Hello\", \"max_tokens\": 5}'`\n如果 curl 能返回正常 JSON 响应，则说明密钥和网络配置无误。","https:\u002F\u002Fgithub.com\u002F0xacx\u002FchatGPT-shell-cli\u002Fissues\u002F2",{"id":147,"question_zh":148,"answer_zh":149,"source_url":125},45531,"这个工具有版本号吗？如何查看当前版本？","目前该工具没有版本号（即没有 --version 命令）。所有更改都保持向后兼容，仓库中的代码始终是最新版本。由于这是一个单文件脚本，维护者认为引入版本管理和发布流程没有必要。除非未来出现破坏性更新，否则不会添加版本区分。用户只需定期拉取最新代码即可获取新功能。",[]]