OUTSYSTEMS 11 / COMMAND LINE + AGENTS

oml

Build and change OutSystems 11 modules from the command line or with an AI agent, through Service Studio's typed Model API.

JSON specs. Staged files. Validation before and after save.

Example session · compact JSON excerpts
oml inspect App.oml --own --only entities
{"entities":[{"name":"ReviewNote"}]}

oml apply App.oml change.json App.staged.oml
{"saved":true}

oml validate App.staged.oml
{"errorCount":0}

Illustrative excerpts using documented output fields. Empty fields are omitted.

01 / CAPABILITIES

What it does

Work with local OutSystems 11 modules through the installed typed Model API.

01

Spec builds

Build data, logic, REST APIs, screens, blocks, timers and resources from one JSON spec. Entities get indexes and options; aggregates fetch on demand, cache, time out, sort dynamically and filter groups. Change the CSS and widgets of existing screens without a rebuild.

02

Read the module

Use inspect for an overview, describe for logic, and find to locate an element and its producer. Preview renders a screen or block offline, runs its scripts, and can click, type and wait (--click, --type, --wait) before the screenshot; --serve shows a live page. Add --timings to see where a slow command spends its time.

03

Production rules

Apply refuses protected deletions, renames, attribute changes and data-changing SQL.

04

Architecture

Read layers, dependencies and findings. Export an interactive HTML report and optional JSON.

05

OpenAPI

Export exposed REST APIs as OpenAPI 3.0.3. Review and fill the reported placeholders.

06

Flow layout

New flows get automatic node layout. Use tidyFlows to move nodes in selected existing flows.

07

Packages and extensions

List, extract and pack packages. Inspect .xif files or create extension signatures; C# implementation is separate.

08

Publish and references

Use 1-Click Publish and Refresh All through Service Studio MCP. Its write tools are Beta.

09

LifeTime

Use API v2 for tags and deployments. Mock verified only; a real smoke test is still required.

10

Fonts and images

Convert TTF, OTF and WOFF to WOFF2. Convert, resize and shrink images, make favicons and app icons (ICO), trace PNG logos to SVG and shrink SVGs without changing a pixel.

11

Comment stripping

Apply removes CSS and JavaScript comments by default. Required /*! ... */ license notices stay. Long code can come from a file next to the spec.

12

Agent skill

Use the full skill, short Copilot instructions and ready recipes. Start with the required base module.

13

Code check

oml check reports AI Mentor-like findings for a module, a folder or a LifeTime team: security, performance, maintainability and architecture.

14

Rules for agents

oml doc prints short OutSystems rules by topic. oml warn explains a validation message and its fix. oml doc --search "<words>" lists the 3 most likely sections, each with the command that opens it; oml find --text searches a module's elements. All run locally, with no model and no network.

15

Block events and email

Blocks declare events, fire them with Trigger Event and get a handler on each instance. Build Reactive emails and send them from server actions.

16

Change review

oml review compares a module before and after a change, by the model's own keys, so a rename stays a rename. It lists the changes in plain words, the production-rule risks and only the new check findings, as Markdown, HTML or release notes. Logic bugs are not covered; 0 findings does not mean the code is correct.

17

BDD test scaffold

Write a spec for BDDFramework test screens of public server actions: Given/When/Then scenarios in a separate test module, with TODO test values to fill in. Checked only against a stand-in of BDDFramework.

02 / MEASURED EXAMPLE

One task. Two agents.

Both agents added Supplier, save/delete actions and a SupplierList table to the same O11 module, using its existing layout.

Agent A used OutSystems MCP with the official O11 skill. Agent B used oml with the short Copilot instructions and recipes, without an MCP server.

Setup: Codex exec, model gpt-6-luna, medium reasoning effort, one run per agent, October 2026. Service Studio 11.55.92.

OutSystems MCP + official O11 skill vs oml
MeasureOutSystems MCP + O11 skillomlDifference
Result0 errors0 errorsSame module content
Input tokens611,714207,2103.0× fewer
Input tokens, not cached67,20221,6103.1× fewer
Output tokens4,4742,7801.6× fewer
Time185 s56 s3.3× faster
Tool calls19101.9× fewer
Failed tool calls20

