Feature Request: Support custom base URL / domain in ResolveEndpoints (for private Feishu deployments)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Summary
internal/core/types.go:8 has this comment:
// Any other string is treated as a custom base URL.
type LarkBrand string
However, the current ResolveEndpoints implementation (L24-39) only handles "lark" and defaults everything else to open.feishu.cn:
func ResolveEndpoints(brand LarkBrand) Endpoints {
switch brand {
case BrandLark:
return Endpoints{Open: "https://open.larksuite.com", ...}
default:
return Endpoints{Open: "https://open.feishu.cn", ...} // custom URL not implemented
}
}
Use Case
Many enterprises deploy private Feishu instances with custom domains (e.g., open.xfchat.iflytek.com). These instances use the same Open API protocol as open.feishu.cn, but with a different base URL.
Currently, lark-openapi-mcp supports this via the --domain parameter. It would be very helpful if lark-cli also supported custom domains, enabling the full CLI + 19 Skills experience on private deployments.
Proposed Solution
Minimal change (~4 lines) in ResolveEndpoints:
func ResolveEndpoints(brand LarkBrand) Endpoints {
switch brand {
case BrandLark:
return Endpoints{...larksuite.com...}
case BrandFeishu, "":
return Endpoints{...feishu.cn...}
default:
// Treat brand as custom base URL
base := string(brand)
return Endpoints{
Open: base,
Accounts: strings.Replace(base, "open.", "accounts.", 1),
MCP: strings.Replace(base, "open.", "mcp.", 1),
}
}
}
Then in config init, users could set brand: "https://open.xfchat.iflytek.com" to target their private instance.
Impact
This would unlock the entire 19-Skill ecosystem for private Feishu deployments without any architectural changes. The comment on L8 already describes this intent -- this PR would implement it.
Environment
- lark-cli v1.0.0
- Go 1.23+
- Windows 11 / macOS
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in internal/core/types.go at ResolveEndpoints and review the LarkBrand comment and existing Lark and Feishu cases. Implement the documented custom-base-URL behavior, then check config init handling for a custom brand value. Done means custom deployments derive the expected endpoint URLs while the existing Lark and Feishu defaults remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100