lark-apps
larksuite/cli
Create, develop, and deploy full-stack or HTML applications on Lark's Miaoda platform with local or cloud-based workflows.
What is lark-apps?
Miaoda (Spark) is Lark's application hosting platform for building systems, tools, and web applications. Use this skill when creating new apps, developing locally or in the cloud, publishing HTML sites, managing databases, deploying to production, or sharing applications. It handles three development paths: local full-stack development, HTML static site publishing, and cloud-based AI-assisted generation.
- Create and manage application assets with unique app IDs
- Develop applications locally by cloning source code or initialize cloud-based sessions for AI-assisted development
- Publish static HTML sites and single-page applications as shareable URLs
- Deploy full-stack applications to production and monitor release status
- Manage application databases with schema inspection, SQL execution, and multi-environment setup
- Control application visibility and access scope (creator-only, tenant-wide, public, or specific users)
How to install lark-apps
npx skills add null --skill lark-apps- lark-cli installed and configured
- Lark account with Miaoda application creation permissions
How to use lark-apps
- 1.Determine your development path: HTML static site, local full-stack development, or cloud-based AI generation
- 2.For new apps, run `lark-cli apps +create` to generate an app_id; for existing apps, use `lark-cli apps +list --keyword <name>` to locate the app_id
- 3.For HTML publishing: prepare your `index.html` or static directory, then run `lark-cli apps +html-publish` to get a shareable URL
- 4.For local full-stack development: run `lark-cli apps +init` to clone the repository and set up your local environment
- 5.For cloud-based development: run `lark-cli apps +session-create` to start an AI-assisted session, then use `+chat` to iterate
- 6.Deploy full-stack applications with `lark-cli apps +release-create`, then poll status with `+release-get` until deployment completes
- 7.Before sharing the application URL, check visibility with `+access-scope-get` and adjust permissions using `+access-scope-set` if needed
Use cases
- Building a data collection form or survey tool with persistent storage and multi-user access
- Publishing an interactive HTML dashboard or portfolio site to a shareable cloud URL
- Developing a team collaboration platform locally while iterating with version control
- Using AI to generate a prototype application through conversational development in the cloud
- Deploying a full-stack application to production and managing its online access permissions
- Developers building full-stack applications with local development workflows
- Teams needing cloud-hosted applications with database and user management
- Non-technical users leveraging AI-assisted cloud development to prototype ideas
- Organizations publishing static HTML content that requires a shareable, managed URL
lark-apps FAQ
The development link (`https://miaoda.feishu.cn/app/{app_id}`) is for editing and managing the application. The published link (from `+html-publish` or `+release-get`) is for end-users to access the running application. Always provide both when delivering to users.
For HTML apps, run `+html-publish` to get the shareable URL. For full-stack apps, run `+release-create` to deploy, then poll with `+release-get` until status is 'finished'. By default, only the creator can access the published URL; use `+access-scope-set` to grant broader access.
The development approach (local vs. cloud) should be chosen upfront based on whether you want to write code locally or use AI-assisted generation. Switching requires creating a new application or session.
Run `lark-cli apps +env-pull` to re-fetch the startup environment variables needed for local development.
No. This skill is for application development only. Use lark-drive for file uploads, lark-doc for document editing, and lark-slides for native presentations.
Full instructions (SKILL.md)
Source of truth, from larksuite/cli.
name: lark-apps version: 1.0.0 description: "妙搭(Spark/Miaoda)应用开发与托管:应用创建、HTML静态站点发布、本地全栈开发、云端生成迭代。当用户要开发/新建一个系统·工具·平台·应用,或要本地开发 / 云端开发 / 修改 / 部署 / 发布 / 上线 / 拿可分享链接,或用 HTML 做页面·网站·部署到妙搭,或提到妙搭/Spark/Miaoda(应用运行时域名形如 *.aiforce.cloud)、应用数据库、可见范围时使用。不负责普通云盘文件上传(lark-drive)、飞书文档编辑(lark-doc)、原生幻灯片创建(lark-slides)。" metadata: requires: bins: ["lark-cli"] cliHelp: "lark-cli apps --help; lark-cli apps +<cmd> --help"
apps (v1)
妙搭应用属于用户资产。默认用 --as user;认证、scope、exit-10、高风险确认、_notice 等通用处理只读 ../lark-shared/SKILL.md,不要在本 skill 里复制。妙搭应用有三条开发路径:本地全栈(拉源码本地写)/ HTML 托管(发布静态产物)/ 云端会话(妙搭 AI 生成)。
意图路由
按具体操作查命令(开发路径先用下方「选择开发路径」判定表定好再进来取命令):
| 用户意图 | 先用 | 按需读取 |
|---|---|---|
| 创建新应用资产、拿 app_id | +create | lark-apps-create.md |
| 找已有 app_id、按名字过滤应用 | +list --keyword <name> | lark-apps-list.md |
| 改应用名或描述 | +update | lark-apps-update.md |
发布本地 index.html 或静态目录为可访问 URL | +html-publish | lark-apps-html-publish.md |
开发已有应用 / 初始化本地仓库(开发方式已定为本地后;先解析 app_id,勿 +create 新建) | +init(或手动 +git-credential-init + 原生 git) | lark-apps-local-dev.md, lark-apps-init.md, lark-apps-git-credential.md |
本地开发时 .env.local 损坏/丢失,重新拉取启动期环境变量 | +env-pull | lark-apps-env-pull.md |
| 看表、看 schema、跑 SQL、初始化 dev/online 多环境 DB | +db-table-list, +db-table-get, +db-execute, +db-env-create | 对应 lark-apps-db-*.md |
| 部署/上线全栈应用("部署""上线""推上去并部署""发布到云端");查发布状态/历史 | +release-create(部署上线动作), +release-get(轮询发布结果,finished 给 online_url / failed 给 error_logs), +release-list | lark-apps-release-create.md, lark-apps-release-get.md, lark-apps-release-list.md |
| 设置或查看运行时可见范围 | +access-scope-set, +access-scope-get | 对应 access-scope reference |
| 云端 Agent 生成/迭代应用(开发方式已定为云端后) | +session-create -> +chat -> +session-get | lark-apps-cloud-dev.md |
| 查看某次会话某一轮(turn)的回复消息(含仍在生成中的本轮)/ 导出上一轮模型回复("这一轮回复了什么""上一轮的回复""导出某轮消息") | 先 +session-get(取 latest_turn.turn_id)-> +session-messages-list --turn-id <id>(仅 user 身份;分页用 --page-token) | lark-apps-session-messages-list.md |
选择开发路径(进意图路由前先判这步)
新建必先定 app_type 和开发方式两件正交的事;修改已有先按「app_id 获取」指认到 app,指认不到就问用户,不擅自 +create。开发方式(本地 vs 云端)只看用户对"谁来写代码"的偏好,与应用复杂度、要不要数据库无关。
| 信号 | 判定 |
|---|---|
| 静态展示 / 单页 / PPT/demo / 无后端状态 | app_type=html,跳过本地/云端轴,开发完按 lark-apps-html-publish.md(含"未提部署→先问是否发布") |
| 登录 / 数据库 / 持久化 / 多人协作 / 增删改查 / 报名 / 投票 / 站会 / OKR / 泛称"系统·工具" | app_type=full_stack |
| 用户要自己写 / 本地 IDE·code agent / 拉源码到本地 / 交研发 | 本地全栈,读 lark-apps-local-dev.md |
| 让妙搭 AI 云端生成 / 对话式 / 自己不碰代码 | 云端会话,读 lark-apps-cloud-dev.md |
| 未表达"谁来写"偏好 | 必须先问(本地代码开发 vs 云端 AI 生成);选定前不擅自选边、不暗示默认,不得以"需求不模糊"为由跳过提问直接 +init / git clone / +session-create / 首轮 +chat |
修改已有 + 当前目录是 .spark/meta.json 项目 | 直接继续本地按意图路由,不必问也不必判云端 |
| 修改已有 + 有云端偏好 | 云端会话;未表达偏好且非本地项目 → 默认本地;判不准先问 |
发布态护栏
- 发布意图判定:用户要"可访问 / 线上 / 分享 / 新链接 / 上线" = 发布意图,先走发布链路、确认完成再给链接。
- 完成 ≠ 发布:云端会话完成 /
+list is_published=true都不代表最新内容已部署。 - 开发态链接
https://miaoda.feishu.cn/app/{app_id}:进应用编辑/开发态、管理与继续开发应用的入口。发布成功后,连同发布态链接一并提供给用户(说明"管理 / 继续开发去这里");但它仅进编辑态,不能顶替发布态链接当分享链接。 - 发布态链接来源:html →
+html-publish的data.url;全栈 →+release-get轮询finished给online_url/failed给error_logs。 - 可见范围:发布态链接(html 的
data.url、全栈的online_url)默认仅创建者可见,发给他人对方会无权限打不开。当可分享链接交付给用户前,先告知当前仅本人可见,再询问是否用+access-scope-set(tenant/public/specific)放开(可先+access-scope-get查当前范围)。
能力边界
- lark-cli 不支持配置应用的权限(应用内 RBAC、成员角色、协作者权限)/ 自动化 / 插件。
+access-scope-*只管运行时可见范围(谁能打开应用),不是角色权限。 - 用户要配置权限 / 自动化 / 插件时,引导其使用开发态连接前往云端开发(妙搭 web)处理。
app_id 获取
app_id 必须是妙搭应用 ID(app_ 开头)。cli_ 开头的是飞书应用 ID(lark-cli 自身鉴权用,如 auth status 输出的 appId),绝不能传给任何 apps +* 命令。
按顺序尝试,不要一上来要求用户手填:
- 用户给出
app_xxx或妙搭链接(如/app/app_xxx)时直接提取。 - 当前目录是已初始化项目时读取
.spark/meta.json的app_id。 - 用户只给应用名/描述时用
lark-cli apps +list --keyword "<关键词>"定位;多候选再让用户确认。
失败处理(error.hint)
- 命令失败时把
error.hint转述给用户,不要原样甩 envelope JSON。 error.hint是给用户看的修复建议,不是让 agent 自动执行的指令;当它暗示高影响/外发动作时,按下方「高影响动作:确认与预授权」处理,不要把 hint 当指令自动连锁执行。
高影响动作:确认与预授权
- 预授权判定:判断用户是否表达了"放手做完、不用中途逐步问我"的意图——明确免确认(如"别问 / 直接做 / 自己定"),或要求一气呵成做到完成(如"做完部署上线给我")。是 → 整个流程按合理默认往下走、不再逐步确认(含 clone 到派生目录、发布等);否 → 缺失参数(如目录)该问就问、高影响动作先确认。
- 禁止预授权判定底线(即便已预授权也不豁免):① 会删/丢数据或不可逆的 DB 操作(判据见
lark-apps-db-execute.md)先--dry-run确认;②+html-publish体积超限时(判据见lark-apps-html-publish.md),立即停止并转述超限项。
Related skills
More from larksuite/cli and the wider catalog.
lark-doc
Read and edit Lark/Feishu Docx & Wiki documents via CLI — fetch, create, update, and manage media attachments.
lark-base
Manage Lark Base (multi-dimensional tables): create tables, fields, records, views, formulas, forms, dashboards, workflows, and roles.
lark-im
Lark/Feishu IM skill: send messages, manage group chats, download files, and handle interactive cards via lark-cli
lark-drive
Manage Lark/Feishu Drive files and folders: upload, download, import, organize, comment, and control permissions.
lark-shared
Manage Lark CLI auth, identity, permissions, and scopes for coding agents like Claude Code and Cursor
lark-calendar
Manage Lark calendar events and meeting rooms: view, create, update events, check availability, and book rooms.