This is one run of one simple task. Results change with the model, the task and the module.

Both results were checked with oml validate and oml describe. Read the benchmark details.

03 / WORKFLOW

How agents use it

A staged change, with review before installation or publishing.

  1. Inspect

    Record the source and baseline errors.

  2. Describe

    Read existing logic. Find and confirm producer elements.

  3. Recipe / spec

    Read the base-module notes. Write the requested change.

  4. Apply

    Write to a new staged file.

  5. Validate

    Review errors, warnings and wiring after reopening.

  6. Confirm → install / publish

    Show the staged result and its oml review. Wait for approval for each action.

Model validation does not run SQL, HTTP, timers or browser behavior. Test these in the target environment.

04 / REFERENCE

Commands

Compact JSON by default. Add --pretty for indented output. Exit codes: 0 success, 1 failure or attention needed, 2 usage or environment.

CLI commands — full usage and options
CommandUse it for
oml versionShow CLI version, Service Studio build, runtime and self-test status.
oml newCreate a module by kind, clone with --template, or use --from-template.
oml app listRead applications and modules from .oap or .osp.
oml app extractExtract modules and extensions with SHA-256 hashes.
oml app packPack supplied .oml and .xif files into a new .oap.
oml extension inspectRead .xif metadata and signatures.
oml extension newCreate .xif action and structure signatures; no C# implementation.
oml templatesFind local template modules and bundles.
oml inspectList module contents; --own and --only limit output.
oml describeRead element logic or screen outlines; --depth adds called bodies.
oml findFind elements in a module, references and local producer files.
oml censusRead a module overview.
oml architectureExport module layers, dependencies and findings to HTML and optional JSON.
oml checkReport AI Mentor-like findings for a module, folder or LifeTime team to HTML or JSON.
oml reviewCompare two versions of a module: changes in plain words, risks and new check findings, to Markdown, HTML or release notes.
oml test scaffoldWrite a spec for BDDFramework test screens of public server actions, to apply to a separate test module. Checked only against a stand-in of BDDFramework.
oml openapiExport exposed REST APIs as OpenAPI 3.0.3 JSON.
oml treeShow element paths, expressions, references and connectors.
oml validateGroup validation errors; --warnings includes warnings.
oml applyBuild a spec into a staged file, reopen it and validate.
oml translations exportExport Excel or ResX where supported; file I/O refuses on 11.55.92.
oml installInstall a zero-error staged file with backup, hash and reopen checks. Confirm first.
oml studioCheck the Service Studio MCP connection and list open modules.
oml publishRun 1-Click Publish through Service Studio MCP. Confirm first.
oml referencesRefresh All references in Service Studio. Confirm first.
oml lt environmentsList LifeTime environments and keys.
oml lt teamsList LifeTime teams for architecture analysis.
oml lt team-appsResolve application membership for a LifeTime team.
oml lt appsList applications, running tags and modifications; filter with --env.
oml lt tagTag a running application. Confirm first.
oml lt deployCreate and start a deployment plan; --wait polls status. Confirm first.
oml lt statusRead deployment status and messages.
oml lt abortAbort a deployment, then read status. Confirm first.
oml lt continueContinue a deployment, then read status. Confirm first.
oml font woff2Convert a TTF, CFF OTF or WOFF1 file to WOFF2.
oml font batchConvert fonts in one folder without recursion.
oml imageConvert, resize or optimize a raster image or SVG; write ICO; trace a PNG logo to SVG.
oml image batchProcess images in one folder without recursion.
oml docPrint OutSystems rules for agents: a topic or one section. No Service Studio needed.
oml warnExplain a validation error or warning by id or title words, with its fix.
oml apiList installed model type members; supports wildcards.
oml widgetsList registered widget descriptors.
oml selftestCheck the installed model build on a disposable module.

05 / SPEC FORMAT

Spec keys

Every top-level key is optional. JSON comments are allowed; trailing commas are not. Expressions use OutSystems syntax.

