{"id":17029,"library":"lowdefy","title":"Lowdefy CLI","description":"Lowdefy is an open-source, low-code framework for building web applications and server-side APIs primarily through declarative YAML or JSON configuration. It abstracts much of the underlying JavaScript, TypeScript, and UI component boilerplate, allowing developers to define application logic, UI layouts (leveraging Ant Design), and data connections efficiently. The `lowdefy` npm package provides the Command Line Interface (CLI) tool essential for initializing projects, running a development server, and building applications. As of version 5.1.0, Lowdefy maintains an active release cadence, with frequent updates delivering new features like Ant Design v6 integration, enhanced theme token management, and improved dark mode support. Its key differentiators include its strong emphasis on YAML-driven configuration, deep integration with the Ant Design ecosystem, and comprehensive support for full-stack application development, including server-side APIs and user authentication, without extensive custom coding.","status":"active","version":"5.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/lowdefy/lowdefy","tags":["javascript","lowdefy","cli"],"install":[{"cmd":"npm install lowdefy","lang":"bash","label":"npm"},{"cmd":"yarn add lowdefy","lang":"bash","label":"yarn"},{"cmd":"pnpm add lowdefy","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required runtime environment for the CLI and generated applications.","package":"node","optional":false},{"reason":"Recommended package manager for Lowdefy projects and CLI operations.","package":"pnpm","optional":false}],"imports":[{"note":"The `lowdefy` package is primarily a CLI. It's recommended to use `npx` for initialization to ensure the latest version and avoid global installs. `pnpm` is the recommended package manager.","wrong":"npm install lowdefy -g\nlowdefy init my-app","symbol":"Initial project setup","correct":"npx lowdefy@latest init my-app\ncd my-app\npnpm install"},{"note":"Use `npx` to run the development server within a project, or `lowdefy dev` if installed globally.","wrong":"node node_modules/lowdefy/dist/index.js dev","symbol":"Start development server","correct":"npx lowdefy@latest dev"},{"note":"The `lowdefy` package is designed as a CLI tool. For programmatic interactions with Lowdefy components, operators, or utilities, one typically uses specific `@lowdefy/*` packages (e.g., `@lowdefy/build`, `@lowdefy/operators`) rather than the main `lowdefy` CLI package directly.","wrong":"import { buildApp } from 'lowdefy'; // Incorrect - use Lowdefy CLI for builds\nconst app = require('lowdefy'); // Incorrect - not a library for direct programmatic use","symbol":"Programmatic API","correct":"// The 'lowdefy' package primarily provides a CLI and does not expose a direct programmatic JavaScript API for application logic."}],"quickstart":{"code":"mkdir my-lowdefy-app\ncd my-lowdefy-app\n\n# Initialize a new Lowdefy project. This will create basic configuration files.\nnpx lowdefy@latest init\n\n# Install project dependencies using pnpm (recommended by Lowdefy)\npnpm install\n\n# Start the development server. The application will be accessible at http://localhost:3000\nnpx lowdefy@latest dev\n\n# Example of a simple lowdefy.yaml configuration (add this to lowdefy.yaml after init):\n# lowdefy: 5.0.0\n# name: My First Lowdefy App\n# pages:\n#   - id: home\n#     type: PageHeader\n#     properties: { title: 'Welcome to Lowdefy!' }\n#     blocks:\n#       - id: content_card\n#         type: Card\n#         properties: { title: 'Hello World' }\n#         blocks:\n#           - id: welcome_text\n#             type: Paragraph\n#             properties: { content: 'This is a basic Lowdefy application. Edit lowdefy.yaml to get started!' }\n#           - id: docs_button\n#             type: Button\n#             properties: { title: 'Go to Docs', size: 'large', type: 'primary' }\n#             events:\n#               onClick:\n#                 - id: open_docs\n#                   type: Link\n#                   properties: { url: 'https://docs.lowdefy.com', target: '_blank' }","lang":"typescript","description":"This quickstart demonstrates how to initialize a new Lowdefy project, install its dependencies, and launch the local development server. It includes an example `lowdefy.yaml` to show basic page and block configuration, illustrating how to display text and link to external resources."},"warnings":[{"fix":"Globally find and replace `_moment` with `_dayjs` in your YAML configuration files. Consider running `lowdefy upgrade` CLI for automated migration.","message":"The `_moment` operator has been removed and replaced with `_dayjs` in v5. All applications using `_moment` must migrate to `_dayjs` and update their date format strings if custom formats were used.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Rewrite custom styles using CSS-in-JS with Tailwind classes or apply them via `theme.antd.token` and `style: { .key }` properties. Migrate Less variables to Ant Design v6 theme tokens.","message":"The entire styling system underwent a significant overhaul in v5, migrating from Less/Emotion to CSS-in-JS with Tailwind CSS. Custom Less styles (e.g., `styles.less`) and direct usage of Less variables like `@primary-color` are no longer supported.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Rename `lowdefy.config.yaml` to `lowdefy.yaml` in your project root.","message":"The main configuration file `lowdefy.config.yaml` has been renamed to `lowdefy.yaml` in v5. Projects upgrading from v4 must update their file names.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Remove deprecated theme properties. For styling specific parts of blocks, use the new `style: { .key: {...} }` syntax. Dark mode is now automatic via CSS variables.","message":"Several component theme and style properties have been removed in v5, including `header.theme`, `sider.theme`, and `menu.theme` from blocks like `PageSiderMenu`, `PageHeaderMenu`, `Header`, and `Sider`. Direct `style` properties on these components were also removed.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Refactor applications using the `Comment` block to compose functionality with `Card`, `Flex`, `Avatar`, and `Paragraph` blocks instead.","message":"The `Comment` block has been entirely removed in v5 (following Ant Design v5 changes).","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure your development environment and deployment targets use Node.js `v18` or newer. Upgrade Node.js if necessary.","message":"Lowdefy CLI and generated applications strictly require Node.js version 18 or greater. Running on older Node.js versions will result in errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install `pnpm` globally (`npm install -g pnpm`) and use `pnpm install` for project dependencies. Enable Corepack (`corepack enable`) for easier `pnpm` management.","message":"The Lowdefy CLI explicitly recommends and often requires `pnpm` for package management within projects. Using `npm` or `yarn` might lead to unexpected issues or build failures.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Execute `npx lowdefy@latest init` in an empty directory, or remove the existing `lowdefy.yaml` file if you intend to overwrite it.","cause":"Attempting to initialize a new Lowdefy project (`npx lowdefy@latest init`) in a directory that already contains a `lowdefy.yaml` file.","error":"Error: A \"lowdefy.yaml\" file already exists: Try running the command in a new directory or consider deleting the lowdefy.yaml file in your current working directory."},{"fix":"Upgrade Lowdefy to version `v4.7.2` or newer, which includes a fix for this dev server hang. Review `_ref` usage for circular dependencies. (Found in release notes, no specific cite for problem, but fix in v4.7.2)","cause":"This issue was specifically observed in older v4.x versions when a page's entire YAML content was a `_ref`, causing an infinite loop during configuration processing.","error":"Dev server hangs indefinitely at \"Building config...\""},{"fix":"Upgrade Lowdefy and its related `@lowdefy/*` packages to `v4.5.2` or newer to resolve this bug. (Found in release notes, no specific cite for problem, but fix in v4.5.2)","cause":"A bug in older versions of `@lowdefy/blocks-antd` could lead to a `TypeError` when processing icon titles.","error":"TypeError in icon `formatTitle`"},{"fix":"Ensure `.env` variables for database URIs are correctly formatted and accessible. For payload size issues, especially when migrating from v3 to v4, use the `payload` property explicitly in requests to control what data is sent to the server. The `_payload` operator should then be used server-side to access this data.","cause":"Incorrectly configured MongoDB connection URI, or in older v3 versions, sending large `_state`, `_global`, `_input`, `_url_query`, or `_event` objects directly with requests, leading to payload size limits.","error":"LOWDEFY_SECRET_EXAMPLES_MDB=\"{{ your_mongodb_connection_uri }}\" - Connection string issues or payload size exceeded."}],"ecosystem":"npm","meta_description":null}