Skip to content

Commit 8ff880c

Browse files
genednaclaude
andcommitted
docs: improve README SEO, add license section and Cargo package metadata
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qa6PchiiAWXNwtxmm5KRTt
1 parent 64dc2b8 commit 8ff880c

3 files changed

Lines changed: 73 additions & 8 deletions

File tree

‎Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name = "mega2"
33
version = "0.40.15"
44
edition = "2024"
55
license = "MIT OR Apache-2.0"
6+
description = "Monorepo engine and Git hosting server for AI agents: trunk-based storage, Git Smart HTTP, Git LFS, OCI registry, and Agent Session Capture"
7+
repository = "https://github.com/gitmono-dev/mega2"
8+
keywords = ["monorepo", "git-server", "ai-agents", "git-lfs", "oci-registry"]
69
# Two [[bin]] targets exist; keep `cargo run -p mega2` unambiguous.
710
default-run = "mega2"
811

‎README.md‎

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1-
# mega2
1+
# Mega2: Monorepo Engine and Git Server for AI Agents
2+
3+
> An open-source, trunk-based monorepo storage and Git hosting server written in Rust, with Git Smart HTTP, Git LFS, an OCI container registry, build-artifact storage, and Agent Session Capture.
24
35
English · [中文](README.zh.md)
46

