MCPcopy Index your code
hub / github.com/LeslieLeung/reaper

github.com/LeslieLeung/reaper @v0.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.2 ↗ · + Follow
51 symbols 158 edges 19 files 5 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

REAPER

English | 简体中文

REpository ArchivER(REAPER)是一个用于从任何Git服务器归档 Git 仓库的工具。

功能

  • 从任何Git服务器归档 Git 仓库
  • 归档用户/组织的仓库(见 配置)
  • 定时任务
  • 多种存储类型(见 存储
  • Docker 支持(见 使用 Docker 运行

安装

curl -sSfL https://raw.githubusercontent.com/LeslieLeung/reaper/main/install.sh | sh -s -- -b /usr/local/bin

或从 Release 获取。

使用方法

你需要创建一个配置文件来使用REAPER。

repository:
  - name: reaper
    url: github.com/leslieleung/reaper
    cron: "0 * * * *"
    storage:
      - localFile
      - backblaze
    useCache: True

storage:
  - name: localFile
    type: file
    path: ./repo
  - name: backblaze
    type: s3
    endpoint: s3.us-west-000.backblazeb2.com
    region: us-west-000
    bucket: your-bucket-name
    accessKeyID: your-access-key-id
    secretAccessKey: your-secret-access-key

然后,你可以使用配置文件运行REAPER。

reaper -c config.yaml
# 或者如果你的配置文件名为config.yaml,只需调用reaper
reaper

rip

rip命令会归档在配置中定义的单个 Git 仓库。

reaper rip reaper

run

run命令会归档在配置中定义的所有 Git 仓库。

reaper run

结合cron,你可以定期归档 Git 仓库。

bury

bury命令会归档指定 Git 仓库的所有发布产物。

reaper bury reaper

daemon

daemon命令会启动一个守护进程,它会在后台运行,归档在配置中定义的所有 Git 仓库。

reaper daemon
# 使用 nohup 后台运行
nohup reaper daemon &

配置

有关配置,你可以查看此示例

更多细节,可查看配置文档

存储

REAPER支持多种存储类型。

  • [x] 文件
  • [x] AWS S3

使用 Docker 运行

Docker CLI

一次性运行。 - 修改 ${pwd}/config/example.config.yaml 为你的配置文件本地路径。 - 自定义 ${pwd}/repo:/repo 为你需要的存储路径。容器内路径需要与配置文件中的路径一致。

docker run --rm \
    -v ${pwd}/config/example.config.yaml:/config.yaml \
    -v ${pwd}/repo:/repo \
    leslieleung/reaper:latest \
    run

Docker Compose

示例Compose配置,见 docker-compose.yml

git clone https://github.com/leslieleung/reaper.git
docker compose up -d

常见问题

FAQ

Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 24
Method 17
Struct 9
Interface 1

Languages

Go100%

Modules by API surface

internal/storage/storage.go7 symbols
internal/storage/s3.go6 symbols
internal/storage/file.go6 symbols
internal/scm/github/github.go6 symbols
internal/ui/print.go4 symbols
internal/config/config.go4 symbols
internal/typedef/storage.go2 symbols
internal/typedef/repository.go2 symbols
internal/scm/repo.go2 symbols
internal/rip/repository.go2 symbols
cmd/root.go2 symbols
cmd/bury/bury.go2 symbols

For agents

$ claude mcp add reaper \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page