Code Reader is a Chrome extension that provides detailed code analysis for GitHub repositories. It uses AI models to generate insights and explanations about the code structure and functionality.
- Automatic detection of GitHub repository pages
- AI-powered code analysis
- Support for multiple AI models (GPT-3.5 Turbo, GPT-4, Claude 2)
- Markdown rendering of analysis results
-
Clone this repository or download the source code.
-
Navigate to the project directory and install dependencies:
npm install
-
Build the extension:
npm run build
-
Open Google Chrome and go to
chrome://extensions/
. -
Enable "Developer mode" in the top right corner.
-
Click "Load unpacked" and select the
dist
folder created by the build process.
- After installation, the Code Reader extension icon will appear in your Chrome toolbar.
- Navigate to a GitHub repository page.
- Click on the Code Reader extension icon to open the sidebar.
- Select the desired AI model from the dropdown menu.
- Click the "Analyze Code" button to generate an analysis of the repository.
To set up the project for development:
-
Clone the repository:
git clone https://github.com/yourusername/code-reader-extension.git
-
Install dependencies:
cd code-reader-extension npm install
-
Start the development server:
npm run dev
-
Load the extension in Chrome by following the installation steps above, but select the project root folder instead of the
dist
folder.
The current implementation uses a placeholder API endpoint (https://your-api-endpoint.com/analyze
) for code analysis. You need to implement the actual API and handle the backend logic for interacting with the AI models before the extension can fully function.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Code Reader 是一个 Chrome 扩展程序,为 GitHub 仓库提供详细的代码分析。它使用 AI 模型生成关于代码结构和功能的见解和解释。
- 自动检测 GitHub 仓库页面
- AI 驱动的代码分析
- 支持多种 AI 模型(GPT-3.5 Turbo、GPT-4、Claude 2)
- Markdown 格式的分析结果渲染
-
克隆此仓库或下载源代码。
-
导航到项目目录并安装依赖:
npm install
-
构建扩展:
npm run build
-
打开 Google Chrome 并访问
chrome://extensions/
。 -
在右上角启用"开发者模式"。
-
点击"加载已解压的扩展程序",选择构建过程创建的
dist
文件夹。
- 安装后,Code Reader 扩展图标将出现在 Chrome 工具栏中。
- 导航到 GitHub 仓库页面。
- 点击 Code Reader 扩展图标打开侧边栏。
- 从下拉菜单中选择所需的 AI 模型。
- 点击"分析代码"按钮生成仓库分析。
要设置项目进行开发:
-
克隆仓库:
git clone https://github.com/yourusername/code-reader-extension.git
-
安装依赖:
cd code-reader-extension npm install
-
启动开发服务器:
npm run dev
-
按照上述安装步骤在 Chrome 中加载扩展,但选择项目根文件夹而不是
dist
文件夹。
当前实现使用占位符 API 端点(https://your-api-endpoint.com/analyze
)进行代码分析。在扩展程序完全功能之前,您需要实现实际的 API 并处理与 AI 模型交互的后端逻辑。
欢迎贡献!请随时提交 Pull Request。
本项目采用 MIT 许可证。