MCL Command Help
A compact static reference for the external Metoriq CLI, current MCL surface, HTTP APIs, and Web IDE capabilities through Milestone 069, with Milestone 070 planned.
External CLI
Commands executed from the operating system terminal for setup, tenant provisioning, license administration, and MCL entry.
CLI help and version
Shows CLI commands or the current CLI version.
Syntax
Metoriq.Cli --help
Metoriq.Cli --version
Examples
Metoriq.Cli --help
setup init / status
Initializes the metadata database or reports setup state.
Syntax
Metoriq.Cli setup init
Metoriq.Cli setup status
Examples
Metoriq.Cli setup status
tenant administration
Lists, creates, enables, disables, and administers tenants and protected TenantAdmins.
Syntax
Metoriq.Cli tenants list
Metoriq.Cli tenants create <tenantKey> <name> <tenantAdminKey> <tenantAdminEmail> <tenantAdminPassword> [licensePlan]
Metoriq.Cli tenants disable <tenantKey>
Metoriq.Cli tenants enable <tenantKey>
Metoriq.Cli tenants admins list <tenantKey>
Metoriq.Cli tenants admin set-password <tenantKey> <tenantAdminKey> <newPassword>
Examples
Metoriq.Cli tenants create acme "ACME Corporation" tenantadmin tenantadmin@acme.com "TenantAdmin123!" trial
tenants provision-file
Runs the initial SaaS provisioning flow from a reviewed JSON payload.
Syntax
Metoriq.Cli tenants provision-file <path>
Examples
Metoriq.Cli tenants provision-file ./tenant-provisioning.json
Notes
- This is a platform operation, not an MCL command. It creates the tenant, license, initial environment, workspace profile, and owner user transactionally.
tenant license
Shows or changes tenant license metadata from outside MCL.
Syntax
Metoriq.Cli tenants license show <tenantKey>
Metoriq.Cli tenants license alter <tenantKey> '<json>'
Metoriq.Cli tenants license alter-file <tenantKey> <path>
Examples
Metoriq.Cli tenants license alter-file acme ./license.json
Notes
- License changes are intentionally external to MCL and generate TENANT_LICENSE audit events.
connect / run
Opens the interactive MCL prompt or executes a .mcl script.
Syntax
Metoriq.Cli connect <tenantKey> <userKey> <password>
Metoriq.Cli run <tenantKey> <userKey> <password>
Metoriq.Cli run <tenantKey> <userKey> <password> <script.mcl>
Examples
Metoriq.Cli connect acme tenantadmin "TenantAdmin123!"
Metoriq.Cli run acme tenantadmin "TenantAdmin123!" setup-dev.mcl
MCL session
Commands used inside the interactive MCL prompt to navigate, ask for help, and leave the session.
HELP
Shows a short interactive reference for MCL commands and topics.
Syntax
HELP;
HELP <TOPIC>;
Examples
HELP;
HELP CONNECTION;
HELP WORKSPACE;
HELP READDATA;
HELP WRITEDATA;
HELP TRANSFORMATION;
HELP DATAFLOW;
HELP ACTION;
Notes
- Current topics include ENVIRONMENT, SCHEMA, CONNECTOR, CONNECTION, WORKSPACE, READDATA, WRITEDATA, TRANSFORMATION, DATAFLOW, ACTION, USER, ROLE, and SESSION.
USE ENVIRONMENT
Sets the active environment for the current MCL session.
Syntax
USE ENVIRONMENT KEY <environmentKey>;
Examples
USE ENVIRONMENT KEY dev;
LEAVE ENVIRONMENT
Returns the session to tenant scope when the connected user is allowed to do so.
Syntax
LEAVE ENVIRONMENT;
Examples
LEAVE ENVIRONMENT;
CLEAR / EXIT / QUIT
Clears the interactive terminal or leaves the prompt.
Syntax
CLEAR;
EXIT;
QUIT;
Examples
CLEAR;
EXIT;
Environment
Commands that manage environments as governed Metoriq objects inside a tenant.
CREATE / ALTER / COPY ENVIRONMENT
Creates, patches, or copies environments.
Syntax
CREATE ENVIRONMENT KEY <key> PROPERTIES JSON `<json>`;
ALTER ENVIRONMENT KEY <key> PROPERTIES FILE "<path>";
COPY ENVIRONMENT KEY <sourceKey> TO KEY <targetKey>;
Examples
CREATE ENVIRONMENT KEY dev PROPERTIES JSON `{ "name": "Development" }`;
SHOW / DETAIL / DESCRIBE ENVIRONMENT
Lists environments, shows one environment properties JSON, or displays the properties contract.
Syntax
SHOW ENVIRONMENTS;
DETAIL ENVIRONMENT KEY <key>;
DESCRIBE ENVIRONMENT PROPERTIES;
Examples
SHOW ENVIRONMENTS;
GENERATE ENVIRONMENT
Generates MCL commands from the current environment state.
Syntax
GENERATE <ACTION> ENVIRONMENT KEY <key>;
Examples
GENERATE ALTER ENVIRONMENT KEY dev;
ENABLE / DISABLE / DELETE ENVIRONMENT
Changes environment status or removes a disabled environment.
Syntax
ENABLE ENVIRONMENT KEY <key>;
DISABLE ENVIRONMENT KEY <key>;
DELETE ENVIRONMENT KEY <key>;
DELETE ENVIRONMENT KEY <key> CASCADE;
Examples
DISABLE ENVIRONMENT KEY dev;
DEPENDENTS ENVIRONMENT
Lists direct objects that depend on the environment.
Syntax
DEPENDENTS ENVIRONMENT KEY <key>;
Examples
DEPENDENTS ENVIRONMENT KEY dev;
Schema
Commands that manage logical namespaces inside the active environment.
SHOW / DETAIL / DESCRIBE SCHEMA
Lists schemas, shows a schema, shows schema properties, or lists objects inside a schema.
Syntax
SHOW SCHEMAS;
SHOW SCHEMA KEY <schemaKey>;
SHOW SCHEMA KEY <schemaKey> OBJECTS;
DETAIL SCHEMA KEY <schemaKey>;
DESCRIBE SCHEMA PROPERTIES;
Examples
SHOW SCHEMA KEY public OBJECTS;
CREATE / ALTER / DELETE SCHEMA
Creates, patches, or deletes non-reserved logical schemas.
Syntax
CREATE SCHEMA KEY <schemaKey> PROPERTIES JSON `<json>`;
ALTER SCHEMA KEY <schemaKey> PROPERTIES FILE "<path>";
DELETE SCHEMA KEY <schemaKey>;
Examples
CREATE SCHEMA KEY finance PROPERTIES JSON `{ "name": "Finance" }`;
Notes
- The reserved public schema is created automatically and cannot be renamed or deleted.
Connector types
Read-only commands for connector capabilities available to the installation.
SHOW CONNECTOR TYPES
Lists connector types registered in the installation.
Syntax
SHOW CONNECTOR TYPES;
Examples
SHOW CONNECTOR TYPES;
DETAIL CONNECTOR TYPE
Shows capabilities and connection properties schema for a connector type.
Syntax
DETAIL CONNECTOR TYPE KEY <typeKey>;
Examples
DETAIL CONNECTOR TYPE KEY postgresql;
Connections
Commands that manage schema-qualified connection metadata, connection secrets, generated commands, and PostgreSQL connectivity tests.
CREATE CONNECTION
Creates a connection metadata object using an existing connector type. PostgreSQL password can be provided and is stored as a connection secret.
Syntax
CREATE CONNECTION KEY <connectionKey> TYPE <typeKey> PROPERTIES JSON `<json>`;
CREATE CONNECTION KEY <schemaKey>.<connectionKey> TYPE <typeKey> PROPERTIES FILE "<path>";
Examples
CREATE CONNECTION KEY public.source_db TYPE postgresql PROPERTIES JSON `{ "name": "Source DB", "host": "localhost", "port": 5432, "database": "source_db", "username": "postgres", "password": "postgres", "ssl_mode": "disable" }`;
Notes
- password is removed from persisted properties_json and represented as secret_reference: "connection:password".
- connection_string must not contain Password or Pwd.
ALTER CONNECTION
Applies a patch to connection properties and can rotate the associated secret.
Syntax
ALTER CONNECTION KEY <connectionKey> PROPERTIES JSON `<json>`;
ALTER CONNECTION KEY <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
Examples
ALTER CONNECTION KEY public.source_db PROPERTIES JSON `{ "description": "Source DB rotated", "password": "new-secret" }`;
Notes
- Omitting password preserves the current secret.
SHOW / DETAIL CONNECTION
Lists connections or shows connection properties.
Syntax
SHOW CONNECTIONS;
DETAIL CONNECTION KEY <connectionKey>;
DETAIL CONNECTION KEY <schemaKey>.<connectionKey>;
Examples
DETAIL CONNECTION KEY public.source_db;
GENERATE CONNECTION
Generates sanitized MCL commands for a connection without exposing secrets.
Syntax
GENERATE CREATE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE ALTER CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE ENABLE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE DISABLE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE DELETE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE DETAIL CONNECTION KEY <schemaKey>.<connectionKey>;
Examples
GENERATE CREATE CONNECTION KEY public.source_db;
TEST CONNECTION
Opens a real connector test for the configured connection. PostgreSQL is the first implemented tester.
Syntax
TEST CONNECTION KEY <connectionKey>;
TEST CONNECTION KEY <schemaKey>.<connectionKey>;
Examples
TEST CONNECTION KEY public.source_db;
Notes
- TEST CONNECTION does not read or write data and does not generate audit in the initial cut.
ENABLE / DISABLE / DELETE CONNECTION
Changes connection status or removes a disabled connection.
Syntax
ENABLE CONNECTION KEY <schemaKey>.<connectionKey>;
DISABLE CONNECTION KEY <schemaKey>.<connectionKey>;
DELETE CONNECTION KEY <schemaKey>.<connectionKey>;
Examples
DISABLE CONNECTION KEY public.source_db;
Workspace profile
Commands that configure, inspect, test, and clean up the PostgreSQL workspace used by the active environment.
CONFIGURE WORKSPACE PROFILE
Creates or updates the workspace profile for the active environment. Password is stored as a workspace secret, not in functional JSON.
Syntax
CONFIGURE WORKSPACE PROFILE PROPERTIES JSON `<json>`;
CONFIGURE WORKSPACE PROFILE PROPERTIES FILE "<path>";
Examples
CONFIGURE WORKSPACE PROFILE PROPERTIES JSON `{ "name": "DEV Workspace", "provider": "postgresql", "host": "localhost", "port": 5432, "database": "metoriq_workspace", "username": "postgres", "password": "postgres", "ssl_mode": "disable", "managed_by_metoriq": false, "provisioning_mode": "existing_database" }`;
Notes
- The first supported operational mode is existing_database.
SHOW / DETAIL / DESCRIBE WORKSPACE PROFILE
Shows workspace state, sanitized details, or the accepted properties contract.
Syntax
SHOW WORKSPACE PROFILE;
DETAIL WORKSPACE PROFILE;
DESCRIBE WORKSPACE PROFILE PROPERTIES;
Examples
SHOW WORKSPACE PROFILE;
TEST WORKSPACE PROFILE
Validates PostgreSQL connectivity and minimum permissions for the workspace by creating and removing technical temporary objects.
Syntax
TEST WORKSPACE PROFILE;
Examples
TEST WORKSPACE PROFILE;
Notes
- Successful tests mark the profile ready; failed tests mark it failed.
PURGE WORKSPACE ARTIFACTS
Safely removes registered Metoriq run schemas from the workspace.
Syntax
PURGE WORKSPACE ARTIFACTS DRY RUN;
PURGE WORKSPACE ARTIFACTS FOR RUN "<run_id>";
PURGE WORKSPACE ARTIFACTS OLDER THAN "<duration>";
Examples
PURGE WORKSPACE ARTIFACTS DRY RUN;
PURGE WORKSPACE ARTIFACTS OLDER THAN "2h";
Notes
- Purge only targets registered artifacts that follow Metoriq workspace naming conventions.
- Manual purge generates WORKSPACE_ARTIFACTS audit events when artifacts are removed.
READDATA preview and RAW execute
Commands that define a PostgreSQL read operation, preview source rows, and execute RAW landing into the workspace.
CREATE / ALTER READDATA
Creates or patches a schema-qualified READDATA object that uses an existing connection.
Syntax
CREATE READDATA KEY <readDataKey> USING CONNECTION <connectionKey> PROPERTIES JSON `<json>`;
CREATE READDATA KEY <schemaKey>.<readDataKey> USING CONNECTION <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
ALTER READDATA KEY <schemaKey>.<readDataKey> PROPERTIES JSON `<json>`;
ALTER READDATA KEY <schemaKey>.<readDataKey> PROPERTIES FILE "<path>";
Examples
CREATE READDATA KEY public.dim_brand USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Dim Brand", "mode": "query", "query": "SELECT * FROM dbo.\"Dim_Brand\"", "preview_limit": 20 }`;
CREATE READDATA KEY public.dim_category USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Dim Category", "mode": "query", "query_file": "./sql/dim_category.sql", "preview_limit": 20 }`;
Notes
- query_file is expanded by the authoring client and only query is persisted.
SHOW / DETAIL READDATA
Lists READDATA objects or shows their functional properties.
Syntax
SHOW READDATA;
DETAIL READDATA KEY <schemaKey>.<readDataKey>;
Examples
DETAIL READDATA KEY public.dim_brand;
DESCRIBE READDATA OUTPUT
Opens the source and returns the output contract: columns, canonical types, nullability, and logical primary key.
Syntax
DESCRIBE READDATA KEY <schemaKey>.<readDataKey> OUTPUT;
Examples
DESCRIBE READDATA KEY public.dim_brand OUTPUT;
PREVIEW READDATA
Reads a limited sample from PostgreSQL and returns rows without persisting RAW or a run.
Syntax
PREVIEW READDATA KEY <schemaKey>.<readDataKey>;
PREVIEW READDATA KEY <schemaKey>.<readDataKey> LIMIT <rows>;
Examples
PREVIEW READDATA KEY public.dim_brand LIMIT 5;
Notes
- LIMIT is a one-time override between 1 and 1000.
EXECUTE READDATA
Reads PostgreSQL rows and lands them into a RAW table in the configured workspace.
Syntax
EXECUTE READDATA KEY <schemaKey>.<readDataKey>;
Examples
EXECUTE READDATA KEY public.dim_brand;
Notes
- Requires a ready WORKSPACE PROFILE in the active environment.
- Creates a run_id, a physical metoriq_run_* schema, a raw_* table, and registered workspace artifacts.
GENERATE READDATA
Generates MCL commands from the current READDATA object.
Syntax
GENERATE CREATE READDATA KEY <schemaKey>.<readDataKey>;
GENERATE ALTER READDATA KEY <schemaKey>.<readDataKey>;
GENERATE DESCRIBE READDATA KEY <schemaKey>.<readDataKey>;
GENERATE DETAIL READDATA KEY <schemaKey>.<readDataKey>;
GENERATE PREVIEW READDATA KEY <schemaKey>.<readDataKey>;
Examples
GENERATE CREATE READDATA KEY public.dim_brand;
WRITEDATA catalog, check, and execute
Commands that define a PostgreSQL write metadata object, validate its target table, and execute append writes through the shared DATAFLOW runtime.
CREATE / ALTER WRITEDATA
Creates or patches a schema-qualified WRITEDATA object that uses a destination connection and references a dataset producer.
Syntax
CREATE WRITEDATA KEY <writeDataKey> USING CONNECTION <connectionKey> PROPERTIES JSON `<json>`;
CREATE WRITEDATA KEY <schemaKey>.<writeDataKey> USING CONNECTION <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
ALTER WRITEDATA KEY <schemaKey>.<writeDataKey> PROPERTIES JSON `<json>`;
ALTER WRITEDATA KEY <schemaKey>.<writeDataKey> PROPERTIES FILE "<path>";
Examples
CREATE WRITEDATA KEY public.write_dim_brand USING CONNECTION public.target_db PROPERTIES JSON `{ "name": "Write Dim Brand", "source": "{{public.dim_brand}}", "target_table": "dbo.dim_brand", "mode": "append", "column_mapping": { "Cod_Brand": "cod_brand", "Desc_Brand": "desc_brand" } }`;
Notes
- source must use {{schema.object}} and can resolve to READDATA or TRANSFORMATION.
- append is the only implemented mode in Milestone 011.
SHOW / DETAIL / DESCRIBE WRITEDATA
Lists WRITEDATA objects, shows functional properties, or displays the accepted properties contract.
Syntax
SHOW WRITEDATA;
DETAIL WRITEDATA KEY <schemaKey>.<writeDataKey>;
DESCRIBE WRITEDATA PROPERTIES;
Examples
DETAIL WRITEDATA KEY public.write_dim_brand;
CHECK WRITEDATA
Validates metadata, resolves the source READDATA, opens the destination PostgreSQL connection, and verifies that the target table exists.
Syntax
CHECK WRITEDATA KEY <schemaKey>.<writeDataKey>;
Examples
CHECK WRITEDATA KEY public.write_dim_brand;
Notes
- CHECK WRITEDATA does not move rows and does not generate audit in this initial cut.
GENERATE WRITEDATA
Generates MCL commands from the current WRITEDATA object.
Syntax
GENERATE CREATE WRITEDATA KEY <schemaKey>.<writeDataKey>;
GENERATE ALTER WRITEDATA KEY <schemaKey>.<writeDataKey>;
GENERATE DETAIL WRITEDATA KEY <schemaKey>.<writeDataKey>;
GENERATE CHECK WRITEDATA KEY <schemaKey>.<writeDataKey>;
Examples
GENERATE CREATE WRITEDATA KEY public.write_dim_brand;
EXECUTE WRITEDATA
Executes one WRITEDATA output and its dependencies through the shared DATAFLOW runtime.
Syntax
EXECUTE WRITEDATA KEY <schemaKey>.<writeDataKey>;
Examples
EXECUTE WRITEDATA KEY public.write_dim_brand;
Notes
- Runs mandatory graph preflight before materializing workspace objects or writing rows.
TRANSFORMATION catalog and preview
Commands that define SQL transformations, inspect their output contract, and preview results through a disposable workspace run.
CREATE / ALTER TRANSFORMATION
Creates or patches a schema-qualified TRANSFORMATION object that produces an intermediate DATASET.
Syntax
CREATE TRANSFORMATION KEY <transformationKey> PROPERTIES JSON `<json>`;
CREATE TRANSFORMATION KEY <schemaKey>.<transformationKey> PROPERTIES FILE "<path>";
ALTER TRANSFORMATION KEY <schemaKey>.<transformationKey> PROPERTIES JSON `<json>`;
ALTER TRANSFORMATION KEY <schemaKey>.<transformationKey> PROPERTIES FILE "<path>";
Examples
CREATE TRANSFORMATION KEY public.dim_brand_category PROPERTIES JSON `{ "name": "Dim Brand Category", "mode": "sql_view", "query": "SELECT c.cod_category, c.desc_category, b.cod_brand, b.desc_brand FROM {{public.dim_category}} c JOIN {{public.dim_brand}} b ON c.cod_category = b.cod_category", "preview_limit": 20, "primary_key": ["cod_brand"] }`;
Notes
- query_file is expanded during authoring and only query is persisted.
- Queries reference READDATA or TRANSFORMATION producers with placeholders such as {{public.dim_brand}}.
SHOW / DETAIL / DESCRIBE TRANSFORMATION
Lists TRANSFORMATION objects, shows properties, or describes the output contract.
Syntax
SHOW TRANSFORMATIONS;
DETAIL TRANSFORMATION KEY <schemaKey>.<transformationKey>;
DESCRIBE TRANSFORMATION KEY <schemaKey>.<transformationKey> OUTPUT;
DESCRIBE TRANSFORMATION PROPERTIES;
Examples
DESCRIBE TRANSFORMATION KEY public.dim_brand_category OUTPUT;
PREVIEW TRANSFORMATION
Creates a disposable preview run, materializes dependencies, creates temporary transformation views, returns a sample, and cleans up the workspace.
Syntax
PREVIEW TRANSFORMATION KEY <schemaKey>.<transformationKey>;
PREVIEW TRANSFORMATION KEY <schemaKey>.<transformationKey> LIMIT <rows>;
Examples
PREVIEW TRANSFORMATION KEY public.dim_brand_category LIMIT 5;
Notes
- Requires a ready WORKSPACE PROFILE.
- Transformation SQL must use normalized RAW column names.
GENERATE TRANSFORMATION
Generates MCL commands from the current TRANSFORMATION object.
Syntax
GENERATE CREATE TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE ALTER TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE DETAIL TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE DESCRIBE TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE PREVIEW TRANSFORMATION KEY <schemaKey>.<transformationKey>;
Examples
GENERATE CREATE TRANSFORMATION KEY public.dim_brand_category;
DATAFLOW catalog, check, and execute
Commands that define output sets, validate the inferred graph, and execute WRITEDATA outputs.
CREATE / ALTER DATAFLOW
Creates or patches a schema-qualified DATAFLOW object whose outputs initially reference WRITEDATA objects.
Syntax
CREATE DATAFLOW KEY <dataflowKey> PROPERTIES JSON `<json>`;
CREATE DATAFLOW KEY <schemaKey>.<dataflowKey> PROPERTIES FILE "<path>";
ALTER DATAFLOW KEY <schemaKey>.<dataflowKey> PROPERTIES JSON `<json>`;
ALTER DATAFLOW KEY <schemaKey>.<dataflowKey> PROPERTIES FILE "<path>";
Examples
CREATE DATAFLOW KEY public.load_dimensions PROPERTIES JSON `{ "name": "Load Dimensions", "outputs": ["{{public.write_dim_brand}}", "{{public.write_dim_category}}"] }`;
Notes
- outputs accepts WRITEDATA references in this initial cut.
SHOW / DETAIL / DESCRIBE DATAFLOW
Lists DATAFLOW objects, shows properties, or displays the accepted properties contract.
Syntax
SHOW DATAFLOWS;
DETAIL DATAFLOW KEY <schemaKey>.<dataflowKey>;
DESCRIBE DATAFLOW PROPERTIES;
Examples
DETAIL DATAFLOW KEY public.load_dimensions;
CHECK DATAFLOW
Builds the logical DAG from WRITEDATA.source and TRANSFORMATION dependencies, then validates references, types, cycles, and READDATA reachability.
Syntax
CHECK DATAFLOW KEY <schemaKey>.<dataflowKey>;
Examples
CHECK DATAFLOW KEY public.load_dimensions;
Notes
- CHECK DATAFLOW does not execute data physically.
GENERATE DATAFLOW
Generates MCL commands from the current DATAFLOW object.
Syntax
GENERATE CREATE DATAFLOW KEY <schemaKey>.<dataflowKey>;
GENERATE ALTER DATAFLOW KEY <schemaKey>.<dataflowKey>;
GENERATE DETAIL DATAFLOW KEY <schemaKey>.<dataflowKey>;
GENERATE CHECK DATAFLOW KEY <schemaKey>.<dataflowKey>;
Examples
GENERATE CHECK DATAFLOW KEY public.load_dimensions;
EXECUTE DATAFLOW
Executes all WRITEDATA outputs declared by the DATAFLOW after mandatory graph preflight.
Syntax
EXECUTE DATAFLOW KEY <schemaKey>.<dataflowKey>;
Examples
EXECUTE DATAFLOW KEY public.load_dimensions;
Notes
- Creates a run, workspace artifacts, runtime steps, and structured events.
Users and roles
Initial identity, password, environment access, and role commands.
USER object commands
Creates, patches, copies, lists, details, generates, enables, disables, and deletes tenant users.
Syntax
DESCRIBE USER PROPERTIES;
CREATE USER KEY <userKey> PROPERTIES JSON `<json>`;
ALTER USER KEY <userKey> PROPERTIES FILE "<path>";
COPY USER KEY <sourceKey> TO KEY <targetKey>;
SHOW USERS;
DETAIL USER KEY <userKey>;
GENERATE CREATE USER KEY <userKey>;
ENABLE USER KEY <userKey>;
DISABLE USER KEY <userKey>;
DELETE USER KEY <userKey>;
Examples
CREATE USER KEY joao PROPERTIES JSON `{ "display_name": "Joao Silva", "email": "joao@acme.com" }`;
SET PASSWORD
Defines an explicit password for bootstrap, validation, and controlled scripts.
Syntax
SET PASSWORD FOR USER KEY <userKey> TO "<password>";
Examples
SET PASSWORD FOR USER KEY joao TO "Joao123!";
Notes
- The command obeys the tenant password_policy.
ROLE access commands
Grants and revokes roles per environment, lists access, and sets default environment.
Syntax
GRANT ROLE <roleKey> TO USER KEY <userKey> ON ENVIRONMENT KEY <environmentKey>;
REVOKE ROLE <roleKey> FROM USER KEY <userKey> ON ENVIRONMENT KEY <environmentKey>;
SHOW USER KEY <userKey> ROLES;
SHOW ENVIRONMENT KEY <environmentKey> USERS;
SET DEFAULT ENVIRONMENT KEY <environmentKey> FOR USER KEY <userKey>;
Examples
GRANT ROLE designer TO USER KEY joao ON ENVIRONMENT KEY dev;
Tenant administration
Tenant settings, license view, and audit commands available from MCL.
TENANT SETTINGS
Shows or patches tenant settings and imports/exports operational INI files.
Syntax
SHOW TENANT SETTINGS;
ALTER TENANT SETTINGS PROPERTIES JSON `<json>`;
ALTER TENANT SETTINGS PROPERTIES FILE "<path>";
EXPORT TENANT SETTINGS TO FILE "<path>";
IMPORT TENANT SETTINGS FROM FILE "<path>";
Examples
ALTER TENANT SETTINGS PROPERTIES JSON `{ "password_policy": { "min_length": 14 } }`;
SHOW TENANT LICENSE
Shows tenant license metadata from MCL.
Syntax
SHOW TENANT LICENSE;
Examples
SHOW TENANT LICENSE;
Notes
- License changes are made by external CLI commands, not MCL.
SHOW / PURGE AUDIT EVENTS
Lists or purges administrative audit events.
Syntax
SHOW AUDIT EVENTS;
SHOW AUDIT EVENTS SINCE "<yyyy-MM-dd>";
SHOW AUDIT EVENTS UNTIL "<yyyy-MM-dd>";
SHOW AUDIT EVENTS FOR USER KEY <userKey>;
SHOW AUDIT EVENTS FOR OBJECT <OBJECT_TYPE> KEY <objectKey>;
PURGE AUDIT EVENTS BEFORE "<yyyy-MM-dd>";
Examples
SHOW AUDIT EVENTS FOR OBJECT ENVIRONMENT KEY dev;
Usage and license policy
Commands and behaviors added for SaaS entitlements, usage metering, and license enforcement.
SHOW TENANT USAGE
Shows tenant-level runtime usage for the current or selected yyyy-MM period.
Syntax
SHOW TENANT USAGE;
SHOW TENANT USAGE PERIOD "<yyyy-MM>";
Examples
SHOW TENANT USAGE PERIOD "2026-06";
Notes
- Usage aggregates runs, statuses, run types, runtime minutes, rows, events, workspace artifacts, and observed concurrency.
SHOW ENVIRONMENT USAGE
Shows environment-level runtime usage for the current or selected yyyy-MM period.
Syntax
SHOW ENVIRONMENT USAGE;
SHOW ENVIRONMENT USAGE PERIOD "<yyyy-MM>";
Examples
SHOW ENVIRONMENT USAGE;
License enforcement
Central policy checks apply active license state, validity, limits, and enabled features before catalog changes and runtime execution.
Syntax
CREATE USER KEY <userKey> PROPERTIES JSON `<json>`;
CREATE ENVIRONMENT KEY <environmentKey> PROPERTIES JSON `<json>`;
EXECUTE DATAFLOW KEY <dataflowKey>;
EXECUTE FLOW KEY <flowKey>;
Examples
EXECUTE FLOW KEY public.daily_load;
Notes
- Blocks generate localized human-facing messages and LICENSE_BLOCK audit events.
Runtime runs and logs
Commands that inspect data-plane runs, steps, structured events, retention defaults, and purge runtime logs.
SHOW RUNS
Lists recent data-plane runs for the active environment.
Syntax
SHOW RUNS;
Examples
SHOW RUNS;
SHOW RUN KEY
Shows a run summary, step list, or structured runtime logs.
Syntax
SHOW RUN KEY <run_id>;
SHOW RUN KEY <run_id> STEPS;
SHOW RUN KEY <run_id> LOGS;
SHOW RUN KEY <run_id> LOGS LEVEL ERROR;
Examples
SHOW RUN KEY "<run_id>" LOGS LEVEL ERROR;
Notes
- EXECUTE READDATA and PREVIEW TRANSFORMATION register run, step, and event records.
SHOW RUN LOG RETENTION POLICY
Shows fixed documented defaults for runtime run and event retention.
Syntax
SHOW RUN LOG RETENTION POLICY;
Examples
SHOW RUN LOG RETENTION POLICY;
PURGE RUN LOGS
Purges runtime events by age or run id, with DRY RUN support.
Syntax
PURGE RUN LOGS OLDER THAN "<duration>" DRY RUN;
PURGE RUN LOGS OLDER THAN "<duration>";
PURGE RUN LOGS FOR RUN "<run_id>" DRY RUN;
PURGE RUN LOGS FOR RUN "<run_id>";
Examples
PURGE RUN LOGS OLDER THAN "30d" DRY RUN;
PURGE RUN LOGS FOR RUN "<run_id>";
Notes
- Effective purge generates RUN_LOGS audit events.
- Raw technical logs and custom retention policies remain future work.
ACTION catalog and execute
Commands that catalog direct connector operations such as PostgreSQL SQL commands and execute them as operational runs.
CREATE / ALTER ACTION
Creates or patches a schema-qualified ACTION object that uses an existing connection.
Syntax
CREATE ACTION KEY <actionKey> USING CONNECTION <connectionKey> PROPERTIES JSON `<json>`;
CREATE ACTION KEY <schemaKey>.<actionKey> USING CONNECTION <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
ALTER ACTION KEY <schemaKey>.<actionKey> PROPERTIES JSON `<json>`;
ALTER ACTION KEY <schemaKey>.<actionKey> PROPERTIES FILE "<path>";
Examples
CREATE ACTION KEY public.insert_product_test USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Insert product test", "mode": "sql_command", "command": "INSERT INTO dbo.\"Dim_Product\"(\"Cod_Product\", \"Desc_Product\") VALUES ('943221', 'Produto Teste')" }`;
CREATE ACTION KEY public.insert_product_test_file USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Insert product test file", "mode": "sql_command", "command_file": "./sql/insert_product_test.sql" }`;
Notes
- command_file follows the SQL file expansion rule and only command is persisted.
SHOW / DETAIL ACTION
Lists ACTION objects or shows their functional properties.
Syntax
SHOW ACTIONS;
DETAIL ACTION KEY <schemaKey>.<actionKey>;
Examples
DETAIL ACTION KEY public.insert_product_test;
GENERATE ACTION
Generates MCL commands from the current ACTION object.
Syntax
GENERATE CREATE ACTION KEY <schemaKey>.<actionKey>;
GENERATE ALTER ACTION KEY <schemaKey>.<actionKey>;
GENERATE DETAIL ACTION KEY <schemaKey>.<actionKey>;
Examples
GENERATE CREATE ACTION KEY public.insert_product_test;
EXECUTE ACTION
Executes an ACTION, initially PostgreSQL sql_command, and records run, step, and event metadata.
Syntax
EXECUTE ACTION KEY <schemaKey>.<actionKey>;
Examples
EXECUTE ACTION KEY public.insert_product_test;
Notes
- Successful SQL returns success; SQL failure returns a controlled error visible in run logs.
TASK catalog
Commands that define atomic executable units used by FLOW orchestration.
CREATE / ALTER TASK
Creates or patches a schema-qualified TASK of type writedata, dataflow, action, flow, or status.
Syntax
CREATE TASK KEY <taskKey> TYPE <type> PROPERTIES JSON `<json>`;
CREATE TASK KEY <schemaKey>.<taskKey> TYPE <type> PROPERTIES FILE "<path>";
ALTER TASK KEY <schemaKey>.<taskKey> PROPERTIES JSON `<json>`;
Examples
CREATE TASK KEY public.load_brand TYPE writedata PROPERTIES JSON `{ "name": "Load Brand", "target": "{{public.write_dim_brand}}" }`;
SHOW / DETAIL / DESCRIBE TASK
Lists TASK objects, shows one task, or displays the accepted properties contract.
Syntax
SHOW TASKS;
DETAIL TASK KEY <schemaKey>.<taskKey>;
DESCRIBE TASK PROPERTIES;
Examples
SHOW TASKS;
GENERATE TASK
Generates MCL commands from the current TASK object.
Syntax
GENERATE CREATE TASK KEY <schemaKey>.<taskKey>;
GENERATE ALTER TASK KEY <schemaKey>.<taskKey>;
GENERATE DETAIL TASK KEY <schemaKey>.<taskKey>;
Examples
GENERATE CREATE TASK KEY public.load_brand;
FLOW catalog, check, and execute
Commands that define task graphs, validate orchestration, and execute flows sequentially by eligibility.
CREATE / ALTER FLOW
Creates or patches a schema-qualified FLOW from JSON or file properties.
Syntax
CREATE FLOW KEY <flowKey> PROPERTIES JSON `<json>`;
CREATE FLOW KEY <schemaKey>.<flowKey> PROPERTIES FILE "<path>";
ALTER FLOW KEY <schemaKey>.<flowKey> PROPERTIES JSON `<json>`;
Examples
CREATE FLOW KEY public.daily_load PROPERTIES JSON `{ "name": "Daily Load", "tasks": ["{{public.load_dimensions}}"] }`;
ADD / REMOVE FLOW TASK / EDGE
Edits a FLOW graph incrementally by adding/removing tasks and conditional edges.
Syntax
ADD FLOW TASK KEY <flowKey> TASK KEY <taskKey>;
REMOVE FLOW TASK KEY <flowKey> TASK KEY <taskKey>;
ADD FLOW EDGE KEY <flowKey> FROM TASK KEY <fromTaskKey> TO TASK KEY <toTaskKey> ON <success|error|always>;
REMOVE FLOW EDGE KEY <flowKey> FROM TASK KEY <fromTaskKey> TO TASK KEY <toTaskKey> ON <success|error|always>;
Examples
ADD FLOW EDGE KEY public.daily_load FROM TASK KEY public.load_dimensions TO TASK KEY public.mark_success ON success;
SHOW / DETAIL / DESCRIBE FLOW
Lists FLOW objects, shows properties, tasks, edges, or the accepted properties contract.
Syntax
SHOW FLOWS;
DETAIL FLOW KEY <schemaKey>.<flowKey>;
SHOW FLOW KEY <schemaKey>.<flowKey> TASKS;
SHOW FLOW KEY <schemaKey>.<flowKey> EDGES;
DESCRIBE FLOW PROPERTIES;
Examples
SHOW FLOW KEY public.daily_load TASKS;
CHECK FLOW
Validates tasks, targets, edges, cycles, subflows, TASKSTATUS usage, and runnable graph structure.
Syntax
CHECK FLOW KEY <schemaKey>.<flowKey>;
Examples
CHECK FLOW KEY public.daily_load;
EXECUTE FLOW
Executes a FLOW sequentially by task eligibility/topology, including writedata, dataflow, action, flow, and status tasks.
Syntax
EXECUTE FLOW KEY <schemaKey>.<flowKey>;
Examples
EXECUTE FLOW KEY public.daily_load;
Notes
- Runs CHECK FLOW preflight before executing tasks.
- Task result conditions are success, error, and always.
VARIABLES catalog, loading, and expansion
Commands that create typed variables, load values from READDATA, and expand vector variables during checks and executions.
CREATE / ALTER VARIABLE
Creates or patches typed variables in environment, flow, or task scope.
Syntax
CREATE VARIABLE KEY <variableKey> SCOPE ENVIRONMENT PROPERTIES JSON `<json>`;
CREATE VARIABLE KEY <variableKey> SCOPE FLOW KEY <flowKey> PROPERTIES JSON `<json>`;
CREATE VARIABLE KEY <variableKey> SCOPE TASK KEY <taskKey> PROPERTIES JSON `<json>`;
ALTER VARIABLE KEY <variableKey> PROPERTIES JSON `<json>`;
Examples
CREATE VARIABLE KEY DATA_REF SCOPE ENVIRONMENT PROPERTIES JSON `{ "name": "Data reference", "data_type": "date", "value": "2026-06-23" }`;
Notes
- Supported data types include string, number, boolean, date, datetime, and vector.
SHOW / DETAIL / DELETE VARIABLE
Lists, details, or removes variables from the visible or object-specific scope.
Syntax
SHOW VARIABLES;
SHOW VARIABLES SCOPE FLOW KEY <flowKey>;
SHOW VARIABLES SCOPE TASK KEY <taskKey>;
DETAIL VARIABLE KEY <variableKey>;
DELETE VARIABLE KEY <variableKey>;
Examples
SHOW VARIABLES;
SHOW VARIABLES SCOPE FLOW KEY public.daily_load;
SET / UNSET VARIABLE
Creates or updates a temporary session/run variable, or removes it from the current session.
Syntax
SET VARIABLE <variableKey> = "<value>";
SET VARIABLE <variableKey> PROPERTIES JSON `<json>`;
UNSET VARIABLE <variableKey>;
Examples
SET VARIABLE DATA_REF = "2026-06-23";
SET VARIABLE FROM READDATA
Loads a vector variable from a READDATA column for operational loops and dynamic values.
Syntax
SET VARIABLE <variableKey> FROM READDATA KEY <schemaKey>.<readDataKey> COLUMN <columnName>;
Examples
SET VARIABLE FILES FROM READDATA KEY public.pending_xml_files COLUMN file_name;
Notes
- The result is always a vector; one-item vectors behave as scalars during expansion.
VARIABLES MODE
Controls vector expansion during CHECK or EXECUTE commands.
Syntax
CHECK FLOW KEY <flowKey> VARIABLES MODE POSITIONAL_FILL_LAST;
EXECUTE FLOW KEY <flowKey> VARIABLES MODE CARTESIAN;
EXECUTE DATAFLOW KEY <dataflowKey> VARIABLES MODE CARTESIAN;
EXECUTE ACTION KEY <actionKey> VARIABLES MODE CARTESIAN;
Examples
EXECUTE FLOW KEY public.import_all VARIABLES MODE CARTESIAN;
Notes
- Default mode is positional_fill_last.
- Cartesian mode is explicit to avoid accidental execution explosions.
Version and localization
Commands and behavior related to product version, stable message codes, locale fallback, and localized MCL responses.
VERSION
Shows the Metoriq product version from the central .NET build version.
Syntax
VERSION;
Examples
VERSION;
Notes
- The current product version is sourced centrally and is aligned with milestone versioning policy.
HELP VERSION
Shows localized help for the VERSION command.
Syntax
HELP VERSION;
Examples
HELP VERSION;
Localized MCL messages
Human-facing MCL success, error, warning, help, validation, and runtime messages use stable message codes with localized rendering.
Syntax
HELP;
VERSION;
SHOW RUN KEY <run_id> LOGS;
Examples
HELP;
Notes
- MCL command syntax, object types, JSON property names, keys, SQL, paths, and technical payloads remain in English/canonical form.
- Supported initial locales are en-US, pt-BR, and es-ES with fallback to English.
HTTP APIs and Web IDE
Product surfaces added after the CLI/MCL foundation for platform automation, tenant runtime reads, MCL execution, and the browser IDE.
Platform API
Operational HTTP endpoints for setup/status and SaaS tenant provisioning.
Syntax
GET /api/platform/status
POST /api/platform/tenants/provision
Examples
POST /api/platform/tenants/provision
Notes
- Platform endpoints are protected by an operational token and are not user MCL credentials.
Tenant Runtime API
Read-oriented tenant HTTP API for environments, schemas, objects, runs, usage, and license status.
Syntax
GET /api/tenants/{tenantKey}/environments
GET /api/tenants/{tenantKey}/environments/{environmentKey}/objects
GET /api/tenants/{tenantKey}/environments/{environmentKey}/runs
GET /api/tenants/{tenantKey}/license/status
Examples
GET /api/tenants/acme/environments/dev/objects
MCL execution API
Authenticated endpoint used by official clients to execute MCL and receive structured results.
Syntax
POST /api/tenants/{tenantKey}/mcl/execute
Examples
POST /api/tenants/acme/mcl/execute
Web IDE
Browser IDE surface for Object Explorer, MCL editor tabs, script workspace, results, and assisted authoring.
Syntax
GET /app
Examples
GET /app
Notes
- The first authoring assistants generate reviewable MCL for READDATA and ACTION instead of applying hidden changes.
Web authentication, sessions, and permissions
Browser product capabilities added to move the Web IDE from a prototype shell toward a real authenticated product surface.
Web auth and tenant session
Adds Web login/session foundations, tenant switching, and server-side session handling for the browser app.
Syntax
GET /login
POST /login
POST /logout
GET /app
Examples
GET /app
Notes
- The Web surface uses authenticated server-side context instead of exposing operational tokens to the browser.
OIDC model and server-side sessions
Defines the SaaS identity direction and hardens session handling for future OIDC providers.
Syntax
OIDC sign-in model
Server-side session state
Tenant-aware app context
Examples
OIDC sign-in model
Permissions by action
Applies permission checks by operation/action across Web API calls and product screens.
Syntax
Read catalog objects
Execute MCL
Run scripts
View diagnostics
Examples
Read catalog objects
Web authoring and operations
Operational browser workflows added after the first Web IDE: real catalog navigation, script execution, results, diagnostics, graph views, and visual authoring.
Real catalog Object Explorer
Object Explorer reads the real tenant/environment catalog instead of a placeholder tree.
Syntax
Browse schemas
Browse CONNECTION, READDATA, WRITEDATA, TRANSFORMATION, DATAFLOW, ACTION, TASK, FLOW
Examples
Browse public schema objects
Script execution workflow
Runs server-side MCL scripts from the Web IDE and returns structured output to result views.
Syntax
Open script
Execute script
Inspect result tab
Examples
Execute setup-dev.mcl from the Web IDE
Results, runs, and diagnostics
Shows command results, run history, logs, diagnostics, and controlled server error details in the Web UI.
Syntax
Result grid
JSON result
Run logs
Server error viewer
Examples
Open run diagnostics after EXECUTE FLOW
Visual authoring and graph viewers
Adds minimum visual authoring and graph inspection for integration objects and FLOW/DATAFLOW structures.
Syntax
Visual authoring
FLOW graph viewer
DATAFLOW graph viewer
Object properties authoring
Examples
Inspect DATAFLOW graph
Script workspace and managed storage
Server-side file capabilities used by the Web IDE and planned human PostgreSQL authoring workflow.
Script workspace storage provider
Stores scripts and supporting files server-side so Web authoring does not depend on local machine paths.
Syntax
metoriq://scripts/...
.mcl
.sql
.json
Examples
metoriq://scripts/dev/load-dimensions.mcl
Script Explorer and file picker
Lets users browse, open, select, and reference managed workspace files from Web authoring flows.
Syntax
Browse scripts
Pick SQL file
Pick JSON properties file
Examples
Pick metoriq://scripts/sql/dim_brand.sql
Governance and sharing
Adds controlled organization and sharing concepts for managed script workspace files.
Syntax
Managed workspace files
Shared script references
Governed server-side paths
Examples
Reference a shared SQL file from authoring
Managed Storage Explorer
Provides a Web surface for inspecting managed storage used by scripts and product workflows.
Syntax
Open managed storage
Inspect folders
Inspect files
Examples
Open managed storage explorer
Packaging and environment dashboard
Product hardening milestones around local HML deployment and environment readiness visibility.
Local HML Docker packaging
Packages the product for local homologation-style runs and automates update flows.
Syntax
docker compose up
HML update automation
Examples
Run local HML package
Environment dashboard workspace card
Shows whether the active environment has a workspace profile configured and ready.
Syntax
Workspace status
Provider
Database
Host and port
Next action hint
Examples
Open environment dashboard
Notes
- The card does not expose passwords or connection strings with secrets.
Future runtime controls
Commands recorded as product direction for scheduler, retries, cancellation, and distributed runtime milestones.
PostgreSQL human authoring review
Milestone 070 will validate a full human PostgreSQL authoring workflow across MCL, Web IDE, Script Workspace, and server-side files.
Syntax
CONNECTION
READDATA
WRITEDATA
ACTION
TRANSFORMATION
DATAFLOW
TASK
FLOW
metoriq://scripts/...
Examples
Build a PostgreSQL integration from Web IDE and managed scripts
Scheduler / retries / distributed execution
Future operational controls beyond the current runtime foundation.
Syntax
SCHEDULE FLOW KEY <flowKey> ...;
RETRY RUN KEY <run_id>;
CANCEL RUN KEY <run_id>;
Examples
RETRY RUN KEY "<run_id>";