7+
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](#license)
8+
[![Docker Image](https://img.shields.io/badge/docker-genedna%2Fmega2-2496ED.svg)](https://hub.docker.com/r/genedna/mega2)
9+
510
The first-generation [Mega](https://github.com/web3infra-foundation/mega) established the foundation for our monorepo and Git-hosting platform. **Mega2 is the second-generation engine built for AI agents**, with two core capabilities: a **Monorepo engine** and **Agent Session Capture**.
611

712
The open-source edition of Mega2 runs in **trunk / storage-only** mode and does not include a Web UI or Change List. Mega2 provides the server-side monorepo storage and APIs; Libra provides a terminal interface for interactive browsing.
813

914
Start with the [Quick Start](docs/quick-start.md), then see the [documentation index](docs/README.md) for user, operator, and contributor guides. Repository and push behavior is covered in the [User Guide](docs/user-guide.md); contribution checks are in the [Contributing Guide](docs/contributing.md).
1015

16+
## At a glance
17+
18+
| Item | Details |
19+
|---|---|
20+
| What it is | Monorepo engine and Git hosting server for AI agents |
21+
| Language | Rust (edition 2024), a single Cargo package `mega2` |
22+
| Mode | Trunk / storage-only: `refs/heads/main` is the public trunk |
23+
| Protocols and interfaces | Git Smart HTTP, read-only SSH, Git LFS, OCI Distribution (`/v2`), HTTP API |
24+
| API docs | OpenAPI: `/api/openapi.json`; Swagger UI: `/swagger-ui` |
25+
| Storage | Postgres for metadata; local filesystem or S3-compatible object storage for Git objects, LFS, artifacts, and images |
26+
| Image | Docker Hub [`genedna/mega2`](https://hub.docker.com/r/genedna/mega2), default HTTP port `9000` |
27+
| Not included | Web UI, Change List, multi-branch monorepo workflows |
28+
| Companion tools | [Libra](https://libra.tools) (agent-side version control and terminal browser), [ScorpioFS](https://github.com/gitmono-dev/scorpiofs) (monorepo filesystem mount) |
29+
| License | MIT OR Apache-2.0 |
30+
1131
## Recommended Agent setup
1232

1333
The best practice for agent-oriented monorepo development is to use **Mega2 + ScorpioFS + Libra** together:
@@ -39,7 +59,7 @@ Agent Session Capture is an optional HTTP capability, separate from Git push. Wh
3959

4060
## Quick start with Compose
4161

42-
The evaluation stack pulls the official release image from Docker Hub (`genedna/mega2:latest`) — no source build, no bootstrap. Pick the compose file for your platform (they differ in how artifact presigned URLs are made reachable from the host — see [`docs/deployment.md`](docs/deployment.md)):
62+
The evaluation stack pulls the official release image from Docker Hub (`genedna/mega2:latest`) — no source build, no bootstrap. Pick the compose file for your platform (they differ in how artifact presigned URLs are made reachable from the host — see the [Deployment Guide](docs/deployment.md)):
4363

4464
```bash
4565
# macOS with OrbStack
@@ -48,7 +68,7 @@ docker compose -f macos-orbstack-mega2-compose.yml up -d --wait
4868
docker compose -f linux-mega2-compose.yml up -d --wait
4969
```
5070

51-
HTTP: `http://127.0.0.1:9000/`. This is a local-only anonymous setup (`push_auth=none`, bound to `127.0.0.1`); for token-based or shared deployments see the [Deployment Guide](docs/deployment.md). Start with the [`Quick Start`](docs/quick-start.md); for migration, LFS, OCI, and artifact examples, see [`Usage Recipes`](docs/recipes.md).
71+
HTTP: `http://127.0.0.1:9000/`. This is a local-only anonymous setup (`push_auth=none`, bound to `127.0.0.1`); for token-based or shared deployments see the [Deployment Guide](docs/deployment.md) and [`docs/deploy-trunk.md`](docs/deploy-trunk.md). Start and push with the [Quick Start](docs/quick-start.md), then see [Usage Recipes](docs/recipes.md) for repository migration, LFS, OCI, and build-artifact examples.
5272

5373
For local development and tests, see the [Contributing Guide](docs/contributing.md).
5474

@@ -78,7 +98,7 @@ cargo clippy --all-targets --all-features -- -D warnings
7898
source .env.test && cargo test --all
7999
```
80100

81-
Details: [`AGENTS.md`](AGENTS.md) and the [Contributing Guide](docs/contributing.md).
101+
Details: [`AGENTS.md`](AGENTS.md), the [Contributing Guide](docs/contributing.md), and [`docs/plan/README.md`](docs/plan/README.md).
82102

83103
## Documentation
84104

@@ -91,3 +111,14 @@ Details: [`AGENTS.md`](AGENTS.md) and the [Contributing Guide](docs/contributing
91111
| [`docs/contributing.md`](docs/contributing.md) | Local development, contribution process, code conventions, and integration tests |
92112

93113
Configuration, deployment, architecture, and subsystem references are linked from the [documentation index](docs/README.md).
114+
115+
## License
116+
117+
Mega2 is dual-licensed under MIT and Apache-2.0 (`MIT OR Apache-2.0`); you may choose either license:
118+
119+
- [MIT License](LICENSE-MIT)
120+
- [Apache License 2.0](LICENSE-APACHE)
121+
122+
Third-party code copied directly into this repository, if any, is declared in [`LICENSE-THIRD-PARTY`](LICENSE-THIRD-PARTY).
123+
124+
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.

‎README.zh.md‎

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1-
# mega2
1+
# Mega2:面向 AI Agent 的 Monorepo 引擎与 Git 托管服务
2+
3+
> 用 Rust 编写的开源 trunk-based monorepo 存储与 Git 托管服务端,支持 Git Smart HTTP、Git LFS、OCI 镜像仓库、构建产物存储和 Agent 会话捕获(Agent Session Capture)。
24
35
[English](README.md) · 中文
46

7+
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](#许可证)
8+
[![Docker Image](https://img.shields.io/badge/docker-genedna%2Fmega2-2496ED.svg)](https://hub.docker.com/r/genedna/mega2)
9+
510
第一代 [Mega](https://github.com/web3infra-foundation/mega) 奠定了 monorepo 与 Git 托管平台的基础。**Mega2 是面向 Agent 的第二代引擎**,以 **Monorepo 引擎**和 **Agent Session Capture(Agent 会话捕获)**为两项核心能力。
611

712
Mega2 开源版以 **trunk / storage-only** 模式运行,不提供 Web UI 或 Change List。它负责服务端的 monorepo 存储与 API;交互式浏览可使用 Libra 提供的终端命令。
813

914
从[快速开始](docs/quick-start.zh.md)启动本地实例,再到[文档索引](docs/README.zh.md)查找用户、运维和开发指南。仓库与推送规则见[使用指南](docs/user-guide.zh.md);贡献流程与检查要求见[贡献指南](docs/contributing.zh.md)。
1015

16+
## 项目概览
17+
18+
| 项目 | 说明 |
19+
|---|---|
20+
| 定位 | 面向 AI Agent 的 monorepo 引擎与 Git 托管服务端 |
21+
| 语言 | Rust(edition 2024),单个 Cargo 包 `mega2` |
22+
| 运行模式 | trunk / storage-only:公开主干为 `refs/heads/main` |
23+
| 协议与接口 | Git Smart HTTP、只读 SSH、Git LFS、OCI Distribution(`/v2`)、HTTP API |
24+
| API 文档 | OpenAPI:`/api/openapi.json`;Swagger UI:`/swagger-ui` |
25+
| 存储 | Postgres 保存元数据;本地文件系统或 S3-compatible 对象存储保存 Git 对象、LFS、产物和镜像 |
26+
| 镜像 | Docker Hub [`genedna/mega2`](https://hub.docker.com/r/genedna/mega2),默认 HTTP 端口 `9000` |
27+
| 不包含 | Web UI、Change List、多分支 monorepo 工作流 |
28+
| 配套工具 | [Libra](https://libra.tools)(Agent 侧版本控制与终端浏览器)、[ScorpioFS](https://github.com/gitmono-dev/scorpiofs)(monorepo 文件系统挂载) |
29+
| 许可证 | MIT OR Apache-2.0 |
30+
1131
## 面向 Agent 的推荐组合
1232

1333
面向 Agent 的 monorepo 开发,最佳实践是配合使用 **Mega2 + ScorpioFS + Libra**:
@@ -39,7 +59,7 @@ Agent Session Capture 是独立于 Git push 的可选 HTTP 能力。在 storage-
3959

4060
## 用 Compose 快速启动
4161

42-
评估栈直接从 Docker Hub 拉取正式发布镜像(`genedna/mega2:latest`),不构建源码、不需要 bootstrap。按平台选择 compose 文件(两者让 artifact 预签名 URL 对宿主机可达的方式不同,见 [`docs/deployment.zh.md`](docs/deployment.zh.md)):
62+
评估栈直接从 Docker Hub 拉取正式发布镜像(`genedna/mega2:latest`),不构建源码、不需要 bootstrap。按平台选择 compose 文件(两者让 artifact 预签名 URL 对宿主机可达的方式不同,见[部署指南](docs/deployment.zh.md)):
4363

4464
```bash
4565
# macOS + OrbStack
@@ -48,7 +68,7 @@ docker compose -f macos-orbstack-mega2-compose.yml up -d --wait
4868
docker compose -f linux-mega2-compose.yml up -d --wait
4969
```
5070

51-
HTTP:`http://127.0.0.1:9000/`。这是仅限本机的匿名设置(`push_auth=none`,绑定 `127.0.0.1`);token 鉴权或共享部署见 [`docs/deployment.zh.md`](docs/deployment.zh.md) 与 [`docs/deploy-trunk.md`](docs/deploy-trunk.md)。先按[快速开始](docs/quick-start.zh.md)启动并推送,再查看[进阶使用场景](docs/recipes.zh.md)中的仓库迁移、LFS、OCI 和构建产物示例。
71+
HTTP:`http://127.0.0.1:9000/`。这是仅限本机的匿名设置(`push_auth=none`,绑定 `127.0.0.1`);token 鉴权或共享部署见[部署指南](docs/deployment.zh.md)与 [`docs/deploy-trunk.md`](docs/deploy-trunk.md)。先按[快速开始](docs/quick-start.zh.md)启动并推送,再查看[进阶使用场景](docs/recipes.zh.md)中的仓库迁移、LFS、OCI 和构建产物示例。
5272

5373
本地开发与测试见[贡献指南](docs/contributing.zh.md)。
5474

@@ -78,7 +98,7 @@ cargo clippy --all-targets --all-features -- -D warnings
7898
source .env.test && cargo test --all
7999
```
80100

81-
细节见 [`AGENTS.md`](AGENTS.md) 与 [`docs/plan/README.md`](docs/plan/README.md)。
101+
细节见 [`AGENTS.md`](AGENTS.md)、[贡献指南](docs/contributing.zh.md)与 [`docs/plan/README.md`](docs/plan/README.md)。
82102

83103
## 文档
84104

@@ -91,3 +111,14 @@ source .env.test && cargo test --all
91111
| [`docs/contributing.zh.md`](docs/contributing.zh.md) | 本地开发、贡献流程、代码约定与集成测试 |
92112

93113
配置、部署、架构和子系统参考文档见[文档索引](docs/README.zh.md)。
114+
115+
## 许可证
116+
117+
Mega2 采用 MIT 与 Apache-2.0 双许可证(`MIT OR Apache-2.0`),使用者可任选其一:
118+
119+
- [MIT 许可证](LICENSE-MIT)
120+
- [Apache 许可证 2.0](LICENSE-APACHE)
121+
122+
直接复制进本仓库的第三方代码(如有)在 [`LICENSE-THIRD-PARTY`](LICENSE-THIRD-PARTY) 中声明。
123+
124+
除非另有明确说明,你有意提交并纳入本项目的任何贡献,按照 Apache-2.0 许可证的定义,均按上述双许可证授权,不附加任何其他条款或条件。

0 commit comments

Comments
 (0)