[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Pythagora-io--pythagora":3,"tool-Pythagora-io--pythagora":62},[4,18,26,36,46,54],{"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":10,"last_commit_at":24,"category_tags":25,"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":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"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 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"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,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"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":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":76,"owner_url":77,"languages":78,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":32,"env_os":91,"env_gpu":92,"env_ram":92,"env_deps":93,"category_tags":99,"github_topics":100,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":110,"updated_at":111,"faqs":112,"releases":152},8970,"Pythagora-io\u002Fpythagora","pythagora","Generate automated tests for your Node.js app via LLMs without developers having to write a single line of code.","Pythagora 是一款专为 Node.js 应用设计的自动化测试生成工具，旨在利用大语言模型（如 GPT-4）帮助开发者无需编写任何代码即可创建单元测试。它主要解决了手动编写测试用例耗时费力、覆盖率不足以及难以发现隐蔽边界条件错误等痛点，让测试工作变得更加高效和全面。\n\n这款工具非常适合希望提升代码质量但受限于时间的 Node.js 开发者，尤其是那些想要快速为现有函数补充测试或扩展测试覆盖率的团队。用户只需在命令行输入简单指令并指定函数名，Pythagora 便能自动完成任务。\n\n其独特的技术亮点在于结合了抽象语法树（AST）解析技术与大模型能力：它不仅分析目标函数，还能智能识别并提取该函数内部调用的所有相关依赖函数，将这些上下文信息一并发送给服务端，从而生成逻辑严密、高度相关的测试用例。在实际案例中，Pythagora 曾成功为知名库 Lodash 生成了超过 1600 个测试，并发现了多个潜在漏洞。需要注意的是，该项目目前标记为已弃用，核心团队正全力开发其继任者 GPT Pilot，但其展现的“全自动测试生成”理念依然具有重要的参考价值。","\u003Ch1 align=\"center\">This repo is deprecated - we're working on \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fgpt-pilot\">GPT Pilot\u003C\u002Fh1>\n\n\n\u003Cp align=center>\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_59d5ae1eec05.png\">\n    \u003Cimg height=\"200px\" alt=\"Pythagora Logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_59d5ae1eec05.png\">\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\u003Ch2 align=\"center\">Pythagora is on a mission to make automated tests\u003Cbr>🤖 fully autonomous 🤖\u003C\u002Fh2>\n\u003Ch3 align=\"center\">Just run one command and watch the tests being created with GPT-4\u003C\u002Fh3>\n\u003Cbr>\n\nThe following details are for generating unit tests. To view the docs on how to generate **integration tests**, click [here](.\u002Fsrc\u002Fdocs\u002Fintegration\u002FREADME.md).\n\n\u003Cbr>\n\n# \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_fe44a75d62ae.png\" alt=\"Visual Studio Code Logo\" width=\"24\" height=\"24\"> Visual Studio Code Extension\n\nIf you want to try out Pythagora using Visual Studio Code extension you can download it \u003Ca href=\"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=PythagoraTechnologies.pythagora-vscode-extension\">here\u003C\u002Fa>.\n\n# 🏃💨️ Quickstart\n\nTo install Pythagora run:\n```bash\nnpm i pythagora --save-dev\n```\nThen, [add your API key](#%EF%B8%8F-config) and you're ready to get tests generated. After that, just run the following command from the root directory of your repo:\n\n```bash\nnpx pythagora --unit-tests --func \u003CFUNCTION_NAME>\n```\n\nWhere `\u003CFUNCTION_NAME>` is the name of the function you want to generate unit tests for. Just make sure that your function is exported from a file. You can see other options like generating tests for multiple files or folders [below in the Options section](#-options).\n\n\u003Cbr>\u003Cbr>\nIf you wish to expand your current test suite with more tests to get better code coverage you can run:\n\n```bash\nnpx pythagora --expand-unit-tests --path \u003CPATH_TO_YOUR_TEST_SUITE>\n```\nfor more details on expanding existing tests see [below in the Expanding existing tests section](#-expand-existing-tests).\n\n\u003Cbr>\u003Cbr>\n\n**NOTE:** on Windows make sure to run all commands using `Git Bash` and not `Power Shell` or anything similiar\n\n\u003Cbr>\n\n# 🎞 Demo\n\nHere are some demo videos that can help you get started.\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FNNd08XgFFw4\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_605f312011b9.gif\" alt=\"Pythagora Alpha Demo\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003Cp align=center>\n  \u003Ca target=\"_blank\" href=\"https:\u002F\u002Fyoutu.be\u002FNNd08XgFFw4\">Pythagora Unit Tests Demo (2 min)\u003C\u002Fa>\n\u003C\u002Fp>\n\u003Cbr>\n\n# 🔎 Examples\n\nHere are examples of open sourced repositories that we forked and created tests with Pythagora so you can easily see it in action. \n\n- [Lodash](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora-demo-lodash)\n  - 📝 1604 tests generated\n  - 🐞 11 bugs found (1 edge case and 10 bugs)\n  - ⏳️ 4 hour run time\n\n  ![lodash pythagora tests results](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_30da7efd2b18.png)\n\n\n- [node-fs-extra](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora-demo-node-fs-extra)\n  - 📝 98 tests generated\n  - 🐞 2 bugs found\n  - ⏳️ 30 minutes run time\n \n  ![node-fs-extra pythagora tests results](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_2456768d6581.png)\n\n\u003Cbr>\n\n# 🔬 How does it work?\nWhen Pythagora generates unit tests, it uses the following approach:\n1. Find the function you want to test\n2. Find all the functions that are called from within that function\n  - This is done with AST (Abstract Syntax Tree) parsing\n3. Send the function you want to test and all the related functions to the Pythagora server which then generates the unit tests with GPT-4\n  - the Pythagora server is open sourced as well [here](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fapi)\n  - You can find the prompts [in this folder](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fapi\u002Ftree\u002Fmain\u002Fprompts) on the Pythagora server\n    \n\u003Cbr>\n\n# 📈 Expand existing tests\nIf you already have generated tests for your codebase but you just want to increase your code coverage or cover more edge cases, simply run:\n\n```bash\nnpx pythagora --expand-unit-tests --path \u003CPATH_TO_YOUR_TEST_SUITE>\n```\nWhen running command `PATH_TO_YOUR_TEST_SUITE` can be path to a single test file or to a folder and all test files inside of that folder will be processed and expanded.\n\nThat's all, enjoy your new code coverage!\n\n# 📖 Options\n- To generate unit tests for **one single function**, run:\n\n    ```bash\n    npx pythagora --unit-tests --func \u003CFUNCTION_NAME>\n    ```\n\n- To generate unit tests for **one single function** in a specific file, run:\n\n    ```bash\n    npx pythagora --unit-tests --func \u003CFUNCTION_NAME> --path .\u002Fpath\u002Fto\u002Ffile.js\n    ```\n\n- To generate unit tests for **all functions in a file**, run:\n\n    ```bash\n    npx pythagora --unit-tests --path .\u002Fpath\u002Fto\u002Ffile.js\n    ``` \n\n- To generate unit tests for **all functions in all files in a folder**, run:\n\n    ```bash\n    npx pythagora --unit-tests --path .\u002Fpath\u002Fto\u002Ffolder\u002F\n    ```\n\n\u003Cbr>\n\n# ⚙️ Config\nPythagora uses GPT-4 to generate tests so you either need to have OpenAI API Key or Pythagora API Key. You can get your [Pythagora API Key here](https:\u002F\u002Fmailchi.mp\u002Ff4f4d7270a7a\u002Fapi-waitlist) or [OpenAI API Key here](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys). Once you have it, add it to Pythagora with:\n```bash\nnpx pythagora --config --pythagora-api-key \u003CAPI_KEY>\n```\nor\n```bash\nnpx pythagora --config --openai-api-key \u003CAPI_KEY>\n```\n\u003Cbr>\n\n# ▶️ How to run unit tests\nTo run the generated tests, you can simply run\n```bash\nnpx jest .\u002Fpythagora_tests\u002F\n```\nor to run tests from a specific file or a folder, run `npx jest \u003CPATH_TO_FILE_OR_FOLDER>`. Currently, Pythagora supports only generating Jest tests but if you would like it to generate tests in other frameworks, let us know at [hi@pythagora.ai](mailto:hi@pythagora.ai).\n\n\u003Cbr>\n\n# 📌️ Notes\n\n- The best unit tests that Pythagora generates are the ones that are standalone functions (eg. helpers). Basically, the parts of the code that actually can be unit tested. For example, take a look at this [Pythagora file](.\u002Fsrc\u002Futils\u002Fcommon.js) - it contains helper functions that are a perfect candidate for unit tests. When we ran `npx pythagora --unit-tests --path .\u002Fsrc\u002Futils\u002Fcommon.js` - it generated 145 tests from which only 17 failed. What is amazing is that only 6 tests failed because they were incorrectly written and the other 11 tests caught bugs in the code itself. You can view these tests [here](.\u002Fpythagora_tests\u002Funit\u002Fsrc\u002Futils\u002Fcommon\u002F).\n- We don't store any of your code on our servers. However, the code is being sent to GPT and hence OpenAI. Here is their [privacy policy](https:\u002F\u002Fopenai.com\u002Fpolicies\u002Fprivacy-policy).\n- a function you want to generate tests for needs to be exported from the file. For example, if you have a file like this:\n  ```javascript\n  function mongoObjToJson(originalObj) {\n      ...\n  }\n  \n  module.exports = {\n      mongoObjToJson\n  };\n  ```\n  \n  Then, to generate unit tests for the `mongoObjToJson` function, you can run:\n  ```bash\n  npx pythagora --unit-tests --func mongoObjToJson\n  ```\n\n\u003Cbr>\n\n# 🤔️ FAQ\n\n- **How accurate are these tests?**\n  - The best unit tests that Pythagora generates are the ones that are standalone functions. Basically, the parts of the code that actually can be unit tested. For example, take a look at this [Pythagora file](.\u002Fsrc\u002Futils\u002Fcommon.js) - it contains helper functions that are a perfect candidate for unit tests. When we ran `npx pythagora --unit-tests --path .\u002Fsrc\u002Futils\u002Fcommon.js` - it generated 145 tests from which only 17 failed. What is amazing is that only 6 tests failed because they were incorrectly written and the other 11 tests caught bugs in the code itself. You can view these tests [here](.\u002Fpythagora_tests\u002Funit\u002Fsrc\u002Futils\u002Fcommon\u002F).\n  - Here are a couple of observations we've made while testing Pythagora:\n    1. It does a great job at testing edge cases. For many repos we created tests for, the tests found bugs right away by testing edge cases.\n    2. It works best for testing standalone helper functions. For example, we tried generating tests for the Lodash repo and it create 1000 tests from which only 40 needed additional review. For other, non standalone functions, we're planning to combine recordings from integration tests to generate proper mocks so that should expand Pythagora's test palette.\n    3. It's definitely not perfect but the tests it created I wanted to keep and commit them. So, I encourage you to try it out and see how it works for you. If you do that, please let us know via [email](mailto:hi@pythagora.ai) or [Discord](https:\u002F\u002Fdiscord.gg\u002FnpC5TAfj6e). We're super excited to hear how it went for you.\n\u003Cbr>\u003Cbr>\n- **Should I review generated tests?**\n  - Absolutely. As mentioned above, some tests might be incorrectly written so it's best for you to review all tests before committing them. Nevertheless, I think this will save you a lot of time and will help you think about your code in a different way.\n\u003Cbr>\u003Cbr>\n- **Tests help me think about my code - I don't want to generate them automatically**\n    - That's the best thing about Pythagora - it actually does help you think about the code. Just, you don't need to spend time writing tests. This happened to us, who created Pythagora - we coded it as fast as possible but when we added unit test generation, we realized that it cannot create tests for some functions. So, we refactored the code and made it more modular so that unit tests can be generated for it. \n\u003Cbr>\u003Cbr>\n- **Is Pythagora limited to a specific programming language or framework?**\n  - Pythagora primarily generates unit tests for JavaScript code. However, it's designed to work with code written in JavaScript, TypeScript, and similar languages. If you'd like to see support for other languages or frameworks, please let us know at hi@pythagora.ai.\n\u003Cbr>\u003Cbr>\n\n- **Can Pythagora generate integration tests as well?**\n  - Pythagora is currently focused on generating unit tests. For generating integration tests, you might need to combine the recordings from integration tests to generate proper mocks. We are actively exploring options to expand its capabilities in the future.\n\u003Cbr>\u003Cbr>\n\n- **Is Pythagora compatible with all JavaScript testing frameworks?**\n  - Currently, Pythagora generates tests using the Jest testing framework. While we are open to expanding compatibility to other testing frameworks, Jest is the primary framework supported at the moment. If you have a specific framework in mind, feel free to share your suggestions with us.\n\u003Cbr>\u003Cbr>\n\n- **How does Pythagora handle sensitive or proprietary code?**\n  - Pythagora doesn't store your code on its servers, but it sends code to GPT and OpenAI for test generation. It's essential to review the generated tests, especially if your code contains sensitive or proprietary information, before committing them to your repository. Be cautious when using Pythagora with sensitive code.\n\u003Cbr>\u003Cbr>\n\n- **Is Pythagora suitable for all types of projects?**\n  - Pythagora works best for projects with well-structured code and standalone functions (such as helper functions). It excels at generating tests for these types of code. For more complex or non-standalone functions, manual review and modifications may be necessary.\n\n\n\n# 🏁 Alpha version\nThis is an alpha version of Pythagora. To get an update about the beta release or to give a \u003Cb>suggestion on tech (framework \u002F database) you want Pythagora to support\u003C\u002Fb> you can 👉 \u003Ca href=\"http:\u002F\u002Feepurl.com\u002Fikg_nT\" target=\"_blank\">add your email \u002F comment here\u003C\u002Fa> 👈 .\n\u003Cbr>\n\n# 🔗 Connect with us\n💬 Join the discussion on \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FnpC5TAfj6e\" target=\"_blank\">our Discord server\u003C\u002Fa>.\n\u003Cbr>\u003Cbr>\n📨 Get updates on new features and beta release by \u003Ca href=\"http:\u002F\u002Feepurl.com\u002Fikg_nT\" target=\"_blank\">adding your email here\u003C\u002Fa>.\n\u003Cbr>\u003Cbr>\n🌟 As an open source tool, it would mean the world to us if you starred the Pythagora repo 🌟\n\u003Cbr>\u003Cbr>\n\u003Cbr>\u003Cbr>\n\n\u003Cbr>\u003Cbr>\n\n","\u003Ch1 align=\"center\">此仓库已弃用 - 我们正在开发 \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fgpt-pilot\">GPT Pilot\u003C\u002Fh1>\n\n\n\u003Cp align=center>\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_59d5ae1eec05.png\">\n    \u003Cimg height=\"200px\" alt=\"Pythagora Logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_59d5ae1eec05.png\">\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\u003Ch2 align=\"center\">Pythagora 致力于让自动化测试\u003Cbr>🤖 完全自主 🤖\u003C\u002Fh2>\n\u003Ch3 align=\"center\">只需运行一条命令，即可观看 GPT-4 自动生成测试用例\u003C\u002Fh3>\n\u003Cbr>\n\n以下内容用于生成单元测试。如需查看关于如何生成**集成测试**的文档，请点击[这里](.\u002Fsrc\u002Fdocs\u002Fintegration\u002FREADME.md)。\n\n\u003Cbr>\n\n# \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_fe44a75d62ae.png\" alt=\"Visual Studio Code Logo\" width=\"24\" height=\"24\"> Visual Studio Code 扩展\n\n如果您想通过 Visual Studio Code 扩展试用 Pythagora，可以\u003Ca href=\"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=PythagoraTechnologies.pythagora-vscode-extension\">在此处\u003C\u002Fa>下载。\n\n# 🏃💨️ 快速入门\n\n要安装 Pythagora，请运行：\n```bash\nnpm i pythagora --save-dev\n```\n然后，[添加您的 API 密钥](#%EF%B8%8F-config)，您就可以开始生成测试了。之后，只需在您的仓库根目录下运行以下命令：\n\n```bash\nnpx pythagora --unit-tests --func \u003CFUNCTION_NAME>\n```\n\n其中 `\u003CFUNCTION_NAME>` 是您想要为其生成单元测试的函数名称。请确保该函数已从文件中导出。您可以在下方的“选项”部分查看更多选项，例如为多个文件或文件夹生成测试。\u003Ca name=\"-options\">\u003C\u002Fa>\n\n\u003Cbr>\u003Cbr>\n如果您希望扩展当前的测试套件以获得更好的代码覆盖率，可以运行：\n\n```bash\nnpx pythagora --expand-unit-tests --path \u003CPATH_TO_YOUR_TEST_SUITE>\n```\n有关扩展现有测试的更多详细信息，请参阅下方的“扩展现有测试”部分。\u003Ca name=\"-expand-existing-tests\">\u003C\u002Fa>\n\n\u003Cbr>\u003Cbr>\n\n**注意：** 在 Windows 系统上，请务必使用 `Git Bash` 运行所有命令，而不是 `PowerShell` 或其他类似工具。\n\n\u003Cbr>\n\n# 🎞 演示\n\n以下是一些可以帮助您入门的演示视频。\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FNNd08XgFFw4\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_605f312011b9.gif\" alt=\"Pythagora Alpha Demo\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003Cp align=center>\n  \u003Ca target=\"_blank\" href=\"https:\u002F\u002Fyoutu.be\u002FNNd08XgFFw4\">Pythagora 单元测试演示（2 分钟）\u003C\u002Fa>\n\u003C\u002Fp>\n\u003Cbr>\n\n# 🔎 示例\n\n以下是一些我们分叉并使用 Pythagora 生成测试的开源仓库示例，方便您直观地了解其实际效果。\n\n- [Lodash](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora-demo-lodash)\n  - 📝 生成 1604 个测试用例\n  - 🐞 发现 11 个缺陷（1 个边界条件和 10 个 bug）\n  - ⏳️ 运行时长 4 小时\n\n  ![lodash pythagora 测试结果](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_30da7efd2b18.png)\n\n\n- [node-fs-extra](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora-demo-node-fs-extra)\n  - 📝 生成 98 个测试用例\n  - 🐞 发现 2 个缺陷\n  - ⏳️ 运行时长 30 分钟\n \n  ![node-fs-extra pythagora 测试结果](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_readme_2456768d6581.png)\n\n\u003Cbr>\n\n# 🔬 工作原理\n当 Pythagora 生成单元测试时，它采用以下流程：\n1. 找到您想要测试的函数\n2. 查找该函数内部调用的所有其他函数\n  - 这一步通过 AST（抽象语法树）解析完成\n3. 将您想要测试的函数及其相关函数发送到 Pythagora 服务器，由服务器利用 GPT-4 生成单元测试\n  - Pythagora 服务器也是开源的，可在[此处](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fapi)找到\n  - 您可以在 Pythagora 服务器上的[此文件夹](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fapi\u002Ftree\u002Fmain\u002Fprompts)中找到相关提示词\n\n\u003Cbr>\n\n# 📈 扩展现有测试\n如果您已经为代码库生成了测试，但只是想提高代码覆盖率或覆盖更多边界条件，只需运行：\n\n```bash\nnpx pythagora --expand-unit-tests --path \u003CPATH_TO_YOUR_TEST_SUITE>\n```\n运行此命令时，`PATH_TO_YOUR_TEST_SUITE` 可以是单个测试文件的路径，也可以是文件夹的路径，文件夹内的所有测试文件都将被处理并扩展。\n\n就这样，尽情享受您提升后的代码覆盖率吧！\n\n# 📖 选项\n- 要为**单个函数**生成单元测试，请运行：\n\n    ```bash\n    npx pythagora --unit-tests --func \u003CFUNCTION_NAME>\n    ```\n\n- 要为特定文件中的**单个函数**生成单元测试，请运行：\n\n    ```bash\n    npx pythagora --unit-tests --func \u003CFUNCTION_NAME> --path .\u002Fpath\u002Fto\u002Ffile.js\n    ```\n\n- 要为**文件中的所有函数**生成单元测试，请运行：\n\n    ```bash\n    npx pythagora --unit-tests --path .\u002Fpath\u002Fto\u002Ffile.js\n    ```\n\n- 要为**文件夹中所有文件中的所有函数**生成单元测试，请运行：\n\n    ```bash\n    npx pythagora --unit-tests --path .\u002Fpath\u002Fto\u002Ffolder\u002F\n    ```\n\n\u003Cbr>\n\n# ⚙️ 配置\nPythagora 使用 GPT-4 生成测试，因此您需要拥有 OpenAI API 密钥或 Pythagora API 密钥。您可以在[此处](https:\u002F\u002Fmailchi.mp\u002Ff4f4d7270a7a\u002Fapi-waitlist)获取 Pythagora API 密钥，或在[此处](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys)获取 OpenAI API 密钥。获取密钥后，可通过以下命令将其添加到 Pythagora 中：\n```bash\nnpx pythagora --config --pythagora-api-key \u003CAPI_KEY>\n```\n或者\n```bash\nnpx pythagora --config --openai-api-key \u003CAPI_KEY>\n```\n\u003Cbr>\n\n# ▶️ 如何运行单元测试\n要运行生成的测试，您可以简单地执行：\n```bash\nnpx jest .\u002Fpythagora_tests\u002F\n```\n或者，如果要运行特定文件或文件夹中的测试，可以执行 `npx jest \u003CPATH_TO_FILE_OR_FOLDER>`。目前，Pythagora 仅支持生成 Jest 测试，但如果您希望它能够生成其他框架的测试，请通过 [hi@pythagora.ai](mailto:hi@pythagora.ai) 告知我们。\n\n\u003Cbr>\n\n# 📌️ 注意事项\n\n- Pythagora 生成的最佳单元测试是那些独立的函数（例如工具函数）。基本上，这些就是真正可以进行单元测试的代码部分。比如，请查看这个 [Pythagora 文件](.\u002Fsrc\u002Futils\u002Fcommon.js)——它包含了一些非常适合编写单元测试的工具函数。当我们运行 `npx pythagora --unit-tests --path .\u002Fsrc\u002Futils\u002Fcommon.js` 时，它生成了 145 个测试，其中只有 17 个失败。令人惊喜的是，这 17 个失败中，只有 6 个是因为测试本身写得不正确，而另外 11 个则真正发现了代码中的 bug。你可以在这里查看这些测试 [这里](.\u002Fpythagora_tests\u002Funit\u002Fsrc\u002Futils\u002Fcommon\u002F)。\n- 我们不会在服务器上存储你的任何代码。然而，代码会被发送到 GPT 和 OpenAI。以下是他们的 [隐私政策](https:\u002F\u002Fopenai.com\u002Fpolicies\u002Fprivacy-policy)。\n- 你想要为其生成测试的函数需要从文件中导出。例如，如果你有一个这样的文件：\n  ```javascript\n  function mongoObjToJson(originalObj) {\n      ...\n  }\n  \n  module.exports = {\n      mongoObjToJson\n  };\n  ```\n  \n  那么，要为 `mongoObjToJson` 函数生成单元测试，你可以运行：\n  ```bash\n  npx pythagora --unit-tests --func mongoObjToJson\n  ```\n\n\u003Cbr>\n\n# 🤔️ 常见问题解答\n\n- **这些测试有多准确？**\n  - Pythagora 生成的最佳单元测试是那些独立的函数。基本上，这些就是真正可以进行单元测试的代码部分。比如，请查看这个 [Pythagora 文件](.\u002Fsrc\u002Futils\u002Fcommon.js)——它包含了一些非常适合编写单元测试的工具函数。当我们运行 `npx pythagora --unit-tests --path .\u002Fsrc\u002Futils\u002Fcommon.js` 时，它生成了 145 个测试，其中只有 17 个失败。令人惊喜的是，这 17 个失败中，只有 6 个是因为测试本身写得不正确，而另外 11 个则真正发现了代码中的 bug。你可以在这里查看这些测试 [这里](.\u002Fpythagora_tests\u002Funit\u002Fsrc\u002Futils\u002Fcommon\u002F)。\n  - 在测试 Pythagora 的过程中，我们有以下几点观察：\n    1. 它非常擅长测试边界情况。对于我们为许多仓库创建的测试，这些测试通过测试边界情况立即发现了 bug。\n    2. 它最适合测试独立的工具函数。例如，我们尝试为 Lodash 仓库生成测试，结果生成了 1000 个测试，其中只有 40 个需要进一步审查。对于其他非独立的函数，我们计划结合集成测试的记录来生成合适的模拟对象，这样应该可以扩展 Pythagora 的测试范围。\n    3. 它当然并不完美，但生成的测试让我很想保留并提交它们。因此，我鼓励你亲自试一试，看看它对你是否有效。如果你这么做了，请通过 [电子邮件](mailto:hi@pythagora.ai) 或 [Discord](https:\u002F\u002Fdiscord.gg\u002FnpC5TAfj6e) 告诉我们。我们非常期待听到你的使用体验。\n\u003Cbr>\u003Cbr>\n- **我是否应该审查生成的测试？**\n  - 当然应该。如上所述，有些测试可能写得不正确，因此在提交之前最好先检查所有测试。尽管如此，我认为这会为你节省大量时间，并帮助你以不同的方式思考代码。\n\u003Cbr>\u003Cbr>\n- **测试能帮助我思考代码——我不想自动生成它们**\n  - 这正是 Pythagora 最好的地方——它确实能帮助你思考代码。只不过你不需要花时间去编写测试而已。这一点对我们自己也适用：我们在开发 Pythagora 时，尽可能快速地编码，但在加入单元测试生成功能后，我们意识到有些函数无法生成测试。于是我们重构了代码，使其更加模块化，以便能够生成单元测试。\n\u003Cbr>\u003Cbr>\n- **Pythagora 是否仅限于特定的编程语言或框架？**\n  - Pythagora 主要为 JavaScript 代码生成单元测试。不过，它设计用于处理用 JavaScript、TypeScript 及类似语言编写的代码。如果你想看到对其他语言或框架的支持，请告知我们：hi@pythagora.ai。\n\u003Cbr>\u003Cbr>\n\n- **Pythagora 是否也能生成集成测试？**\n  - 目前，Pythagora 主要专注于生成单元测试。如果要生成集成测试，你可能需要结合集成测试的记录来生成合适的模拟对象。我们正在积极探索在未来扩展其功能的方法。\n\u003Cbr>\u003Cbr>\n\n- **Pythagora 是否兼容所有 JavaScript 测试框架？**\n  - 目前，Pythagora 使用 Jest 测试框架生成测试。虽然我们愿意扩展对其他测试框架的兼容性，但 Jest 是目前主要支持的框架。如果你有特定的框架需求，请随时向我们提出建议。\n\u003Cbr>\u003Cbr>\n\n- **Pythagora 如何处理敏感或专有代码？**\n  - Pythagora 不会在其服务器上存储你的代码，但它会将代码发送给 GPT 和 OpenAI 来生成测试。在将生成的测试提交到你的代码库之前，务必仔细审查，尤其是当你的代码包含敏感或专有信息时。使用 Pythagora 处理敏感代码时请务必谨慎。\n\u003Cbr>\u003Cbr>\n\n- **Pythagora 是否适用于所有类型的项目？**\n  - Pythagora 最适合用于代码结构良好且包含独立函数（如工具函数）的项目。它在为这类代码生成测试方面表现出色。对于更复杂或非独立的函数，可能需要手动审查和修改。\n\n\n\n# 🏁 Alpha 版本\n这是 Pythagora 的 Alpha 版本。若想获取关于 Beta 版发布的更新，或就你希望 Pythagora 支持的 \u003Cb>技术栈（框架\u002F数据库）\u003C\u002Fb>提出建议，你可以 👉 \u003Ca href=\"http:\u002F\u002Feepurl.com\u002Fikg_nT\" target=\"_blank\">在此添加你的邮箱\u002F留言\u003C\u002Fa> 👈 。\n\u003Cbr>\n\n# 🔗 联系我们\n💬 加入我们的 \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FnpC5TAfj6e\" target=\"_blank\">Discord 服务器\u003C\u002Fa>参与讨论。\n\u003Cbr>\u003Cbr>\n📨 通过 \u003Ca href=\"http:\u002F\u002Feepurl.com\u002Fikg_nT\" target=\"_blank\">在此添加你的邮箱\u003C\u002Fa>获取新功能和 Beta 版发布的最新消息。\n\u003Cbr>\u003Cbr>\n🌟 作为一款开源工具，如果你能为 Pythagora 仓库点个赞，对我们来说将是莫大的鼓励 🌟\n\u003Cbr>\u003Cbr>\n\u003Cbr>\u003Cbr>\n\n\u003Cbr>\u003Cbr>","# Pythagora 快速上手指南\n\nPythagora 是一个利用 GPT-4 自动生成 JavaScript\u002FTypeScript 单元测试的开源工具，旨在让测试编写完全自动化。\n\n> **注意**：本项目（pythagora）目前已标记为弃用（deprecated），官方正在开发新一代工具 [GPT Pilot](https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fgpt-pilot)。本文档仅针对当前仓库版本的使用说明。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：\n    *   Linux \u002F macOS：任意终端即可。\n    *   **Windows 用户**：必须使用 **Git Bash** 运行命令，请勿使用 PowerShell 或 CMD，否则可能导致命令执行失败。\n*   **前置依赖**：\n    *   已安装 [Node.js](https:\u002F\u002Fnodejs.org\u002F) 和 `npm`。\n    *   拥有 **OpenAI API Key** 或 **Pythagora API Key**。\n*   **代码要求**：\n    *   目标函数必须从文件中显式导出（例如使用 `module.exports` 或 `export`）。\n    *   目前主要支持生成 **Jest** 框架的测试用例。\n\n## 安装步骤\n\n1.  在项目根目录下，通过 npm 安装 Pythagora 作为开发依赖：\n\n    ```bash\n    npm i pythagora --save-dev\n    ```\n\n2.  配置 API 密钥。您可以选择使用 OpenAI 密钥或 Pythagora 密钥（二选一）：\n\n    **使用 OpenAI API Key:**\n    ```bash\n    npx pythagora --config --openai-api-key \u003CYOUR_OPENAI_API_KEY>\n    ```\n\n    **或使用 Pythagora API Key:**\n    ```bash\n    npx pythagora --config --pythagora-api-key \u003CYOUR_PYTHAGORA_API_KEY>\n    ```\n\n## 基本使用\n\n配置完成后，即可开始生成单元测试。\n\n### 1. 为指定函数生成测试\n\n这是最常用的场景。假设您有一个名为 `calculateSum` 的导出函数，运行以下命令：\n\n```bash\nnpx pythagora --unit-tests --func calculateSum\n```\n\n如果需要指定文件路径：\n\n```bash\nnpx pythagora --unit-tests --func calculateSum --path .\u002Fsrc\u002Futils\u002Fmath.js\n```\n\n### 2. 为整个文件或文件夹生成测试\n\n若想为某个文件中的所有导出函数，或某个文件夹下的所有文件生成测试：\n\n**针对单个文件：**\n```bash\nnpx pythagora --unit-tests --path .\u002Fsrc\u002Futils\u002Fcommon.js\n```\n\n**针对整个文件夹：**\n```bash\nnpx pythagora --unit-tests --path .\u002Fsrc\u002Futils\u002F\n```\n\n### 3. 扩展现有测试\n\n如果您已有测试套件，希望增加覆盖率或补充边界情况测试：\n\n```bash\nnpx pythagora --expand-unit-tests --path .\u002Ftests\u002F\n```\n\n### 4. 运行生成的测试\n\nPythagora 默认生成 Jest 测试文件，通常位于 `.\u002Fpythagora_tests\u002F` 目录。运行测试的命令如下：\n\n```bash\nnpx jest .\u002Fpythagora_tests\u002F\n```\n\n---\n**提示**：生成的测试代码建议先进行人工审查后再提交到代码库，以确保逻辑准确并处理潜在的敏感信息。","某电商初创团队的后端工程师正在紧急重构 Node.js 订单处理模块，需要在上线前快速补齐核心函数的单元测试以确保稳定性。\n\n### 没有 pythagora 时\n- 开发人员需手动逐行阅读复杂的异步业务逻辑，耗时数小时才能理清所有分支路径和边界条件。\n- 编写覆盖正常流程、异常捕获及边缘情况（如库存不足、支付超时）的测试用例极其繁琐，容易遗漏关键场景。\n- 由于项目工期紧张，团队往往被迫牺牲测试覆盖率，导致潜在 Bug 流入生产环境，后期修复成本高昂。\n- 维护旧代码的测试套件时，每次修改函数签名都需要同步更新大量硬编码的测试数据，效率低下且易出错。\n\n### 使用 pythagora 后\n- 工程师只需运行一条 `npx pythagora --unit-tests` 命令，pythagora 便自动解析 AST 并识别函数依赖，瞬间生成全套测试草案。\n- 基于 GPT-4 的强大推理能力，pythagora 智能覆盖了各种边缘案例和异常抛出场景，显著提升了代码覆盖率。\n- 团队在几分钟内即可获得高质量的测试文件，将原本需要数天的手工编写工作压缩至即时完成，大幅加速发布流程。\n- 当需要扩展测试范围时，利用 `--expand-unit-tests` 参数，pythagora 能自动分析现有套件并补充缺失的断言，确保持续集成的高效性。\n\npythagora 通过将繁琐的单元测试编写转化为全自动化的 AI 生成过程，让开发团队能在零手写代码的情况下实现企业级的代码质量保障。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FPythagora-io_pythagora_59d5ae1e.png","Pythagora-io","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FPythagora-io_31f699b4.png","",null,"https:\u002F\u002Fgithub.com\u002FPythagora-io",[79,83],{"name":80,"color":81,"percentage":82},"JavaScript","#f1e05a",97.6,{"name":84,"color":85,"percentage":86},"Shell","#89e051",2.4,1817,115,"2026-04-15T19:48:06","Apache-2.0","Linux, macOS, Windows","未说明",{"notes":94,"python":92,"dependencies":95},"该工具是一个基于 Node.js 的命令行工具（非 Python 项目），主要用于生成 JavaScript\u002FTypeScript 的单元测试。在 Windows 系统上必须使用 Git Bash 运行命令，不支持 PowerShell。需要配置 OpenAI API Key 或 Pythagora API Key 才能使用。生成的测试用例基于 Jest 框架。该项目已弃用，作者推荐使用 GPT Pilot。",[96,97,98],"Node.js","npm","Jest",[14,16,45],[101,102,103,104,105,106,107,108,109],"api-testing","api-testing-framework","automated-testing","database-testing","developer-tools","integration-testing","nodejs","test-coverage","testing","2026-03-27T02:49:30.150509","2026-04-18T16:24:56.623741",[113,118,123,128,133,137,142,147],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},40256,"运行 Pythagora 时提示找不到模块（MODULE_NOT_FOUND）或脚本报错怎么办？","这通常是因为版本过旧导致的文件缺失。请安装最新版本的 Pythagora 来解决此问题。运行以下命令更新：\nnpx pythagora@latest\n或者明确指定版本（例如 0.0.64 或更高）：\nnpm install pythagora@0.0.64\n更新后，确保已正确配置 API 密钥即可正常运行。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F37",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},40257,"为什么终端显示\"No tests generated!\"且没有具体的错误信息？","这通常是因为您的 OpenAI API 密钥没有访问 GPT-4 模型的权限。Pythagora 专门针对 GPT-4 进行了优化和测试，不支持 GPT-3.5。\n如果您看到错误信息\"Error: The model: `gpt-4` does not exist. Code: model_not_found\"，即确认是此原因。\n解决方案：\n1. 升级您的 OpenAI 账户以访问 GPT-4。\n2. 如果没有 GPT-4 访问权限，可以发送邮件至 leon@pythagora.ai 申请专用的 Pythagora API 密钥进行试用。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F43",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},40258,"Pythagora 是否支持 TypeScript 项目？","是的，Pythagora 支持 TypeScript。早期版本可能存在类型定义缺失的问题，但在版本 0.0.36 及之后已得到修复。\n如果您使用的是较新版本（如 0.0.69+），它对 import\u002Frequire 的处理也有了显著改进。\n注意：如果是编译后的 JS 文件生成测试失败，请确保升级到最新版本（0.0.69 或更高），并检查导入路径是否正确。如果仍有问题，可能需要手动调整生成的测试文件中的相对导入路径。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F10",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},40259,"如何在 Windows 系统上运行 Pythagora？","在 Windows 上直接运行可能会遇到\"\u002Fbin\u002Fbash.exe\"无法识别的错误，因为该工具依赖 Bash 环境。\n解决方案：\n1. 推荐在 Windows 上安装 WSL (Windows Subsystem for Linux) 并在 Linux 子系统中运行 Pythagora。\n2. 或者安装 Git Bash，并确保在 Git Bash 终端中而不是 PowerShell 或 CMD 中运行 npx 命令。\n3. 避免直接在 PowerShell 中调用包含 Bash 脚本的命令，除非已正确配置环境变量和别名。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F24",{"id":134,"question_zh":135,"answer_zh":136,"source_url":117},40260,"如何配置 Pythagora 的 API 密钥？","运行 Pythagora 前必须配置 API 密钥，否则会提示\"No API key found!\"。\n您可以使用以下任一命令进行配置：\n1. 配置 Pythagora 专用密钥：\nnpx pythagora --config --pythagora-api-key \u003CYOUR_PYTHAGORA_API_KEY>\n2. 配置 OpenAI 密钥（需具备 GPT-4 权限）：\nnpx pythagora --config --openai-api-key \u003CYOUR_OPENAI_API_KEY>\n获取 Pythagora API 密钥请访问官方等待列表页面。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},40261,"Pythagora 是否支持 Postgres 数据库连接的 Express 应用？","目前 Pythagora 对 Postgres 的原生支持仍在开发计划中。如果您在使用带有 Postgres 数据库的 Express API 服务器时发现回调未触发或连接异常，这是因为该功能尚未完全实现。\n维护者已表示 Postgres 是下一个重点实现的功能。在此期间，建议暂时使用内存数据库或其他已支持的数据库进行测试，或关注官方更新以获取支持进度。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F20",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},40262,"生成的测试文件中导入路径错误或命名导出识别不正确怎么办？","在使用 TypeScript 编译后的文件生成测试时，偶尔会出现相对导入路径推断错误或将命名导出误判为默认导出的情况。\n临时解决方案：\n1. 手动修正生成测试文件中的 import 路径，使其指向正确的文件位置。\n2. 检查源文件的导出方式（named export vs default export），并相应调整测试文件中的导入语句（例如将 `import x from ...` 改为 `import { x } from ...`）。\n建议升级到最新版本（0.0.69+），该版本已大幅改进了对模块导入的处理逻辑。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F42",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},40263,"如何关闭 Pythagora 的遥测（Telemetry）数据收集？","社区用户已提出希望增加退出遥测的选项。目前可以通过贡献代码或关注相关 Pull Request（如 #65）来启用该功能。\n如果您非常在意隐私，建议在安装后检查 `node_modules\u002Fpythagora\u002Fsrc\u002Fbin\u002Fpostinstall.js` 等相关脚本，或通过环境变量（如果新版已支持）禁用数据发送。维护者正在审查相关的 PR 以正式支持“选择退出”（opt-out）或改为“选择加入”（opt-in）机制。","https:\u002F\u002Fgithub.com\u002FPythagora-io\u002Fpythagora\u002Fissues\u002F62",[]]