Chromium Latest Commit
效率与工作流by hydavinci
Query the latest commit information for any file in the Chromium repository with detailed commit data including hash, author, timestamp, message, modified files, and diffs. Integrate seamlessly with MCP-compatible tools via the provided MCP server to enable programmatic access and automation. Utilize multiple interfaces including CLI, Python API, and Docker for flexible deployment and usage.
什么是 Chromium Latest Commit?
Query the latest commit information for any file in the Chromium repository with detailed commit data including hash, author, timestamp, message, modified files, and diffs. Integrate seamlessly with MCP-compatible tools via the provided MCP server to enable programmatic access and automation. Utilize multiple interfaces including CLI, Python API, and Docker for flexible deployment and usage.
README
Chromium Commits Query Tool
A comprehensive tool to query the latest commit information for files in the Chromium repository. Supports CLI usage, Python API integration, and Model Context Protocol (MCP) server functionality.
Features
- 🔍 Query Latest Commits: Get detailed information about the most recent commit that modified any file in the Chromium repository
- 📊 Comprehensive Details: Retrieve commit hash, author, timestamp, message, and complete list of modified files
- 🔧 Multiple Interfaces: Use via command line, Python API, or as an MCP server
- 📁 Batch Processing: Process multiple files at once with batch operations
- 🐳 Docker Support: Easy deployment with containerization
- 🌐 MCP Integration: Seamless integration with AI agents and tools
Installation
Using UV (Recommended)
git clone https://github.com/hydavinci/chromium-commits.git
cd chromium-commits
uv sync
Using pip
git clone https://github.com/hydavinci/chromium-commits.git
cd chromium-commits
pip install -r requirements.txt
Using Docker
docker build -t chromium-commits .
docker run --rm chromium-commits
Usage
🖥️ Command Line Interface (CLI)
Navigate to the src directory and use the following commands:
cd src
# Basic usage - get latest commit for a single file
python get_chromium_commits.py "chrome/browser/ui/browser.cc"
# Save output to file
python get_chromium_commits.py -o result.txt "components/sync/service/data_type_manager.cc"
# Show detailed diff information
python get_chromium_commits.py --show-diff "chrome/browser/ui/browser.cc"
# Batch processing multiple files
python batch_get_commits.py files.txt
🐍 Python API
from src.get_chromium_commits import ChromiumCommitFetcher
# Initialize the fetcher
fetcher = ChromiumCommitFetcher()
# Get basic commit info
basic_info = fetcher.get_file_latest_commit("chrome/browser/ui/browser.cc")
# Get detailed commit info with all modified files
detailed_info = fetcher.get_file_commit_info(
"chrome/browser/ui/browser.cc",
detailed=True,
show_diff=True
)
print(detailed_info)
🔗 MCP Server
Start the MCP server for integration with AI agents:
cd src
python server.py
The server provides the get_chromium_latest_commit tool that can be used by MCP-compatible clients.
📖 Example Usage
See src/example_usage.py for a comprehensive demonstration of the Python API:
cd src
python example_usage.py
📋 Example Output
=============================================================
Latest Commit Information for: chrome/browser/ui/browser.cc
=============================================================
Commit Hash: a1b2c3d4e5f6789abcdef123456789abcdef1234
Author: developer@chromium.org
Author Email: developer@chromium.org
Commit Time: 2024-12-20 15:30:45 UTC
Commit Message: [Chrome] Improve browser window management and memory optimization
Files modified in this commit (Total: 15):
[MODIFIED] chrome/browser/ui/browser.cc
[MODIFIED] chrome/browser/ui/browser.h
[MODIFIED] chrome/browser/ui/views/frame/browser_view.cc
[MODIFIED] chrome/browser/memory/tab_manager.cc
[ADDED] chrome/browser/ui/browser_memory_coordinator.cc
[ADDED] chrome/browser/ui/browser_memory_coordinator.h
[MODIFIED] chrome/test/base/browser_test_base.cc
...
Diff Details:
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -123,6 +123,10 @@ void Browser::CreateTabContents() {
web_contents->SetDelegate(this);
+
+ // Initialize memory coordinator for better resource management
+ memory_coordinator_ = std::make_unique<BrowserMemoryCoordinator>(this);
+ memory_coordinator_->Initialize();
}
🗂️ Common File Paths
Here are some frequently queried file paths in the Chromium repository:
Core Chrome Browser
cd src
python get_chromium_commits.py "chrome/browser/ui/browser.cc"
python get_chromium_commits.py "chrome/browser/chrome_browser_main.cc"
python get_chromium_commits.py "chrome/browser/profiles/profile_manager.cc"
Blink Rendering Engine
python get_chromium_commits.py "third_party/blink/renderer/core/dom/document.cc"
python get_chromium_commits.py "third_party/blink/renderer/core/html/parser/html_parser.cc"
python get_chromium_commits.py "third_party/blink/renderer/core/css/css_parser.cc"
Component Libraries
python get_chromium_commits.py "components/sync/service/data_type_manager.cc"
python get_chromium_commits.py "components/autofill/core/browser/autofill_manager.cc"
python get_chromium_commits.py "components/password_manager/core/browser/password_manager.cc"
Build and Configuration
python get_chromium_commits.py "BUILD.gn"
python get_chromium_commits.py "DEPS"
python get_chromium_commits.py ".gn"
Content/Web Platform
python get_chromium_commits.py "content/browser/renderer_host/render_process_host_impl.cc"
python get_chromium_commits.py "content/renderer/render_frame_impl.cc"
📁 Project Structure
chromium-commits/
├── src/
│ ├── get_chromium_commits.py # Main CLI tool and ChromiumCommitFetcher class
│ ├── batch_get_commits.py # Batch processing utility
│ ├── example_usage.py # Usage examples and demonstrations
│ └── server.py # MCP server implementation
├── pyproject.toml # Project configuration and dependencies
├── uv.lock # Dependency lock file
├── Dockerfile # Docker container configuration
├── smithery.yaml # Smithery MCP server configuration
├── LICENSE # MIT license
└── README.md # This documentation
⚙️ Requirements
- Python: 3.10 or higher
- Dependencies:
requests>=2.31.0(HTTP requests to Chromium Gitiles API)mcp>=1.0.0(Model Context Protocol server functionality)
- Network: Internet connection to access Chromium Gitiles API
🚀 API Reference
ChromiumCommitFetcher Class
Methods
-
get_file_latest_commit(file_path: str) -> Optional[Dict]- Returns basic commit information for the latest change to the specified file
-
get_commit_details(commit_hash: str) -> Optional[Dict]- Returns detailed information about a specific commit including all modified files
-
get_file_commit_info(file_path: str, detailed: bool = False, show_diff: bool = False) -> Optional[str]- Returns formatted commit information with optional details and diff
🔧 Configuration
The tool uses the Chromium Gitiles API and requires no authentication. All requests are made to:
https://chromium.googlesource.com/chromium/src
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and add tests
- Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
常见问题
Chromium Latest Commit 是什么?
Query the latest commit information for any file in the Chromium repository with detailed commit data including hash, author, timestamp, message, modified files, and diffs. Integrate seamlessly with MCP-compatible tools via the provided MCP server to enable programmatic access and automation. Utilize multiple interfaces including CLI, Python API, and Docker for flexible deployment and usage.
相关 Skills
PDF处理
by anthropics
遇到 PDF 读写、文本表格提取、合并拆分、旋转加水印、表单填写或加解密时直接用它,也能提取图片、生成新 PDF,并把扫描件通过 OCR 变成可搜索文档。
✎ PDF杂活别再来回切工具了,文本表格提取、合并拆分到OCR识别一次搞定,连扫描件也能变可搜索。
Word文档
by anthropics
覆盖Word/.docx文档的创建、读取、编辑与重排,适合生成报告、备忘录、信函和模板,也能处理目录、页眉页脚、页码、图片替换、查找替换、修订批注及内容提取整理。
✎ 搞定 .docx 的创建、改写与精排版,目录、批量替换、批注修订和图片更新都能自动化,做正式文档尤其省心。
PPT处理
by anthropics
处理 .pptx 全流程:创建演示文稿、提取和解析幻灯片内容、批量修改现有文件,支持模板套用、合并拆分、备注评论与版式调整。
✎ 涉及PPTX的创建、解析、修改到合并拆分都能一站搞定,连备注、模板和评论也能处理,做演示文稿特别省心。
相关 MCP Server
文件系统
编辑精选by Anthropic
Filesystem 是 MCP 官方参考服务器,让 LLM 安全读写本地文件系统。
✎ 这个服务器解决了让 Claude 直接操作本地文件的痛点,比如自动整理文档或生成代码文件。适合需要自动化文件处理的开发者,但注意它只是参考实现,生产环境需自行加固安全。
by wonderwhy-er
Desktop Commander 是让 AI 直接执行终端命令、管理文件和进程的 MCP 服务器。
✎ 这工具解决了 AI 无法直接操作本地环境的痛点,适合需要自动化脚本调试或文件批量处理的开发者。它能让你用自然语言指挥终端,但权限控制需谨慎,毕竟让 AI 执行 rm -rf 可不是闹着玩的。
EdgarTools
编辑精选by dgunning
EdgarTools 是无需 API 密钥即可解析 SEC EDGAR 财报的开源 Python 库。
✎ 这个工具解决了金融数据获取的痛点——直接让 AI 读取结构化财报,比如让 Claude 分析苹果的 10-K 文件。适合量化分析师或金融开发者快速构建数据管道。但注意,它依赖 SEC 网站稳定性,高峰期可能延迟。