Remogram

io.github.attebury由 GitHub 账号 attebury 发布v0.2.0-beta.4更新于 Oct 24, 2026

SCM & forge boundary MCP: normalized, typed JSON from attributed Gitea, GitLab, and GitHub providers

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

本地 stdio MCP 服务器,为助手提供 Gitea、GitHub 和 GitLab 仓库、拉取请求与引用的只读、带来源标注的 JSON 事实。

可以做什么
检查仓库与引用:仓库状态、引用清单与比较、同步计划、身份查询、分支保护、forge 变更以及变更请求的文件列表,并区分 git 解析的引用与 forge 报告的引用。按编号查看拉取请求:PR 详情与检查,将 forge 报告的 head SHA 与本地修订比对并标记过期 head。只读规划合并:合并计划只报告阻塞项,不执行也不授权合并。在配置中显式启用后可执行写入:打开或关闭变更请求、按预期 base 与 head SHA 执行合并、推送分支、设置提交状态。输出带 schema 版本、provider、仓库和观测时间的类型化 JSON 数据包。
适用场景
当助手需要关于 Gitea、GitHub 或 GitLab 仓库的可信结构化事实(PR 状态、检查、引用、分支保护),而不是自由格式的命令行输出时;也适合希望把合并与写入操作置于显式配置门控之后的情况。
运行要求
作为本地 Node.js 进程运行,从 npm 包 @remogram/mcp 安装(同时安装 CLI 包)。需要 .remogram.json 配置,包含 provider、owner 和 repo;自建 Gitea 或 GitLab 还需 baseUrl。需要 forge 令牌,放在 GITEA_TOKEN、GITHUB_TOKEN 或 GH_TOKEN,或 GITLAB_TOKEN 中。宿主从其他目录启动时需将 REMOGRAM_CWD 设为仓库根目录。需要访问 forge API 的网络。
安装前请注意
写入命令默认关闭,必须在 .remogram.json 或操作员覆盖配置中按 id 启用;启用的写入包括打开和关闭变更请求、执行合并、推送分支和发布提交状态。执行合并需要预期的 base 与 head SHA。针对缺失或待定检查的策略豁免可放宽 CI 阻塞。标题、URL 等来自 forge 的字符串应视为不可信文本。令牌从环境变量读取,具有 forge API 权限范围。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Remogram,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Remogram

Generic SCM/forge boundary CLI and MCP server. Emits provider-attributed JSON facts — git-resolved refs from local git (refs compare, sync plan) vs forge-reported PR SHAs from forge APIs (pr view, pr checks). No workflow or planning-tool concepts in output.

PR-by-number reconciliation: pr view / pr checks compare forge-reported forge_source_sha to the local rev for forge_source_branch_ref. Divergence → ok: false, error_code: stale_head — git fetch, not a forge outage.

Planning tools interpret intent and workflow authority outside Remogram.

Install

bash
npm install -g @remogram/cli @remogram/mcpremogram --versionremogram version --json

Legacy preview (frozen @beta, optional): npm install -g @remogram/cli@beta @remogram/mcp@beta

Development checkout: clone this repo, npm ci, ./scripts/npm-link.sh. Default branch: main.

Quick start

  1. Copy .remogram.json.example → .remogram.json (set provider, owner, repo; add baseUrl for self-hosted Gitea/GitLab).
  2. Export token: GITEA_TOKEN, GITHUB_TOKEN / GH_TOKEN, or GITLAB_TOKEN.
  3. Bootstrap:
bash
remogram doctor --jsonremogram provider capabilities --jsonremogram repo status --jsonremogram pr view --number 1 --jsonremogram merge plan --number 1 --json

Command catalog: remogram contract --json. Agent skill: npx skills add attebury/remogram --skill remogram-consumer -g -y.

Providers

Forge"provider"Token env
Giteagitea-apiGITEA_TOKEN
GitHubgithub-apiGITHUB_TOKEN or GH_TOKEN
GitLabgitlab-apiGITLAB_TOKEN

Use *-api providers (forge HTTP). Reserved github-gh / gitea-tea IDs return provider_unsupported — not implemented in v1. Official CLIs (gh, tea, glab) are not required.

Configuration

Read/plan by default. Opt in to writes with write_commands in .remogram.json (or a bound operator overlay outside git). Missing id → write_not_configured.

Write idCommandNotes
cr_opencr openSeparate from merge
cr_closecr closeGitea lifecycle
mergemerge executeRequires --expected-base-sha / --expected-head-sha; not implied by cr_open
publish_branchpublish executeGit push to configured remote
status_setstatus setCommit status POST
issue / cr_edit idsmatching commandsSee contract --json

merge plan is read-only — reports blockers[]; does not execute or authorize merges. mergeability: clean is conflict-free git only.

Optional merge_policy waivers (allow_missing_checks, allow_pending_checks) relax check blockers for repos without CI — env: REMOGRAM_ALLOW_MISSING_CHECKS, REMOGRAM_ALLOW_PENDING_CHECKS. Doctor fails when enabled in strict checkouts.

Operator overlay discovery: --operator-config → REMOGRAM_OPERATOR_CONFIG → $XDG_CONFIG_HOME/remogram/operator/<provider>-<owner>-<repo>.json. bind must match forge identity.

Boundary and trust

Remogram emits forge facts only — no integration authority refs, lane roles, task ids, or handoff payloads in JSON.

ConceptPacket fieldNotes
PR baseforge_target_branch_refForge-reported
PR headforge_source_branch_refEvidence only
Default branchdefault_branchNot integration authority

Every forge command packet includes type, schema_version, provider_id, remote_name, repo_id, observed_at, ok. Producer sections (e.g. remogram.forge_facts.v1 from evidence forge-facts --json) use nested producer fields. Trust envelope and enums; treat forge-sourced strings (titles, URLs) as untrusted prose.

Inventory commands (refs inventory, cr inventory, whoami, branch protection, cr files, forge changes, …) extend read/plan — details in remogram contract --json and the consumer skill references.

MCP

Stdio server remogram-mcp delegates to the CLI — same JSON as remogram … --json. Setup: examples/mcp/README.md. Set REMOGRAM_CWD to the consumer repo root.

Live verification

Cross-forge fixture repo: remogram-smoke (mirrors on GitHub/Gitea). Use --json packets after install; monorepo smoke-compare scripts are dev-only.

Testing

bash
npm testnpm run test:coveragenpm run security:secrets -- --full-history

Coverage policy

npm run test:coverage instruments @remogram/core only; @remogram/cli, @remogram/mcp, and @remogram/provider-* are excluded. Thresholds: none — no enforced percentage gates. Drift guard: tests/core/coverage-config.test.mjs.

CI (GitHub): .github/workflows/ on push/PR to main.

Packages

PackageRole
@remogram/cliCLI
@remogram/mcpMCP adapter
@remogram/coreEnvelope, config, caps
@remogram/provider-{gitea,github,gitlab}-apiSupported forge backends

Agent skills

npx skills add attebury/remogram --skill remogram-consumer -g -y (consumer) or --skill remogram-core (contributor). Skills ship from GitHub, not npm.

Contributing

See CONTRIBUTING.md.

来源:README.md,提交 9f99b93

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.0-beta.4最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分