larksuite / larksuite/cli

功能请求:支持私有化部署的飞书(自定义 API 端点)

Open
#278 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain/core enhancement
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

功能请求

问题描述

当前 lark-cli 仅支持飞书 SaaS 版(feishu)和 Lark 国际版(lark),无法配置私有化部署飞书的自定义 API 地址。

当前行为
  • lark-cli config init --brand 仅接受 feishulark 两个值
  • API 端点硬编码为 https://open.feishu.cn(或 Lark 对应地址)
  • ~/.lark-cli/config.json 中没有自定义域名或端点的配置字段
  • lark-cli doctor 仅检查硬编码的端点
期望行为

希望能支持自定义 API 基础地址,以适配飞书私有化部署环境。例如:

# 方案A:在 config init 中增加 flag
lark-cli config init --brand feishu --base-url https://open.private-feishu.example.com

# 方案B:在配置文件中增加字段
# ~/.lark-cli/config.json
{
  "apps": [{
    "appId": "cli_xxx",
    "brand": "feishu",
    "baseUrl": "https://open.private-feishu.example.com"
  }]
}

# 方案C:通过环境变量指定
export LARK_BASE_URL=https://open.private-feishu.example.com
使用场景

很多企业客户使用飞书私有化部署方案,拥有自定义域名。这些私有化环境使用相同的 OpenAPI 接口,只是基础 URL 不同。如果不支持自定义端点,lark-cli 及其 AI Agent Skills 将无法在私有化环境中使用。

环境信息
  • lark-cli 版本:1.0.4
  • 操作系统:Windows 11

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the config init --brand and doctor entry points, then trace how API endpoints are selected for commands. Compare the flag, config-file, and environment-variable approaches described in the issue. Done means a chosen configuration supports private deployments consistently and doctor checks the configured endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.