@lowdefy/docs-content 0.0.0-experimental-20260710073520

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +20 -0
  3. package/content/actions/callapi.md +66 -0
  4. package/content/actions/callmethod.md +41 -0
  5. package/content/actions/copytoclipboard.md +32 -0
  6. package/content/actions/displaymessage.md +53 -0
  7. package/content/actions/downloadcsv.md +89 -0
  8. package/content/actions/fetch.md +50 -0
  9. package/content/actions/geolocationcurrentposition.md +56 -0
  10. package/content/actions/link.md +104 -0
  11. package/content/actions/login.md +85 -0
  12. package/content/actions/logout.md +56 -0
  13. package/content/actions/pdfmake.md +304 -0
  14. package/content/actions/request.md +67 -0
  15. package/content/actions/reset.md +27 -0
  16. package/content/actions/resetvalidation.md +85 -0
  17. package/content/actions/scrollto.md +85 -0
  18. package/content/actions/setdarkmode.md +62 -0
  19. package/content/actions/setfocus.md +33 -0
  20. package/content/actions/setglobal.md +63 -0
  21. package/content/actions/setlocale.md +69 -0
  22. package/content/actions/setstate.md +70 -0
  23. package/content/actions/throw.md +72 -0
  24. package/content/actions/validate.md +87 -0
  25. package/content/actions/wait.md +24 -0
  26. package/content/agents/agent-endpoint-tools.md +190 -0
  27. package/content/agents/agent-mcp-tools.md +124 -0
  28. package/content/agents/agent-multi-agent.md +136 -0
  29. package/content/agents/agent-properties.md +174 -0
  30. package/content/agents/agent-server-hooks.md +336 -0
  31. package/content/agents/agentchat.md +515 -0
  32. package/content/agents/agentconversations.md +148 -0
  33. package/content/concepts/ai-agent-docs.md +190 -0
  34. package/content/concepts/cli.md +213 -0
  35. package/content/concepts/connections-and-requests.md +7 -0
  36. package/content/concepts/custom-html.md +3 -0
  37. package/content/concepts/custom-styling.md +161 -0
  38. package/content/concepts/events-and-actions.md +271 -0
  39. package/content/concepts/hosting-files.md +18 -0
  40. package/content/concepts/i18n.md +320 -0
  41. package/content/concepts/keyboard-shortcuts.md +218 -0
  42. package/content/concepts/layout-overview.md +478 -0
  43. package/content/concepts/lists.md +144 -0
  44. package/content/concepts/logger.md +43 -0
  45. package/content/concepts/lowdefy-schema.md +365 -0
  46. package/content/concepts/menus.md +144 -0
  47. package/content/concepts/module-authoring.md +564 -0
  48. package/content/concepts/modules.md +338 -0
  49. package/content/concepts/operators.md +45 -0
  50. package/content/concepts/overview.md +19 -0
  51. package/content/concepts/references-and-templates.md +207 -0
  52. package/content/concepts/secrets.md +24 -0
  53. package/content/concepts/selectors.md +143 -0
  54. package/content/connections/amazonredshift.md +176 -0
  55. package/content/connections/anthropic.md +232 -0
  56. package/content/connections/awss3.md +313 -0
  57. package/content/connections/azureblobstorage.md +133 -0
  58. package/content/connections/elasticsearch.md +371 -0
  59. package/content/connections/google.md +228 -0
  60. package/content/connections/googlecloudstorage.md +139 -0
  61. package/content/connections/googlesheet.md +313 -0
  62. package/content/connections/knex.md +206 -0
  63. package/content/connections/mariadb.md +177 -0
  64. package/content/connections/mcp.md +134 -0
  65. package/content/connections/mongodb.md +739 -0
  66. package/content/connections/mssql.md +191 -0
  67. package/content/connections/mysql.md +192 -0
  68. package/content/connections/openai-connection.md +228 -0
  69. package/content/connections/postgresql.md +200 -0
  70. package/content/connections/redis.md +116 -0
  71. package/content/connections/sendgridmail.md +94 -0
  72. package/content/connections/smtp.md +149 -0
  73. package/content/connections/sqlite.md +187 -0
  74. package/content/connections/stripe.md +115 -0
  75. package/content/container-blocks/affix.md +413 -0
  76. package/content/container-blocks/alert.md +937 -0
  77. package/content/container-blocks/badge.md +1222 -0
  78. package/content/container-blocks/box.md +1453 -0
  79. package/content/container-blocks/card.md +1200 -0
  80. package/content/container-blocks/carousel.md +2247 -0
  81. package/content/container-blocks/collapse.md +1335 -0
  82. package/content/container-blocks/configprovider.md +1070 -0
  83. package/content/container-blocks/confirmmodal.md +1159 -0
  84. package/content/container-blocks/content.md +597 -0
  85. package/content/container-blocks/descriptions.md +870 -0
  86. package/content/container-blocks/drawer.md +1379 -0
  87. package/content/container-blocks/dropdownmenu.md +643 -0
  88. package/content/container-blocks/flex.md +1510 -0
  89. package/content/container-blocks/footer.md +380 -0
  90. package/content/container-blocks/googlemaps.md +546 -0
  91. package/content/container-blocks/googlemapsheatmap.md +607 -0
  92. package/content/container-blocks/googlemapsscript.md +61 -0
  93. package/content/container-blocks/header.md +302 -0
  94. package/content/container-blocks/label.md +739 -0
  95. package/content/container-blocks/layout.md +604 -0
  96. package/content/container-blocks/masonry.md +1090 -0
  97. package/content/container-blocks/mobilemenu.md +1244 -0
  98. package/content/container-blocks/modal.md +1180 -0
  99. package/content/container-blocks/pageheadermenu.md +614 -0
  100. package/content/container-blocks/pagesidebarlayout.md +438 -0
  101. package/content/container-blocks/pagesidermenu.md +651 -0
  102. package/content/container-blocks/popover.md +1421 -0
  103. package/content/container-blocks/result.md +972 -0
  104. package/content/container-blocks/sider.md +1064 -0
  105. package/content/container-blocks/span.md +747 -0
  106. package/content/container-blocks/spinner.md +267 -0
  107. package/content/container-blocks/splitter.md +1735 -0
  108. package/content/container-blocks/tabs.md +1718 -0
  109. package/content/container-blocks/tooltip.md +1274 -0
  110. package/content/container-blocks/watermark.md +515 -0
  111. package/content/controls/for.md +103 -0
  112. package/content/controls/if.md +107 -0
  113. package/content/controls/log.md +50 -0
  114. package/content/controls/parallel.md +71 -0
  115. package/content/controls/parallel_for.md +36 -0
  116. package/content/controls/reject.md +56 -0
  117. package/content/controls/return.md +66 -0
  118. package/content/controls/set_state.md +98 -0
  119. package/content/controls/switch.md +90 -0
  120. package/content/controls/throw.md +79 -0
  121. package/content/controls/try.md +88 -0
  122. package/content/deployment/docker.md +149 -0
  123. package/content/deployment/node-server.md +27 -0
  124. package/content/deployment/vercel.md +101 -0
  125. package/content/display-blocks/aggrid.md +1459 -0
  126. package/content/display-blocks/anchor.md +336 -0
  127. package/content/display-blocks/avatar.md +1154 -0
  128. package/content/display-blocks/breadcrumb.md +517 -0
  129. package/content/display-blocks/button.md +758 -0
  130. package/content/display-blocks/calendar.md +156 -0
  131. package/content/display-blocks/dangeroushtml.md +314 -0
  132. package/content/display-blocks/dangerousmarkdown.md +423 -0
  133. package/content/display-blocks/diffgit.md +44 -0
  134. package/content/display-blocks/difflist.md +225 -0
  135. package/content/display-blocks/diffsidebyside.md +56 -0
  136. package/content/display-blocks/difftimeline.md +94 -0
  137. package/content/display-blocks/divider.md +406 -0
  138. package/content/display-blocks/download.md +60 -0
  139. package/content/display-blocks/dropdownbutton.md +661 -0
  140. package/content/display-blocks/echart.md +418 -0
  141. package/content/display-blocks/floatbutton.md +545 -0
  142. package/content/display-blocks/html.md +311 -0
  143. package/content/display-blocks/icon.md +717 -0
  144. package/content/display-blocks/img.md +479 -0
  145. package/content/display-blocks/markdown.md +520 -0
  146. package/content/display-blocks/markdownwithcode.md +730 -0
  147. package/content/display-blocks/menu.md +1123 -0
  148. package/content/display-blocks/message.md +941 -0
  149. package/content/display-blocks/notification.md +1410 -0
  150. package/content/display-blocks/paragraph.md +643 -0
  151. package/content/display-blocks/progress.md +818 -0
  152. package/content/display-blocks/qrcode.md +519 -0
  153. package/content/display-blocks/s3download.md +240 -0
  154. package/content/display-blocks/search.md +360 -0
  155. package/content/display-blocks/skeleton.md +272 -0
  156. package/content/display-blocks/skeletonavatar.md +222 -0
  157. package/content/display-blocks/skeletonbutton.md +245 -0
  158. package/content/display-blocks/skeletoninput.md +223 -0
  159. package/content/display-blocks/skeletonparagraph.md +201 -0
  160. package/content/display-blocks/statistic.md +485 -0
  161. package/content/display-blocks/steps.md +585 -0
  162. package/content/display-blocks/tag.md +620 -0
  163. package/content/display-blocks/title.md +654 -0
  164. package/content/display-blocks/tour.md +2359 -0
  165. package/content/input-blocks/autocomplete.md +786 -0
  166. package/content/input-blocks/buttonselector.md +964 -0
  167. package/content/input-blocks/checkboxselector.md +765 -0
  168. package/content/input-blocks/checkboxswitch.md +497 -0
  169. package/content/input-blocks/colorselector.md +884 -0
  170. package/content/input-blocks/daterangeselector.md +777 -0
  171. package/content/input-blocks/dateselector.md +693 -0
  172. package/content/input-blocks/datetimeselector.md +791 -0
  173. package/content/input-blocks/inputgallery.md +528 -0
  174. package/content/input-blocks/monthselector.md +717 -0
  175. package/content/input-blocks/multipleselector.md +1337 -0
  176. package/content/input-blocks/numberinput.md +855 -0
  177. package/content/input-blocks/pagination.md +679 -0
  178. package/content/input-blocks/paragraphinput.md +1664 -0
  179. package/content/input-blocks/passwordinput.md +480 -0
  180. package/content/input-blocks/phonenumberinput.md +688 -0
  181. package/content/input-blocks/radioselector.md +820 -0
  182. package/content/input-blocks/ratingslider.md +684 -0
  183. package/content/input-blocks/s3uploadbutton.md +384 -0
  184. package/content/input-blocks/s3uploaddragger.md +305 -0
  185. package/content/input-blocks/s3uploadphoto.md +288 -0
  186. package/content/input-blocks/segmentedselector.md +782 -0
  187. package/content/input-blocks/selector.md +1162 -0
  188. package/content/input-blocks/switch.md +552 -0
  189. package/content/input-blocks/textarea.md +714 -0
  190. package/content/input-blocks/textinput.md +639 -0
  191. package/content/input-blocks/tiptapinput.md +226 -0
  192. package/content/input-blocks/tiptapmentioninput.md +471 -0
  193. package/content/input-blocks/titleinput.md +1094 -0
  194. package/content/input-blocks/treeinput.md +144 -0
  195. package/content/input-blocks/treemultipleselector.md +162 -0
  196. package/content/input-blocks/treeselector.md +185 -0
  197. package/content/input-blocks/upload.md +149 -0
  198. package/content/input-blocks/uploaddragger.md +85 -0
  199. package/content/input-blocks/uploadphoto.md +84 -0
  200. package/content/input-blocks/weekselector.md +630 -0
  201. package/content/list-blocks/controlledlist.md +498 -0
  202. package/content/list-blocks/list.md +529 -0
  203. package/content/list-blocks/listselector.md +301 -0
  204. package/content/list-blocks/masonrylist.md +230 -0
  205. package/content/migration/upgrade-guide.md +106 -0
  206. package/content/migration/v4-to-v5.md +589 -0
  207. package/content/migration/v5-to-v6.md +36 -0
  208. package/content/operators/_actions.md +58 -0
  209. package/content/operators/_and.md +76 -0
  210. package/content/operators/_api.md +254 -0
  211. package/content/operators/_app.md +114 -0
  212. package/content/operators/_args.md +65 -0
  213. package/content/operators/_array.md +331 -0
  214. package/content/operators/_base64.md +49 -0
  215. package/content/operators/_boolean.md +33 -0
  216. package/content/operators/_build.md +166 -0
  217. package/content/operators/_change_case.md +357 -0
  218. package/content/operators/_date.md +415 -0
  219. package/content/operators/_dayjs.md +128 -0
  220. package/content/operators/_diff.md +61 -0
  221. package/content/operators/_divide.md +32 -0
  222. package/content/operators/_eq.md +52 -0
  223. package/content/operators/_event.md +86 -0
  224. package/content/operators/_function.md +52 -0
  225. package/content/operators/_get.md +92 -0
  226. package/content/operators/_global.md +86 -0
  227. package/content/operators/_gt.md +50 -0
  228. package/content/operators/_gte.md +50 -0
  229. package/content/operators/_hash.md +112 -0
  230. package/content/operators/_if.md +30 -0
  231. package/content/operators/_if_none.md +47 -0
  232. package/content/operators/_index.md +48 -0
  233. package/content/operators/_input.md +86 -0
  234. package/content/operators/_intl.md +135 -0
  235. package/content/operators/_item.md +166 -0
  236. package/content/operators/_js.md +113 -0
  237. package/content/operators/_json.md +120 -0
  238. package/content/operators/_jsonata.md +152 -0
  239. package/content/operators/_locale.md +65 -0
  240. package/content/operators/_location.md +40 -0
  241. package/content/operators/_log.md +22 -0
  242. package/content/operators/_lt.md +50 -0
  243. package/content/operators/_lte.md +50 -0
  244. package/content/operators/_math.md +407 -0
  245. package/content/operators/_media.md +83 -0
  246. package/content/operators/_menu.md +62 -0
  247. package/content/operators/_module.md +340 -0
  248. package/content/operators/_mql.md +95 -0
  249. package/content/operators/_ne.md +62 -0
  250. package/content/operators/_not.md +33 -0
  251. package/content/operators/_number.md +159 -0
  252. package/content/operators/_nunjucks.md +117 -0
  253. package/content/operators/_object.md +253 -0
  254. package/content/operators/_operator.md +33 -0
  255. package/content/operators/_or.md +67 -0
  256. package/content/operators/_product.md +45 -0
  257. package/content/operators/_random.md +90 -0
  258. package/content/operators/_ref.md +80 -0
  259. package/content/operators/_regex.md +69 -0
  260. package/content/operators/_request.md +35 -0
  261. package/content/operators/_request_details.md +29 -0
  262. package/content/operators/_secret.md +56 -0
  263. package/content/operators/_state.md +134 -0
  264. package/content/operators/_step.md +98 -0
  265. package/content/operators/_string.md +327 -0
  266. package/content/operators/_subtract.md +24 -0
  267. package/content/operators/_sum.md +45 -0
  268. package/content/operators/_switch.md +37 -0
  269. package/content/operators/_t.md +96 -0
  270. package/content/operators/_theme.md +65 -0
  271. package/content/operators/_type.md +78 -0
  272. package/content/operators/_uri.md +49 -0
  273. package/content/operators/_url_query.md +92 -0
  274. package/content/operators/_user.md +154 -0
  275. package/content/operators/_uuid.md +118 -0
  276. package/content/operators/_var.md +88 -0
  277. package/content/operators/_yaml.md +96 -0
  278. package/content/other/introduction.md +39 -0
  279. package/content/other/next-auth-providers.md +3 -0
  280. package/content/other/updatesession.md +26 -0
  281. package/content/plugins/plugins-actions.md +80 -0
  282. package/content/plugins/plugins-connections.md +98 -0
  283. package/content/plugins/plugins-dev.md +138 -0
  284. package/content/plugins/plugins-introduction.md +29 -0
  285. package/content/plugins/plugins-operators.md +71 -0
  286. package/content/testing/e2e-auth.md +108 -0
  287. package/content/testing/e2e-configuration.md +107 -0
  288. package/content/testing/e2e-getting-started.md +96 -0
  289. package/content/testing/e2e-introduction.md +53 -0
  290. package/content/testing/e2e-mocking.md +155 -0
  291. package/content/testing/e2e-writing-tests.md +214 -0
  292. package/content/tutorial/tutorial-actions-operators.md +222 -0
  293. package/content/tutorial/tutorial-add-blocks.md +86 -0
  294. package/content/tutorial/tutorial-create-page.md +57 -0
  295. package/content/tutorial/tutorial-display-data-page.md +181 -0
  296. package/content/tutorial/tutorial-next-steps.md +53 -0
  297. package/content/tutorial/tutorial-requests-sql.md +22 -0
  298. package/content/tutorial/tutorial-start.md +71 -0
  299. package/content/user-authentication/auth-providers.md +15 -0
  300. package/content/user-authentication/login-and-logout.md +122 -0
  301. package/content/user-authentication/users-introduction.md +31 -0
  302. package/index.json +2281 -0
  303. package/package.json +34 -0
  304. package/scripts/extractAgentDocs.js +130 -0
