Branchname

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 3, 2026

根據問題標題和編號,按照儲存庫的命名規範產生分支名稱。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Build a branch name from an issue title and number, in the repo's naming convention.

已驗證STDIO僅桌面開發者工具

概覽

Branchname 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Branchname,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

branchname

Naming a branch sounds trivial until every contributor does it differently: fix-login, 123-login-bug, johns-branch, and a dozen variants of the same issue, none of them greppable in the same way. branchname takes the other approach — you hand it the issue, and it hands back one name, built the repo's way every time.

The title is slugified by a fixed, pinned recipe: lowercase it, replace every maximal run of characters outside [a-z0-9] with a single -, and strip leading and trailing -. Punctuation clusters collapse instead of multiplying, digits survive, and characters outside ASCII — accents, dashes, emoji — count as separators like any other punctuation. A title with nothing slugifiable in it at all is an error ("title produces an empty slug"), not a branch named -.

When the slug runs long, it is truncated: cut to exactly max_slug_length characters (40 by default, never below 8), then strip any trailing - the cut left behind, so a branch never ends mid-word on a dangling hyphen.

The slug is then composed in one of four conventions:

  • type-issue-slug (the default) — <type>/<issue_number>-<slug>, for example fix/123-login-redirect-loop. Requires both type and issue_number.
  • type-slug — <type>/<slug>, for example docs/update-install-guide. Requires type.
  • issue-slug — <issue_number>-<slug>, for example 42-login-redirect-loop. Requires issue_number.
  • slug — just <slug>, for example login-redirect-loop. Requires neither.

type is one of feat, fix, chore, docs, refactor, or test. Asking a convention for a component you did not supply is an error naming that component, and malformed input — a missing, empty, or non-string title, an issue_number that is not an integer of at least 1, a type or convention outside its enum, or a max_slug_length that is not an integer of at least 8 — is a validation error naming the offending path, with no partial result. The computation is pure and local: no network, no configuration, and no repository is read or touched — branchname only builds the name.

CLI

bash
npx @reneturcios/branchname make --input args.jsonnpx @reneturcios/branchname --version

args.json contains the full arguments object:

json
{  "title": "Fix login redirect loop",  "issue_number": 123,  "type": "fix"}

convention defaults to "type-issue-slug" and max_slug_length defaults to 40. The result is printed as JSON:

json
{  "branch": "fix/123-fix-login-redirect-loop",  "slug": "fix-login-redirect-loop",  "convention": "type-issue-slug"}

Exit codes: 0 on success, 1 on a runtime error (including an unreadable or invalid input file, or invalid input), 2 on a usage error.

MCP server

bash
npx -y @reneturcios/branchname mcp

MCP client config:

json
{  "mcpServers": {    "branchname": {      "command": "npx",      "args": ["-y", "@reneturcios/branchname", "mcp"]    }  }}

Tools

  • make_branch_name — Build a branch name from an issue title.

    • title (string, required, non-empty) — the issue title to slugify
    • issue_number (integer, optional, at least 1) — the issue number
    • type (string, optional) — change type prefix, one of feat, fix, chore, docs, refactor, test
    • convention (string, optional, default "type-issue-slug") — one of type-issue-slug, type-slug, issue-slug, slug
    • max_slug_length (integer, optional, default 40, at least 8) — maximum slug length before truncation

    Returns {branch, slug, convention}, where slug is the final (possibly truncated) slug and convention echoes the resolved convention.

Docker

bash
docker run -i ghcr.io/cloudcorprecords/branchnamedocker run --rm -v "$PWD:/w" ghcr.io/cloudcorprecords/branchname make --input /w/args.json

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # tsx --test test/*.test.ts (pure local, no network)npm run dev     # run the CLI from source

License

MIT — Copyright (c) 2026 Rene Turcios

來源:README.md,提交 f658c17

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Nov 3, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分