Verified
Choosing between Slim and the CLI
The source of truth question that decides which authoring path to start in, and how to move between them.
The best way to choose is to ask who owns the source of truth: a page, or a project.
Choose Slim when
- the page is small or embedded
- HTML is the natural authoring surface
- the runtime tree is generated directly
- you want a lightweight entry point
- you are building docs, demos, or an interactive marketing surface
Choose the CLI when
- you are building a full app from source files
- you want a canonical project shape
- logic units such as
get_data,set_data,batch,apiandalertshould live in dedicated folders - tables, routes and AI agents need explicit resources
- sync and generated runtime docs should be handled for you
A practical migration path
Many teams start in Slim and move to the CLI later, and that path works because the runtime
concepts don't change underneath: field expressions still use @field_name, programs still compile
down to the same document model, and structural tags and panels still matter. Nothing you learn in
Slim mode is wasted once a project outgrows it.
A simple rule of thumb
If the page feels like a document or an embedded widget, start with Slim. If the project feels like an application, start with the CLI.
First-day mistakes to avoid
- Wrong
prog_id. If it doesn't match a program Slim can find, the wrong thing loads or nothing renders. - Expecting a different mental model. Slim is lighter to start, but it still follows Xuda runtime concepts throughout.
- Assuming HTML auto-conversion works outside
<template>. The verified automatic HTML-to-progUipath is template-driven; rely on<template id="...">tags for that conversion. - Malformed JSON-like attribute values. An attribute that looks like an object or array but isn't valid JSON stays a plain string instead of becoming structured data.
- Picking CLI work and calling it Slim work. If the project wants routing, a bigger app structure and long-lived source organization, the CLI is the better starting point.