@@ -0,0 +1,190 @@
1
+ # Docs for AI Agents
2
+
3
+ When you run `lowdefy dev`, the development server also serves a documentation API and an [MCP](https://modelcontextprotocol.io) endpoint built for AI coding agents. It describes everything installed in _your_ project — every block, operator, action, connection and request type from core Lowdefy plugins _and_ your own local plugins — plus the full Lowdefy documentation as markdown. This means an agent like Claude Code never has to guess type names or property shapes: it can look up the exact schema, real examples, and the relevant docs page while it writes your config.
4
+
5
+ Everything is served under the `/lowdefy-docs` path of your dev server (default `http://localhost:3000`). No setup or configuration is needed — it is always on in dev, and never part of your production server.
6
+
7
+ > The `/lowdefy-docs` route prefix is reserved by the dev server. A page with `id: lowdefy-docs` will not be reachable in dev.
8
+
9
+ ## The MCP endpoint
10
+
11
+ The dev server exposes an MCP server (streamable HTTP) at:
12
+
13
+ ```
14
+ http://localhost:3000/lowdefy-docs/mcp
15
+ ```
16
+
17
+ It provides these tools:
18
+
19
+ | Tool | Purpose |
20
+ | ------------------------ | ----------------------------------------------------------------------- |
21
+ | `lowdefy_overview` | Start here — what is installed, counts per kind, and how to use the rest |
22
+ | `lowdefy_list_types` | List ALL available types of a kind (blocks, operators, actions, connections, requests) |
23
+ | `lowdefy_list_plugins` | Installed plugin packages, including local plugins, and the types each provides |
24
+ | `lowdefy_get_schema` | JSON Schema for a specific type — all properties and events |
25
+ | `lowdefy_get_examples` | Real YAML usage examples for a block type |
26
+ | `lowdefy_get_doc` | A Lowdefy docs page as markdown, by slug or by type name |
27
+ | `lowdefy_search_docs` | Keyword search over the Lowdefy docs |
28
+ | `lowdefy_get_plugin_doc` | Markdown (READMEs, guides) shipped inside an installed plugin package |
29
+ | `lowdefy_build_status` | Current build errors and warnings (with source file locations) plus recent browser runtime errors — call after every edit |
30
+ | `lowdefy_get_page_config`| The fully built config for a page, or its structured build errors |
31
+ | `lowdefy_screenshot_page`| PNG screenshot of a rendered page (headless Chromium) for visual verification |
32
+ | `lowdefy_find_config` | Which yaml file (and line) defines a given page, block, or request id |
33
+ | `lowdefy_scaffold_page` | Create a new page yaml file with a canonical minimal structure |
34
+ | `lowdefy_app_map` | The whole-app graph: every page, menu, connection, endpoint, and agent in one call |
35
+ | `lowdefy_inspect_state` | The LIVE state, request results, and event log of a running page — reads your open browser tab, or runs the page headless |
36
+ | `lowdefy_eval_operator` | Evaluate any operator expression against live page state — a REPL for config |
37
+ | `lowdefy_run_request` | Execute a request with a test payload to verify data shape (read-only unless opted in) |
38
+ | `lowdefy_snapshot_state` | Capture live page state + request responses into a committable checkpoint folder |
39
+ | `lowdefy_load_state` | Restore a state checkpoint — headless, or a `?_checkpoint=` URL for manual testing |
40
+ | `lowdefy_list_state_checkpoints` | List saved state checkpoints |
41
+ | `lowdefy_checkpoint_to_mocks` | Convert a state checkpoint into e2e `mocks.yaml` fixtures |
42
+ | `lowdefy_checkpoint` | Snapshot all config files before risky changes |
43
+ | `lowdefy_revert_checkpoint` | Restore config files from a checkpoint |
44
+
45
+ ## The feedback loop
46
+
47
+ The dev server rebuilds automatically when config changes, so an agent works in a tight loop:
48
+
49
+ 1. Discover types and schemas, write or edit YAML.
50
+ 2. Call `lowdefy_build_status` — did the build succeed? Errors come back with the exact source file and location.
51
+ 3. Call `lowdefy_get_page_config` to confirm the page builds, and `lowdefy_screenshot_page` to see it rendered.
52
+ 4. Runtime errors from the browser (operator errors, block render errors) also appear in `lowdefy_build_status`, so problems that only show at runtime still reach the agent.
53
+
54
+ ## Live state — the agent sees what you see
55
+
56
+ When you have a page open in your browser, the agent can read its **actual live state** — page state, request results, and the event log of recent actions — via `lowdefy_inspect_state`. Reproduce a problem by clicking through the app, then ask the agent to look: it inspects your exact tab, not a guess. `lowdefy_eval_operator` then evaluates any operator expression (like `{"_state": "customer.name"}`) against that same live context, so `_state`/`_request` binding bugs get debugged against real data. With no tab open, both tools run the page headless instead.
57
+
58
+ ## State checkpoints — put the app in a known state
59
+
60
+ `lowdefy_snapshot_state` captures a moment — page state plus every request's recorded response — into a folder you can commit:
61
+
62
+ ```
63
+ checkpoints/broken-refund-flow/
64
+ checkpoint.json # manifest
65
+ state.json
66
+ urlQuery.json
67
+ requests/
68
+ get_order.json # one file per request — easy to review and edit
69
+ ```
70
+
71
+ Loading it back (`lowdefy_load_state`) serves the recorded request data from the dev server and re-injects the page state. Three ways to use it:
72
+
73
+ - **Agent verification**: the agent restores a scenario headless and confirms its fix works against the exact data that caused the bug.
74
+ - **Manual testing**: `mode: registry-only` returns a URL like `http://localhost:3000/orders?_checkpoint=broken-refund-flow` — open it and the app is in that state, no clicking required.
75
+ - **e2e fixtures**: `lowdefy_checkpoint_to_mocks` converts a checkpoint into `mocks.yaml` entries for [e2e tests](/e2e-introduction), so "write an e2e test for this flow" starts from captured reality.
76
+
77
+ ## Running requests safely
78
+
79
+ `lowdefy_run_request` executes a request with a test payload so the agent can verify the data shape a page will receive. Read-only request types (like `MongoDBFind`) always run. Write requests are refused unless you opt in:
80
+
81
+ ```yaml
82
+ cli:
83
+ agentTools:
84
+ allowWriteRequests: true
85
+ ```
86
+
87
+ This is dev-only — enable it when you're comfortable with the agent writing to your dev data.
88
+
89
+ ## Setting up a project — one command
90
+
91
+ ```bash
92
+ npx lowdefy agent-setup
93
+ ```
94
+
95
+ This writes three files into your project (merging safely if they exist): `.mcp.json` registering the `lowdefy-docs` MCP server, `.claude/skills/lowdefy-config/SKILL.md` teaching Claude Code the workflow, and an `AGENTS.md` section for other coding agents. Use `--port` if your dev server doesn't run on 3000.
96
+
97
+ ## Using it with Claude Code manually
98
+
99
+ Add the MCP server to your project so Claude Code can use it. In your project directory run:
100
+
101
+ ```bash
102
+ claude mcp add --transport http lowdefy-docs http://localhost:3000/lowdefy-docs/mcp
103
+ ```
104
+
105
+ Or commit a `.mcp.json` file at your project root so the whole team gets it:
106
+
107
+ ```json
108
+ {
109
+ "mcpServers": {
110
+ "lowdefy-docs": {
111
+ "type": "http",
112
+ "url": "http://localhost:3000/lowdefy-docs/mcp"
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ If your dev server runs on a different port, adjust the URL. The MCP server includes instructions that teach the agent the workflow (list types first, then fetch schemas and examples), so it works well without any extra prompting.
119
+
120
+ ## Referencing it in a skill
121
+
122
+ For the best results, add a skill to your project that tells the agent to use the docs server whenever it writes Lowdefy config. Create `.claude/skills/lowdefy-config/SKILL.md`:
123
+
124
+ ```markdown
125
+ ---
126
+ name: lowdefy-config
127
+ description: Use when writing or editing Lowdefy YAML config — pages, blocks, operators, actions, connections, or requests. Looks up exact type names, schemas, and examples from the running dev server instead of guessing.
128
+ ---
129
+
130
+ # Writing Lowdefy config
131
+
132
+ The dev server serves docs for everything installed in this project at
133
+ `http://localhost:3000/lowdefy-docs` (also as MCP tools via the `lowdefy-docs` server).
134
+
135
+ Never guess type names or properties. Before writing config:
136
+
137
+ 1. Call `lowdefy_list_types` (or `GET /lowdefy-docs/blocks`, `/lowdefy-docs/operators`,
138
+ `/lowdefy-docs/actions`, `/lowdefy-docs/connections`, `/lowdefy-docs/requests`) to find the exact
139
+ type name — this includes this project's local plugins.
140
+ 2. Call `lowdefy_get_schema` (or `GET /lowdefy-docs/schema/{kind}/{type}`) for the
141
+ exact properties and events of that type.
142
+ 3. Call `lowdefy_get_examples` (or `GET /lowdefy-docs/examples/{type}`) to see real
143
+ usage YAML for blocks.
144
+ 4. For concepts (state, operators, events, requests), call `lowdefy_get_doc`
145
+ or `lowdefy_search_docs`.
146
+
147
+ After every edit, call `lowdefy_build_status` and fix what it reports. Use
148
+ `lowdefy_inspect_state` to read the live state of the page (ask the developer
149
+ to interact with it first when debugging), `lowdefy_eval_operator` to test
150
+ operator expressions against real state, and `lowdefy_snapshot_state` /
151
+ `lowdefy_load_state` to capture and restore app states for testing.
152
+ ```
153
+
154
+ ## Plain HTTP routes
155
+
156
+ Everything the MCP tools serve is also available as plain GET routes — useful for `curl`, scripts, or agents without MCP support:
157
+
158
+ | Route | Purpose |
159
+ | --------------------------- | -------------------------------------------------------------- |
160
+ | `GET /lowdefy-docs` | Overview and route index |
161
+ | `GET /lowdefy-docs/{kind}` | List all available types of a kind, e.g. `/lowdefy-docs/blocks` |
162
+ | `GET /lowdefy-docs/plugins` | Installed plugin packages and the types each provides |
163
+ | `GET /lowdefy-docs/schema/{kind}/{type}` | JSON schema for a type, e.g. `/lowdefy-docs/schema/blocks/Button` |
164
+ | `GET /lowdefy-docs/examples/{type}` | Example YAML for a block type |
165
+ | `GET /lowdefy-docs/content/{slug}` | A docs page as markdown, e.g. `/lowdefy-docs/content/operators/_get` |
166
+ | `GET /lowdefy-docs/search?q={query}`| Search the docs |
167
+ | `GET /lowdefy-docs/plugin-doc/{package}` | Markdown shipped inside a plugin package |
168
+ | `GET /lowdefy-docs/build-status` | Current build errors/warnings + recent browser runtime errors |
169
+ | `GET /lowdefy-docs/page-config/{pageId}` | Fully built page config, or its build errors |
170
+ | `GET /lowdefy-docs/screenshot/{pageId}` | PNG screenshot of the rendered page |
171
+ | `GET /lowdefy-docs/find/{id}?pageId=` | Locate where a page/block/request id is defined |
172
+ | `GET /lowdefy-docs/app-map` | Whole-app graph: pages, menus, connections, endpoints, agents |
173
+ | `GET /lowdefy-docs/inspect-state/{pageId}` | Live state/requests/eventLog of a running page (tab or headless) |
174
+ | `POST /lowdefy-docs/eval-operator` | Evaluate an operator expression against live page state |
175
+ | `POST /lowdefy-docs/run-request` | Execute a request with a test payload (read-only unless opted in) |
176
+ | `GET/POST /lowdefy-docs/checkpoints` + `/revert` | Config-file checkpoints |
177
+ | `GET/POST /lowdefy-docs/state-checkpoints` + `/snapshot`, `/load` | State & data checkpoints |
178
+
179
+ ## Local plugins
180
+
181
+ Your project's own plugins (declared under `plugins:` in `lowdefy.yaml`) are included automatically:
182
+
183
+ - Types appear in `lowdefy_list_types` and `/lowdefy-docs/{kind}` listings.
184
+ - Block schemas are derived from each block's `meta`, and connection/request schemas from the `schema` property on your connection and request definitions.
185
+ - Ship a `gallery.yaml` or `examples.yaml` next to a block in your plugin's `dist/blocks/{BlockName}/` and it is served by `lowdefy_get_examples`.
186
+ - A `README.md` or `docs/*.md` files in your plugin package are served by `lowdefy_get_plugin_doc`.
187
+
188
+ ## Docs for crawling agents
189
+
190
+ The docs site itself serves agent-friendly formats: every page as raw markdown at `https://docs.lowdefy.com/md/{section}/{slug}.md`, an [llms.txt](https://llmstxt.org) index at `https://docs.lowdefy.com/llms.txt`, and the full documentation as one file at `https://docs.lowdefy.com/llms-full.txt`. Generic browser tools like Playwright MCP and Chrome DevTools MCP also work well against a running Lowdefy app — blocks render stable DOM ids matching their `blockId`.
@@ -0,0 +1,213 @@
1
+ # The CLI
2
+
3
+ The Lowdefy CLI is used to develop a Lowdefy app locally, and to build Lowdefy apps for deployment.
4
+
5
+ We recommend running the CLI using `pnpx`, to always use the latest version:
6
+
7
+ ```
8
+ pnpx lowdefy@5 <command>
9
+ ```
10
+
11
+ or, to use a specific version:
12
+
13
+ ```
14
+ pnpx lowdefy@version <command>
15
+ ```
16
+
17
+ Alternative, you can install the CLI globally or to a Javascript project (with a `package.json` file) via pnpm.
18
+
19
+ To install the CLI globally run:
20
+
21
+ ```
22
+ pnpm add -g lowdefy
23
+ ```
24
+
25
+ The CLI can then be run using `lowdefy` as the executable name:
26
+
27
+ ```
28
+ lowdefy <command>
29
+ ```
30
+
31
+ # CLI commands
32
+
33
+ ## build
34
+
35
+ The `build` command runs a Lowdefy build. This builds a production Lowdefy app in the server directory, which can then be started using the `lowdefy start` command. The options are:
36
+
37
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
38
+ - `--disable-telemetry`: Disable telemetry.
39
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
40
+ - `--no-client-build`: Do not run the Vite client build, and only build the Lowdefy config. Used in some deployment scripts where the client build is done as a separate step. The previous `--no-next-build` flag still works as a deprecated alias.
41
+ - `--ref-resolver <ref-resolver-function-path>`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
42
+ - `--server-directory <server-directory>`: Change the server directory, the directory in which the production server is placed. The default is `<config-directory>/.lowdefy/server`.
43
+ - `--skip-codemod-check`: Suppress warnings about pending codemod upgrades.
44
+
45
+
46
+ ## dev
47
+
48
+ The `dev` command starts a Lowdefy development server, running locally. It can be accessed in a browser at [http://localhost:3000](http://localhost:3000). The CLI watches the file system, and rebuilds the app and reloads served pages every time a change is made to any of the files in the project directory. The `dev` command should not be used to serve a production app, the `build` and `start` commands should be used instead.
49
+
50
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
51
+ - `--dev-directory <dev-directory>`: Change the dev directory, the directory in which the development server is placed. The default is `<config-directory>/.lowdefy/dev`.
52
+ - `--disable-telemetry`: Disable telemetry.
53
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
54
+ - `--no-open`: Do not open a new tab in the default browser.
55
+ - `--port <port>`: Change the port the server is hosted at. The default is `3000`.
56
+ - `--ref-resolver <ref-resolver-function-path>`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
57
+ - `--watch <paths...>`: A list of paths to files or directories that should be watched for changes. Globs are supported. Specify each path to watch separated by spaces.
58
+ - `--watch-ignore <patterns...>`: A list of paths to files or directories that should be ignored by the file watcher. Globs are supported. Specify each path to watch separated by spaces.
59
+ - `--skip-codemod-check`: Suppress warnings about pending codemod upgrades.
60
+
61
+ ## emails
62
+
63
+ The `emails` command previews the [notification](/notifications) emails your app renders, using [React Email](https://react.email/)'s preview server. It builds the app, renders each notification from its `testData`, and opens the preview so you can iterate on templates without sending real mail. It warns when a template renders a data key your `testData` is missing (which would show as an empty section), and errors if the app has no `notifications:` section.
64
+
65
+ The preview tooling (`react-email`) is installed just-in-time by this command — it is never a dependency of your app or its production server.
66
+
67
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
68
+ - `--disable-telemetry`: Disable telemetry.
69
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
70
+ - `--port <port>`: Change the port the email preview server is hosted at. The default is `3001`.
71
+ - `--ref-resolver <ref-resolver-function-path>`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
72
+ - `--server-directory <server-directory>`: Change the server directory, the directory in which the production server is placed. The default is `<config-directory>/.lowdefy/server`.
73
+
74
+ ## agent-setup
75
+
76
+ The `agent-setup` command sets up a project for AI coding agents. It writes `.mcp.json` registering the dev server's [`lowdefy-docs` MCP endpoint](/ai-agent-docs), a Claude Code skill at `.claude/skills/lowdefy-config/SKILL.md`, and a `## Lowdefy` section in `AGENTS.md`. Existing files are merged, not overwritten.
77
+
78
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
79
+ - `--disable-telemetry`: Disable telemetry.
80
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
81
+ - `--port <port>`: The port your dev server runs on, used in the generated URLs. The default is `3000`.
82
+
83
+ ## init
84
+
85
+ The `init` command initializes a Lowdefy application. It creates the `lowdefy.yaml` and `.gitignore` in the working directory.
86
+
87
+ - `--disable-telemetry`: Disable telemetry.
88
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
89
+
90
+ ## init-docker
91
+
92
+ The `init-docker` command initializes a Dockerfile in the config directory that can be used to build a Docker image of the Lowdefy app.
93
+
94
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
95
+ - `--disable-telemetry`: Disable telemetry.
96
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
97
+
98
+ ## init-vercel
99
+
100
+ The `init-vercel` command initializes the installation scripts needed to deploy an app on [Vercel](https://vercel.com). It creates a directory called deploy, and a script called vercel.install.sh. It also creates a README file with instructions on how to configure Vercel.
101
+
102
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
103
+ - `--disable-telemetry`: Disable telemetry.
104
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
105
+
106
+ ## upgrade
107
+
108
+ The `upgrade` command upgrades a Lowdefy app to a newer version by walking you through migration prompts that handle breaking changes.
109
+
110
+ It fetches the latest `@lowdefy/codemods` package, resolves the version chain from your current version to the target, and presents migration prompts phase by phase.
111
+
112
+ ```
113
+ pnpx lowdefy@5 upgrade
114
+ pnpx lowdefy@5 upgrade --to 6.0.0
115
+ ```
116
+
117
+ - `--to <version>`: Target version to upgrade to. Defaults to the latest stable release.
118
+ - `--plan`: Show the upgrade plan without executing.
119
+ - `--resume`: Resume a previously interrupted upgrade.
120
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
121
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
122
+
123
+ ### How it works
124
+
125
+ 1. Reads your current version from `lowdefy.yaml`.
126
+ 2. Queries npm for the latest stable Lowdefy version (or uses `--to`).
127
+ 3. Fetches `@lowdefy/codemods@latest` — the codemods package containing all migration prompts.
128
+ 4. Resolves the upgrade chain — which intermediate versions need codemods.
129
+ 5. Presents migration prompts phase by phase. Each prompt can be copied to clipboard for use with any AI coding tool, viewed as a manual guide, or skipped for later.
130
+ 6. Updates `lowdefy.yaml` after each phase and suggests a git commit.
131
+
132
+ See the [Upgrade Guide](/upgrade-guide) for more detail on how the upgrade system works.
133
+
134
+ ## start
135
+
136
+ The `start` command starts a Lowdefy production server. To start a Lowdefy server, tha app should first be built using the `build` command.
137
+
138
+ - `--config-directory <config-directory>`: Change the config directory. The default is the current working directory.
139
+ - `--disable-telemetry`: Disable telemetry.
140
+ - `--log-level <level>`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
141
+ - `--port <port>`: Change the port the server is hosted at. The default is `3000`.
142
+ - `--server-directory <server-directory>`: Change the server directory, the directory in which the production server is placed. The default is `<config-directory>/.lowdefy/server`.
143
+
144
+
145
+ #### Examples
146
+
147
+
148
+ Run the dev server, watching a relative directory for file changes:
149
+ ```txt
150
+ pnpx lowdefy@5 dev --watch ../other-project
151
+ ```
152
+
153
+ Run the dev server, ignoring the public directory:
154
+ ```txt
155
+ pnpx lowdefy@5 dev --watch-ignore public/**
156
+ ```
157
+
158
+
159
+
160
+ # Module Fetching
161
+
162
+ When your app uses [modules](/modules), the build automatically fetches module sources during the build phase. GitHub modules are downloaded as tarballs and cached in `.lowdefy/modules/`. Multiple module entries from the same monorepo share a single cache entry. Local `file:` sources are read directly from disk.
163
+
164
+ For private GitHub repositories, set the `GITHUB_TOKEN` environment variable:
165
+
166
+ ```
167
+ GITHUB_TOKEN=ghp_your_token_here
168
+ ```
169
+
170
+ The CLI also checks for `gh` CLI credentials and git credential helpers as fallbacks.
171
+
172
+ In development mode (`lowdefy dev`), local module sources (`file:` paths) are watched for changes and trigger rebuilds automatically.
173
+
174
+ # Configuration
175
+
176
+ All the CLI options can either be set as command line options, or the `cli` config object in your `lowdefy.yaml` file. Options set as command line options take precedence over options set in the `lowdefy.yaml` file. The config in the `lowdefy.yaml` cannot be referenced using the `_ref` operator, but need to be set in the file itself.
177
+
178
+ Options set in the `lowdefy.yaml` should be defined in camelCase. The options that can be set are:
179
+ - `devDirectory: string`: Change the dev directory, the directory in which the development server is placed. The default is `<config-directory>/.lowdefy/dev`.
180
+ - `disableTelemetry: boolean`: Disable telemetry.
181
+ - `logLevel: enum`: The minimum severity of logs to show in the CLI output. Options are `debug`, `info`, `warn` or `error`. The default is `info`.
182
+ - `noOpen`: Do not open a new tab in the default browser.
183
+ - `port: number`: Change the port the server is hosted at. The default is `3000`.
184
+ - `refResolver: string`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
185
+ - `serverDirectory: string`: Change the server directory, the directory in which the production server is placed. The default is `<config-directory>/.lowdefy/server`.
186
+ - `watch: string[]`: A list of paths to files or directories that should be watched for changes.
187
+ - `watchIgnore: string[]`: A list of paths to files or directories that should be ignored by the file watcher. Globs are supported.
188
+ - `skipCodemodCheck: boolean`: Suppress warnings about pending codemod upgrades during build and dev.
189
+
190
+ The `--config-directory` option cannot be set from the `lowdefy.yaml` file.
191
+
192
+ # Telemetry
193
+
194
+ The CLI collects usage and error information to help us fix bugs, prioritize features, and understand how Lowdefy is being used.
195
+
196
+ All telemetry can be disabled by setting the `disableTelemetry` flag in `cli` config object in your `lowdefy.yaml` file (this cannot be a reference to another file), or by using the `--disable-telemetry` command line flag.:
197
+
198
+ ###### `lowdefy.yaml`
199
+ ```yaml
200
+ lowdefy: LOWDEFY_VERSION
201
+
202
+ cli:
203
+ disableTelemetry: true
204
+ ```
205
+
206
+ We collect the following information:
207
+
208
+ - The CLI version.
209
+ - The Lowdefy version of your app.
210
+ - A random local app id (stored locally in your project folder at `.lowdefy/cli.json`).
211
+ - The CLI command used.
212
+ - Your IP address.
213
+ - Error messages and stack traces for any errors.
@@ -0,0 +1,7 @@
1
+ # Connections and Requests
2
+
3
+ In a Lowdefy app you can integrate with other services like API's or databases using `connections` and `requests`. Connections configure the settings to the external service, and often contain parameters like connection strings, urls and secrets like passwords or API keys. Requests are used to interact with the connection, such as inserting a data record, executing a query or calling an API end-point.
4
+
5
+ > Sensitive information like passwords or API keys are often required to use external services. The <a href = "./_secret">_secret</a> operator should be used to reference these secrets, they should never be coded directly in your app, or committed to source control.
6
+
7
+ > The <code>_user</code> operator should be used under <code>properties</code> and not <code>payload</code>. This is important since operators under <code>payload</code> are evaluated on the client, and are therefore vulnerable to users with malicious intent.
@@ -0,0 +1,3 @@
1
+ # Custom HTML
2
+
3
+ > SECURITY WARNING: Custom HTML can execute JavaScript inside your Lowdefy app. Insecure code can expose your app or data. Since Lowdefy doesn't validate your custom code, make sure that you only load trusted code.
@@ -0,0 +1,161 @@
1
+ # Custom Styling
2
+
3
+ Lowdefy provides several ways to style blocks and customize the look of your app:
4
+
5
+ - **`class`** — Apply CSS class names (including Tailwind CSS utility classes) to blocks.
6
+ - **`style`** — Apply inline CSS styles to blocks. Use `--`-prefixed keys to target specific parts (CSS slots).
7
+ - **`properties.theme`** — Override antd design tokens per block. See [Theming](/theming) for details.
8
+ - **`public/styles.css`** — A global CSS file for custom styles.
9
+
10
+ ## The `class` property
11
+
12
+ The `class` property applies CSS class names to a block. [Tailwind CSS](https://tailwindcss.com/) is always available in Lowdefy apps, so you can use any Tailwind utility classes directly.
13
+
14
+ `class` can be a string, an array of strings, or an object keyed by the block's CSS keys:
15
+
16
+ ```yaml
17
+ # String — applied to the block wrapper
18
+ - id: my_card
19
+ type: Card
20
+ class: "p-4 shadow-lg rounded-xl"
21
+
22
+ # Array — all classes joined
23
+ - id: my_card
24
+ type: Card
25
+ class:
26
+ - p-4
27
+ - shadow-lg
28
+ - rounded-xl
29
+
30
+ # Object — target specific parts of the block using CSS keys (-- prefix)
31
+ - id: my_card
32
+ type: Card
33
+ class:
34
+ .element: "shadow-lg"
35
+ .header: "bg-gray-100"
36
+ .body: "p-8"
37
+ ```
38
+
39
+ Tailwind responsive prefixes work as expected:
40
+
41
+ ```yaml
42
+ - id: my_box
43
+ type: Box
44
+ class: "p-4 sm:p-8 lg:p-16"
45
+ ```
46
+
47
+ ### Theme-aware Tailwind classes
48
+
49
+ Lowdefy bridges antd design tokens to Tailwind, so utility classes like `text-primary` and `bg-bg-container` automatically reflect your theme configuration (including dark mode):
50
+
51
+ ```yaml
52
+ - id: themed_card
53
+ type: Box
54
+ class: "bg-bg-container text-text-primary border border-border rounded-lg p-4"
55
+ ```
56
+
57
+ See [Theming](/theming) for the full list of bridged tokens and how to add custom Tailwind tokens via `theme.tailwind`.
58
+
59
+ ## The `style` property
60
+
61
+ The `style` property applies inline CSS styles to a block. When used with flat CSS properties (no `--` prefix), it targets the block's layout wrapper:
62
+
63
+ ```yaml
64
+ - id: my_block
65
+ type: Box
66
+ style:
67
+ maxWidth: 800
68
+ margin: "0 auto"
69
+ ```
70
+
71
+ To target specific parts of a block, use `.`-prefixed **CSS slot keys**. Each block declares which slots it supports in its `meta.cssKeys`. Common keys include `.block` (layout wrapper), `.element` (main component), `.header`, `.body`, `.footer`, etc.
72
+
73
+ ```yaml
74
+ - id: my_card
75
+ type: Card
76
+ style:
77
+ .element:
78
+ borderRadius: 12
79
+ .header:
80
+ backgroundColor: "#f5f5f5"
81
+ fontWeight: bold
82
+ .body:
83
+ padding: 32
84
+ ```
85
+
86
+ You can mix flat CSS (which targets `.block`) with explicit slot keys:
87
+
88
+ ```yaml
89
+ - id: my_card
90
+ type: Card
91
+ style:
92
+ .block:
93
+ flex: 1
94
+ .element:
95
+ borderRadius: 12
96
+ ```
97
+
98
+ Each block's documentation page lists its supported CSS keys.
99
+
100
+ > **Note:** The responsive `style.sm`, `style.md` breakpoint syntax from v4 has been removed. Use Tailwind responsive classes via `class` instead.
101
+
102
+ ## CSS keys
103
+
104
+ Each block declares named style targets in its `meta.cssKeys`. For example, the [Card](/Card) block supports: `element`, `header`, `body`, `cover`, `actions`, `extra`.
105
+
106
+ Both `class` (object form) and `style` use `--`-prefixed versions of these keys to target specific parts of a block. The `--` prefix mirrors CSS custom property convention and avoids confusion with CSS property names.
107
+
108
+ To find the CSS keys for a block, check the block's documentation page.
109
+
110
+ ## Global styles with `public/styles.css`
111
+
112
+ To add global custom CSS to your app, create a file named `styles.css` in your app's `public` folder. This replaces the `styles.less` file used in v4.
113
+
114
+ ```css
115
+ /* public/styles.css */
116
+
117
+ h1 {
118
+ font-size: 32px;
119
+ color: #2ac8bb;
120
+ }
121
+
122
+ .my-custom-class {
123
+ border: 2px solid var(--ant-color-primary);
124
+ border-radius: 8px;
125
+ }
126
+ ```
127
+
128
+ Additional CSS files can be imported:
129
+
130
+ ```css
131
+ /* public/styles.css */
132
+ @import 'other.css';
133
+ ```
134
+
135
+ ## CSS variables
136
+
137
+ Antd v6 uses CSS custom properties (CSS variables) for all its design tokens. You can reference these in your custom CSS or inline styles:
138
+
139
+ ```css
140
+ /* Access antd theme tokens as CSS variables */
141
+ .my-class {
142
+ color: var(--ant-color-primary);
143
+ background: var(--ant-color-bg-container);
144
+ border: 1px solid var(--ant-color-border);
145
+ font-size: var(--ant-font-size);
146
+ }
147
+ ```
148
+
149
+ These variables are automatically set based on your app's theme configuration. See [Theming](/theming) for how to configure theme tokens.
150
+
151
+ ## Migration from v4
152
+
153
+ | v4 | v5 |
154
+ |---|---|
155
+ | `public/styles.less` | `public/styles.css` |
156
+ | `@primary-color: #2ac8bb;` | `theme.antd.token.colorPrimary: '#2ac8bb'` in `lowdefy.yaml` |
157
+ | `style.sm.padding: 32` | `class: "p-8 sm:p-4"` |
158
+ | `properties.bodyStyle: {...}` | `style: { .body: {...} }` |
159
+ | `@import 'antd/dist/antd.dark.less';` | `theme.antd.algorithm: dark` in `lowdefy.yaml` |
160
+
161
+ See the [Migration Guide](/v4-to-v5) for full details.