
FormLM
me.formlmv0.5.2更新於 Oct 10, 2026
Build AI-powered forms, scored assessments and professional reports on FormLM, by natural language.
概覽
FormLM 讓助理用自然語言在 formlm.me 上建立 AI 表單、計分測評與專業報告。
- 功能
- 此伺服器以 stdio 方式提供 FormLM CLI,內含 9 個工具與 6 個資源。助理可以規劃並產生表單或測評、新增欄位、定義計分維度與分數區間、設定頁面樣式、配置報告頁面與元件、設定用於解讀的 AI 專家,並發佈結果取得分享連結。唯讀的 snapshot 與 doctor 指令可回報模組狀態與品質問題。
- 適用情境
- 當你希望助理依描述建立、修改、稽核或發佈 FormLM 表單、計分測評、考試、問卷或報告,而不是透過網頁編輯器操作時使用。也適合在一次工作階段中批次產生並驗證多個應用程式。
- 執行需求
- 以 npm 套件(@formlm/cli)透過 npx 在使用者本機執行,需要 Node.js 18 或更新版本。需要 FormLM 帳號,驗證使用存取權杖或聊天內電子郵件驗證碼。可選擇提供 FORMLM_TOKEN 密鑰,FORMLM_BASE_URL 預設指向託管服務。需要能連線至 FormLM 伺服器的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 FormLM,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
formlm-cli
The official CLI & MCP Server for FormLM — let AI Agents build and manage your forms directly.
[npm version] [License: MIT] [Node.js] [MCP Registry]
Keywords: FormLM CLI, MCP Server, AI Agent form builder, form automation, assessment platform CLI, Claude MCP, Cursor MCP, AI-powered forms, formlm-cli, npm CLI tool
What is FormLM?
FormLM is an AI-powered form & assessment platform. It lets you build smart forms, scoring quizzes, and professional evaluation reports — all with natural language instructions.
With formlm-cli, you can control FormLM directly from your terminal or plug it into any AI Agent (Claude, Cursor, GPT, etc.) as an MCP Server — no UI needed.
Visit the official website: https://formlm.me
formlm-cliis listed in the official MCP Registry asme.formlm/cli— search "formlm" in any MCP-capable client (Claude Desktop, Cursor, VS Code Copilot, Codex CLI) to install it.
What's New in v0.5.0
Hardening round driven by real agent field reports (batch runs of 50 apps), plus a second pass that re-checked every reported item against the code and machine-verified all documented commands.
-
share publishnow defaults to anonymous access (--access visitor) and exposes--access / --perm / --days / --no-style; a newshare setsubcommand passes the raw server parameters through, so "anyone + permanent" no longer requires calling the internal API. Previously publish was hard-wired toform-type all, which requires login — anonymous respondents got the login page. -
expert config --enableno longer self-destructs: the value is forwarded space-separated (--enable true) and the server accepts it again. Before,--enable=truewas rejected as an unknown option, the whole command was discarded, yet the envelope still reported success. -
Parameter errors are no longer reported as success:
picoclivalidation failures now map tocode != 0/ok:falseinstead of hiding the error text insidedatawithcode:0. -
Uniform machine output:
snapshotandauth statusnow honour--json/FORMLM_JSON=1with the same{ok,code,message,data}envelope as everything else, and human guidance lines moved to stderr, so stdout is a single parseable line. -
app removeis a real alias ofapp delete;app listgained--all / --limit / --page / --with-urls;app urlsreturnsshareToken,published,shareType/Perm/Dayand absolute https URLs. -
New
doctorcommand (and MCPformlm_doctortool): one read-only call per app covering scoring coverage, dead/empty experts, styling, unexpected certificate pages, language consistency (--expect-lang,--deepscans widget text) and share access + reachability. -
New
snapshot --summarycompact audit profile (counts, dimension names, report pages, expert flags, share type/perm/day + shareToken) — batch verification no longer needs to parse full module payloads. -
Resume after the plan cache expires:
smart plan --save-plan <file>+smart execute --plan-file <file>(the server plan cache is ~10 minutes, and the docs now say so). -
Retry/backoff: read-only commands retry with exponential backoff on 408/429/5xx; writes are never auto-retried. Tunable via
FORMLM_RETRIES/FORMLM_TIMEOUT_MS. -
report page remove --name "结业证书"resolves page names server-side;report page updateverifies the page exists (opt into upsert with--upsert); write confirmations are compact;widget removenow persists (it previously returned success without saving). -
smart generatenow exists as a resumability-preserving wrapper overplan → execute×N → (--publish) → (--doctor), and the README finally matches the command surface. Earlier versions documented asmart generatethat was never implemented (the first command every agent ran, and it failed). -
Generation is now pin-able:
smart plan --dimensions "A|B|C"fixes the scoring dimension names and count,--app-namefixes the app display name,--dry-runvalidates a prompt without leaving a residue app. Unpinned dimensions used to be renamed/recounted by the AI, forcing page↔app rework (batch measurement: 11/13 pages). -
Docs are now machine-verified against the command surface: every
formlm-cli …example in README/INSTALL is executed and checked for unknown/missing options (149 examples, 0 drifts), so documented commands cannot silently diverge again. -
smart planoutput carries structuredmodules/missingModules, so callers can detect coverage gaps (e.g. noexpertfor non-consultation plans) without parsing prose; the raw exec403now lists the whitelisted command set.
What's New in v0.2.1
- Field ID validation:
field add --idnow enforces snake_case regex (^[a-zA-Z0-9_]+$) - Snapshot
--mdflag: Unified JSON output by default, with optional--mdfor markdown format - Error handler: Missing required options now print usage hints instead of bare error messages
- Server-side fixes: SessionContext appId sync, ScaleCommand B5 reversal removal, CLI --app extraction
What's New in v0.2.0
The MCP architecture has been completely redesigned from the ground up:
- 34 flat tools → 6 layered tools + 6 knowledge resources
- Intelligence Layer:
formlm_generatewraps the server-side AssessAgent pipeline - Domain Knowledge: 6 MCP resources expose SKILL.md files directly to AI agents
- State Awareness:
formlm_snapshotaggregates all module states in one call - P0 Constraints: Embedded directly in command descriptions — AI sees them every time
Architecture
Installation
Requires Node.js ≥ 18.
For a detailed step-by-step guide (including MCP setup for Claude Desktop / Cursor / Codex CLI / Windsurf / Cline), see INSTALL.md.
Quick Start
1. Login
2. Smart Pipeline (AI-recommended)
Creation is a two-phase pipeline (plan → execute per module). smart generate is the one-shot wrapper
of the same steps when you do not need per-module control:
Or step by step (recommended for batches — every step is resumable):
⚠️ Module coverage depends on planType. Only
consultationplans include anexperttask;assessment / exam / report / survey / learndo not.smart planprints a warning when a module is missing — add an expert explicitly withformlm-cli expert config --app <appId> --name ... --role ... --kbText ....
⚠️ Styling: the
connectmodule of the pipeline applies the visual style. If you skip the pipeline and use Direct Commands instead, you MUST runconnect style apply-all, otherwise the form keeps the plain unstyled look.
3. Get All App URLs (after creating)
4. Enable the Data API (form backend for any page)
5. Beautify Your Form (if using Direct Commands)
6. Direct Commands (for fine-grained control)
7. Use as MCP Server
This starts the MCP Server (stdio transport) with 9 tools + 6 resources, ready for AI Agents to connect.
Command Reference
Smart Pipeline (AI-recommended)
There are two ways in: smart plan + smart execute (explicit, resumable — recommended for batches),
or smart generate, which is a thin wrapper over exactly those steps:
Pinning vs. improvising. By default the Plan AI invents dimension names/count and the app name, which breaks page↔app consistency in batch runs. Use
--dimensionsto pin the dimension list (exact names + count) and--app-nameto pin the display name; verify afterwards withsnapshot --summary(it reportsdimNames).
--dry-runvalidates a prompt/spec and deletes the probe app again (the server always creates an app when planning), so experimentation leaves no residue.Success is machine-readable:
smart executereturnsdata.taskStatus(success/error), andsmart generatereturns{appId, modules:[{module,status,error}], publish, doctor, resumeHint}— trust those fields, not the human wording. On a mid-run failure the app is kept andresumeHintgives the exact resume command.
Snapshot
Measured: 5 apps × 7 module queries = 35 requests in ~13s in a single process, versus one cold Node process per app before (the old serial-subprocess pattern took roughly 5× that, plus no connection reuse).
snapshot is client-synthesized: it fans out to the 6 assess <module> query commands. There is no
server-side assess snapshot, so calling that over raw POST /api/v1/mcp/exec returns 403 by design — loop
the 6 queries yourself when you need HTTP-side batching. If a module fetch fails, the result carries
_errors / _degraded (treat it as unknown, not as "empty module").
Doctor (read-only quality audit)
Output is the standard envelope; ok:false + exit 1 when a fail-level finding exists, so batch drivers
can gate on it. Each finding carries a ready-to-run fix command. Read-only — it never writes.
Skill Documents
Auth
Profile (multi-account)
App
Field
Scale (Dimensions & Scoring)
Connect (Page Styling & Visual Design)
Report (Pages & Widgets)
Expert (AI Interpretation)
Boolean flags are forwarded space-separated (
--enable true), never--enable=true— the server parses them with picocliarity 0..1.expert configenables the agent by default; pass--enable falseto configure it while leaving it switched off.
Share (Publish & Access)
Validity rule (server-side): only
--days 1..30are honoured as a finite window;0,forever, or anything above 30 normalizes to permanent (sentinel3650000). There is no 90-day/1-year publish window on this channel.Verifying "anyone can access":
curlreturning 200 on the share URL proves nothing — the SPA shell answers 200 even behind the login gate. Useshare verify(or readshare query's type/perm/day triple).
smart execute --module sharevsshare publish: the pipeline's share module applies the plan's publish settings;share publishis the explicit, idempotent CLI entry that also guarantees anonymous + permanent defaults and prints the final URLs/shareToken. Re-runningshare publishis safe. If you never styled the app, publish auto-applies a default style first (30-120s AI generation) — pass--no-styleto skip that.
The Data API turns a form into an HTTP data endpoint: POST JSON to the endpoint (or use the /form path for native HTML forms), read records back via the query endpoint, and hand the ?help URL to an AI agent so it can discover the API on its own.
MCP Integration
FormLM CLI works as a standard MCP Server over stdio and plugs into any MCP-compatible AI platform — Claude Desktop, Cursor, Codex CLI, Windsurf, Cline, etc.
⚠️ macOS/Linux users: desktop AI clients often launch the MCP server without your full terminal PATH, which can cause
command not founderrors. See INSTALL.md → Step 4 for theenv.PATHfix, per-platform config file locations (including Codex CLI's TOML format), and the full setup guide.
No token? No problem. If you omit
FORMLM_TOKEN, the AI will prompt you to authenticate via theauth_logintool — paste your Access Token (from formlm.me → Workspace → Account Settings; recommended), complete an in-chat email verification-code login viaauth_email_code(no browser needed), or use email + password directly in the chat.
Available MCP Tools (9)
Available MCP Resources (6)
Environment Variables
Scripting & Batch Use
Envelope: { "ok": bool, "code": int, "message": string, "data": object|null } — data is always parsed
(no double-decoding needed), and validation/parameter errors now come back with a non-zero code
instead of hiding the error text inside data while reporting success.
Status codes
Raw POST /api/v1/mcp/exec whitelist
The exec channel accepts 3-token command paths only (assess <module> <action>). Everything else returns
403 not allowed via MCP by design — notably assess snapshot and assess field … do not exist on the
server (they are client-side wrappers), so batch HTTP consumers must call the underlying queries:
Throughput notes
- Every CLI invocation is a fresh Node process plus its own HTTP calls; for large batches, run independent apps concurrently (the server tolerates moderate parallelism) rather than serially.
snapshot/doctorfan out their module queries in parallel; use--module/--summaryto keep payloads small.- Slow server? Raise
FORMLM_TIMEOUT_MSandFORMLM_RETRIESinstead of hand-rolling retry loops. - Batch over many apps inside one process:
snapshot --apps …/doctor --apps …, or import the built module directly (import { execCommand } from '@formlm/cli/dist/exec.js') and loop — HTTP connections are reused and there is no per-app Node cold start.
Version coupling (CLI ↔ server)
Some commands rely on server options added together with them; against an older server they fail with a
visible 400 Unknown option … (never a silent success, thanks to the false-success guard):
Links
- Website: https://formlm.me
- Platform: Sign up and start building at formlm.me
- GitHub: https://github.com/formlm/cli
- npm: https://www.npmjs.com/package/@formlm/cli
Contact
Have questions, feedback, or need help getting started?
Feel free to reach out — we're happy to help.
License
MIT © FormLM
來源:README.md,提交 0e7b839
工具
0版本歷史
1- v0.5.2最新Oct 10, 2026