Module settings ↗

  • module

    Description, JavaScript, PNG icon, user provider and tenancy flags, existing default theme.

Data model ↗

  • entities, structures, exceptions

    Data model. New entities get an Id. Entity indexes, identifier and options.

References and aliases ↗

  • references, referenceAliases, removeUnusedDependencies

    Elements from producer modules, local names for them, and removal of unused ones.

Logic and flows ↗

  • serverActions, serviceActions, clientActions

    Actions with inputs, outputs, locals and a flow.

  • tidyFlows

    Move nodes in existing flows selected by element paths or name patterns.

Exception handling ↗

  • onException, globalExceptionHandler, flow exceptionHandler

    Separate exception paths and a Reactive global handler.

Queries ↗

  • flow nodes aggregate

    Sources, joins, filters, sorts, group by (with group filters and sorts), calculated attributes, fetch, cache.

SQL ↗

  • flow node sql

    SQL statements with typed parameters and outputs.

REST ↗

  • restClients, restServices

    Consumed and exposed REST APIs.

Block events ↗

  • events, triggerEvent, onParametersChanged

    Block events: declare on a block, fire with a node, handle on each block instance.

Emails ↗

  • emails, flow node sendEmail

    Reactive emails and sending them from a server action.

Deletion ↗

  • edits with delete

    Deletion of elements created earlier in the same spec. Existing elements are refused (see rules.md).

Copy, translations, resources, and folders ↗

  • copy

    Clipboard copy from read-only modules; explicit dependencies; IPP checks.

  • locales, translate, translations

    Locales and module resource translations; file import where the host supports it.

  • images, scripts, themes, resources, folders, requiredScripts

    Content files, styles, folders, and screen/block script requirements.

06 / PRODUCTION

Production rules

The full list from the agent skill. Rules 2, 3, 4, 5 and 6 are also checked by apply. A server action made public gets a PublicServerAction warning (rule 7).

  1. Agent guidance
    Everything in the module also exists in production. Existing entities have data. Existing public elements have consumers in other modules. Treat every change to an existing element as a production change.
  2. Enforced by apply
    Never delete an existing entity, regular or static. If the user wants it removed, tell them to delete it manually in Service Studio.
  3. Enforced by apply
    Never rename or delete existing elements: entities, attributes, static records, structures, actions and their parameters, screens, blocks, block events, roles, exceptions, site properties, timers, REST methods, processes. Add new ones instead. Tell the user to rename or delete by hand. You may still change flow nodes, widgets and local variables.
  4. Enforced by apply
    Never break the signature of an existing public element. Other modules in production call it. Do not make it private or change the type of an input or output. Do not add a mandatory input or make an existing input mandatory. On a public Reactive or Mobile block or screen, do not change the inputs at all: every input change breaks its consumers, even a new optional input. Only on public server and service actions and Traditional Web blocks and screens may you add an optional input or make an input optional. Only on public server and service actions may you add an output. Do not add an event to an existing public block or make an existing event mandatory. Rule 3 still forbids renames and deletes. For any other change, add a new element instead, and tell the user.
  5. Enforced by apply
    Never change the type, length, decimals, mandatory or auto number setting of an existing attribute. Production data can be cut off or fail to convert, or change how rows are keyed, read or written. The same holds for an existing entity's identifier, label, order by and is active attributes, Expose Read Only, Update Behavior and multi-tenant setting. New attributes and new non-unique indexes are fine. Before a unique index on an existing entity, ask the user to check for duplicates.
  6. Enforced by apply
    Never write SQL that changes data: DELETE, UPDATE, TRUNCATE, DROP, ALTER, MERGE. Read-only SQL and INSERT are fine.
  7. Agent guidance
    Never weaken security. Do not add the Anonymous role, remove roles from existing screens, or set exposeReadOnly false on a public entity, unless the user asks for that exact change. Make a server action public only when the user agrees (apply warns PublicServerAction). Other elements may be public when the design needs it.
  8. Agent guidance
    Do only what the user asked. No clean-up, refactoring, renames, or removal of "unused" elements or dependencies unless the user asks.
  9. Agent guidance
    Never open, patch, or rewrite an .oml file with an editor, patch tool, or script. It is a binary package. Change modules only through oml apply.
  10. Agent guidance
    Never run install, publish, references, or a LifeTime deploy, tag, abort, or continue without a clear yes from the user for that exact action.
  11. Agent guidance
    Do not invent rules. If something is not forbidden here and is not destructive, do what the user asked. If you are not sure, ask the user. Do not guess.

Read rules.md ↗

07 / EXPLORE

See the architecture

Read EndUser, Core and Foundation layers, module dependencies and architecture findings.

A real CLI report

This demo renders the repository’s architecture sample with the CLI’s own HTML template. Explore modules, search and inspect findings.

Layer assignments are guesses to review. Edges represent imported signatures, not runtime call counts. Static analysis cannot recover dynamic dependencies.

Open architecture demo ↗
EndUserCoreFoundation

08 / CONTEXT

oml and OutSystems MCP

O11 uses a local Service Studio MCP server. ODC uses a remote tenant server and Mentor for changes.

How the tools work
AreaomlOutSystems MCP, O11OutSystems MCP, ODC
RunsLocally, against an .oml fileLocally, in Service Studio, on the open moduleIn your ODC tenant
How changes are madeJSON spec, built by oml through the typed Model APIModel API code that the agent writesMentor, from a text prompt
ControlExact: names, joins, connectors, widgetsExact, if the agent's code compilesWhatever Mentor builds
Reading a moduleinspect, describe, find, tree on the file, no Service Studio window neededRead tools on the open moduleContext lookups on the tenant
ValidationBefore and after save, per changeValidation tool on the resultReported by Mentor after the turn
Safety rulesskill/rules.md; apply refuses deletes, renames and attribute changes of existing elements, and data-changing SQLReview in Compare and MergeReview in ODC Studio
Front-end assetsFont to WOFF2; image convert, resize and shrink; ICO; PNG to SVGNoNo
PublishYes, through the Service Studio MCP serverYes (Beta)Yes
Deploy between environmentsLifeTime API v2 (mock verified; real smoke test required)NoYes
NeedsService Studio 11, .NET 8Service Studio 11.55.91 or later, module openODC tenant, sign-in

oml uses Service Studio MCP only for publishing and reference refresh. It does not load ODC modules with the O11 loader.

09 / GET STARTED

Install oml

Use Windows x64, Service Studio 11 and the .NET 8 runtime, or the newer runtime required by your Service Studio.

01 / Release zip

  1. Download oml-<version>-win-x64.zip and its .sha256 checksum from GitHub Releases.
  2. Unzip it. Keep its folders together.
  3. Add the extracted bin folder to PATH.
PowerShell
$env:PATH = 'C:\Tools\oml\bin;' + $env:PATH
oml version

The archive includes the skill and documentation. Service Studio assemblies are loaded from your installation and are not included.

02 / Build from source

Install Service Studio 11 and the .NET 8 SDK. Clone the repository, then run these commands from its root.

PowerShell
git clone https://github.com/Topurrra/oml-cli.git
cd oml-cli
dotnet build -c Release src/OmlCli.csproj
$env:PATH = "$PWD\src\bin\Release\net10.0;$env:PATH"
oml version

Keep the build output folder together. For another Service Studio folder, set OML_SERVICE_STUDIO and the build property SS. Build configuration.

Unsigned executables may be blocked by company policy. Teams can build from source instead.

Your first staged change

Export your module as App.oml. Inspect it, record baseline validation errors, and save a change spec. Use a new output path for each attempt.

PowerShell
oml inspect App.oml
oml validate App.oml --warnings
oml apply App.oml change.json App.staged.oml
oml describe App.staged.oml ReviewNote
oml validate App.staged.oml --warnings

Review problems, newErrors, reopenNewErrors, warnings and newWarnings. Installation needs zero total errors, including baseline errors. Confirm before install or publish. Follow the complete example.

10 / FOLLOW DEVELOPMENT

Roadmap

Follow the project and issues for current work.