Skip to content

Reference Actions

Kris Simon edited this page Mar 1, 2026 · 23 revisions

Actions Reference

Complete reference for all built-in actions in ARO.

Quick Reference Table

Action Role Description Example
Extract REQUEST Pull data from structured source Extract the <id> from the <request: params>.
Retrieve REQUEST Fetch from repository Retrieve the <user> from the <users> where id = <id>.
Request REQUEST Make HTTP request Request the <data> from the <api-url>.
Read REQUEST Read from file Read the <config> from the <file: "./config.json">.
List REQUEST List directory contents List the <files> from the <directory: src-path>.
Stat REQUEST Get file metadata Stat the <info> for the <file: "./doc.pdf">.
Exists REQUEST Check file existence Exists the <found> for the <file: "./config.json">.
Exec REQUEST Execute shell command Exec the <result> for the <command: "ls"> with "-la".
Prompt REQUEST Prompt user for terminal input Prompt the <input> for "Enter your name: ".
Select REQUEST Present terminal selection menu Select the <choice> from the <options> with "Pick one".
Create OWN Create new data Create the <user> with { name: "Alice" }.
Compute OWN Perform calculations Compute the <total> for the <items>.
Transform OWN Convert/map data Transform the <dto> from the <entity>.
Validate OWN Check against rules Validate the <data> for the <schema>.
Compare OWN Compare values Compare the <hash> against the <stored>.
Clear OWN Clear the terminal screen Clear the <terminal>.
Update OWN Modify existing data Update the <user> with <changes>.
CreateDirectory OWN Create directory Make the <directory> at the <path: "./out">.
Copy OWN Copy file/directory Copy the <file: "./a.txt"> to the <destination: "./b.txt">.
Move OWN Move/rename file Move the <file: "./old.txt"> to the <destination: "./new.txt">.
Map OWN Transform collection elements Map the <names> from the <users: name>.
Filter OWN Select matching elements Filter the <active> from the <users> where status = "active". where status not in <excluded>.
Reduce OWN Aggregate collection Reduce the <total> as Float from the <items> with sum(<amount>).
Sort OWN Order collection Sort the <users> by <name>.
Split OWN Split string by regex Split the <parts> from the <string> by /,/.
Merge OWN Combine data Merge the <existing-user> with <update-data>.
Return RESPONSE Return result Return an <OK: status> with <data>.
Throw RESPONSE Throw error Throw a <NotFound: error> for the <user>.
Log EXPORT Write to logs Log "Done" to the <console>.
Store EXPORT Save to repository Store the <user> into the <users>.
Write EXPORT Write to file Write the <data> to the <file: "./out.txt">.
Append EXPORT Append to file Append the <line> to the <file: "./log.txt">.
Send EXPORT Send to destination Send the <email> to the <recipient>.
Emit EXPORT Emit domain event Emit a <UserCreated: event> with <user>.
Publish EXPORT Make globally available Publish as <config> <settings>.
Notify EXPORT Send notification Notify the <alert> to the <admin>.
Delete EXPORT Remove data Delete the <user> from the <users> where id = <id>.
Start SERVICE Start a service Start the <http-server> with <contract>.
Stop SERVICE Stop a service Stop the <http-server> with <application>.
Listen SERVICE Listen for connections Listen on port 9000 as <socket-server>.
Connect SERVICE Connect to service Connect to <host: "db"> on port 5432.
Close SERVICE Close connection Close the <connection>.
Broadcast SERVICE Send to all connections Broadcast the <msg> to the <server>.
Keepalive SERVICE Keep app running Keepalive the <app> for the <events>.
Call SERVICE Call external API Call the <result> via <API: POST /users>.
Accept STATE Accept state transition Accept the <order: placed>.
Given TEST Test precondition Given the <user> with { name: "Test" }.
When TEST Test action When the <action> is performed.
Then TEST Test expectation Then the <result> should be <expected>.
Assert TEST Assert condition Assert the <value> equals <expected>.

Action Categories

Category Role Data Flow
REQUEST Bring data in External → Internal
OWN Transform data Internal → Internal
RESPONSE Send results Internal → External
EXPORT Publish/persist Internal → External
TERMINAL Interactive UI Terminal input and output
SERVICE Control services System operations
STATE State transitions Internal state changes
TEST Testing Verification actions

REQUEST Actions

Extract

Pulls data from a structured source.

Syntax:

Extract the <result> from the <source: property>.
Extract the <result: specifier> from the <list>.

Examples:

Extract the <user-id> from the <request: parameters>.
Extract the <body> from the <request: body>.
Extract the <token> from the <request: headers.Authorization>.
Extract the <email> from the <user: email>.
Extract the <order> from the <event: order>.

List Element Access:

Extract specific elements from arrays using result specifiers:

(* Keywords *)
Extract the <item: first> from the <list>.
Extract the <item: last> from the <list>.

(* Numeric index: 0 = last, 1 = second-to-last *)
Extract the <item: 0> from the <list>.
Extract the <item: 1> from the <list>.

(* Range: elements 2, 3, 4, 5 *)
Extract the <subset: 2-5> from the <list>.

(* Pick: elements at indices 0, 3, 7 *)
Extract the <selection: 0,3,7> from the <list>.
Specifier Returns
first First element
last Last element
0 Last element (reverse indexing)
n Element at (count - 1 - n)
2-5 Array of elements
0,3,7 Array of elements

Valid Prepositions: from


Retrieve

Fetches data from a repository.

Syntax:

Retrieve the <result> from the <repository> [where <condition>].

Examples:

Retrieve the <user> from the <user-repository>.
Retrieve the <user> from the <user-repository> where id = <user-id>.
Retrieve the <orders> from the <order-repository> where status = "pending".
Retrieve the <products> from the <repository> where category = <cat> and active = true.

Valid Prepositions: from


Request

Makes HTTP requests to external URLs or APIs.

Syntax:

Request the <result> from <url>.              (* GET request *)
Request the <result> to <url> with <data>.    (* POST request *)
Request the <result> via METHOD <url>.        (* Explicit method *)

Examples:

(* GET request *)
Create the <api-url> with "https://api.open-meteo.com/v1/forecast".
Request the <weather> from the <api-url>.

(* POST request *)
Create the <user-data> with { name: "Alice", email: "alice@example.com" }.
Request the <result> to the <api-url> with <user-data>.

(* PUT/DELETE/PATCH via explicit method *)
Request the <result> via PUT the <url> with <update-data>.
Request the <result> via DELETE the <url>.

Response Metadata: After a request, these variables are available:

  • result - Parsed response body (JSON as map/list, or string)
  • result.statusCode - HTTP status code (e.g., 200, 404)
  • result.headers - Response headers as map
  • result.isSuccess - Boolean: true if status 200-299

Valid Prepositions: from, to, via


Read

Reads from files with automatic format detection based on file extension.

Syntax:

Read the <result> from the <file: path>.
Read the <result: type> from the <file: path>.
Read the <result> from <path>.
Read the <result> from <path> with { options }.

Format Detection:

The file extension determines how content is parsed:

Extension Parses To
.json Object or Array
.jsonl, .ndjson Array of Objects
.yaml, .yml Object or Array
.toml Object
.csv Array of Objects (headers as keys)
.tsv Array of Objects (headers as keys)
.xml Object (nested)
.txt Object (key=value pairs)
.log String (write-only)
.env Object (KEY=VALUE)
.obj, unknown Binary Data

Examples:

(* Text file *)
Read the <content> from the <file: "./data.txt">.

(* JSON - automatically parsed *)
Read the <config> from "./settings.json".

(* JSON Lines - parsed to array *)
Read the <events> from "./logs/events.jsonl".

(* CSV - parsed with headers as keys *)
Read the <records> from "./data.csv".

(* YAML configuration *)
Read the <settings> from "./config.yaml".

(* Binary file *)
Read the <image: bytes> from the <file: "./logo.png">.

(* Bypass parsing - read as raw string *)
Read the <raw-json: String> from "./data.json".

(* CSV with custom options *)
Read the <data> from "./import.csv" with { delimiter: ";", header: false }.

CSV/TSV Options:

Option Type Default Description
delimiter String , / \t Field separator
header Boolean true Expect header row
quote String " Quote character

Valid Prepositions: from


Exec

Executes shell commands on the host system and returns structured results.

Syntax:

(* Preferred: command in object specifier *)
Exec the <result> for the <command: "uptime">.
Exec the <result> for the <command: "ls"> with "-la".
Exec the <result> for the <command: "ls"> with ["-l", "-a", "-h"].

(* Legacy: full command in with clause *)
Exec the <result> for the <command> with "command-string".
Exec the <result> for the <command> with <variable>.

(* Configuration object *)
Exec the <result> on the <system> with {
    command: "command-string",
    workingDirectory: "/path",
    timeout: 30000
}.

Result Object: The Exec action returns a structured result with the following fields:

  • result.error - Boolean: true if command failed (non-zero exit code)
  • result.message - Human-readable status message
  • result.output - Command stdout (or stderr if error)
  • result.exitCode - Process exit code (0 = success, -1 = timeout)
  • result.command - The executed command string

Examples:

(* Preferred syntax *)
Exec the <listing> for the <command: "ls"> with "-la".
Return an <OK: status> for the <listing>.

(* With error handling *)
Exec the <result> for the <command: "df"> with "-h".
Log <result.message> to the <console> when <result.error> = true.
Return an <Error: status> for the <result> when <result.error> = true.
Return an <OK: status> for the <result>.

(* Using array for multiple arguments *)
Exec the <processes> for the <command: "ps"> with ["aux"].

(* With configuration options *)
Exec the <result> on the <system> with {
    command: "npm install",
    workingDirectory: "/app",
    timeout: 60000
}.

Configuration Options: When using object syntax, these options are available:

  • command (required) - The shell command to execute
  • workingDirectory - Working directory (default: current)
  • timeout - Timeout in milliseconds (default: 30000)
  • shell - Shell to use (default: /bin/sh)
  • environment - Additional environment variables as object

Security Note: Be cautious when constructing commands from user input. Always validate and sanitize input to prevent command injection.

Valid Prepositions: for, on, with


OWN Actions

Create

Creates new data structures.

Syntax:

Create the <result> with <data>.

Examples:

Create the <user> with <user-data>.
Create the <response> with { message: "Success" }.
Create the <order> with {
    items: <items>,
    total: <total>,
    customer: <customer-id>
}.

Valid Prepositions: with


Compute

Performs calculations and data transformations.

Syntax:

Compute the <result> for the <input>.
Compute the <result> from <expression>.
Compute the <result: operation> from the <input>.
Compute the <result: operation> from <a> with <b>.

Built-in Operations:

Operation Description Example
length / count Count elements Compute the <len: length> from <text>.
uppercase Convert to UPPERCASE Compute the <upper: uppercase> from <text>.
lowercase Convert to lowercase Compute the <lower: lowercase> from <text>.
hash Compute hash value Compute the <h: hash> from <password>.
intersect Elements in both Compute the <common: intersect> from <a> with <b>.
difference Elements in A not in B Compute the <diff: difference> from <a> with <b>.
union All unique elements Compute the <all: union> from <a> with <b>.

Examples:

(* Basic operations *)
Compute the <total> for the <items>.
Compute the <hash> for the <password>.
Compute the <sum> from <a> + <b>.

(* Qualifier-as-name syntax *)
Compute the <greeting-length: length> from the <greeting>.
Compute the <farewell-length: length> from the <farewell>.

(* Set operations on lists *)
Create the <list-a> with [2, 3, 5].
Create the <list-b> with [1, 2, 3, 4].
Compute the <common: intersect> from <list-a> with <list-b>.
(* Result: [2, 3] *)

Compute the <only-in-a: difference> from <list-a> with <list-b>.
(* Result: [5] *)

(* Set operations on strings *)
Compute the <shared: intersect> from "hello" with "bello".
(* Result: "ello" *)

(* Set operations on objects (deep comparison) *)
Create the <obj-a> with { name: "Alice", age: 30 }.
Create the <obj-b> with { name: "Alice", age: 31 }.
Compute the <common: intersect> from <obj-a> with <obj-b>.
(* Result: { name: "Alice" } *)

Set Operation Type Behavior:

Operation Lists Strings Objects
intersect Elements in both (multiset) Chars in both Keys with matching values
difference In A, not in B Chars in A, not in B Keys in A, not matching B
union A preserved + unique from B A preserved + unique from B Merge (A wins conflicts)

Valid Prepositions: for, from, with


Transform

Converts or maps data.

Syntax:

Transform the <result> from the <source>.
Transform the <result> from the <source> with <modifications>.

Examples:

Transform the <dto> from the <entity>.
Transform the <updated-user> from the <user> with <updates>.
Transform the <response> from the <data>.

Valid Prepositions: from


Validate

Checks data against rules.

Syntax:

Validate the <data> for the <schema>.

Examples:

Validate the <user-data> for the <user-schema>.
Validate the <email> for the <email-pattern>.
Validate the <order> for the <order-rules>.

Valid Prepositions: for


Compare

Compares two values.

Syntax:

Compare the <value1> against the <value2>.

Examples:

Compare the <password-hash> against the <stored-hash>.
Compare the <signature> against the <expected>.

Valid Prepositions: against


Split

Splits a string into an array of parts using a regex delimiter.

Syntax:

Split the <parts> from the <string> by /delimiter/.

Examples:

(* Split CSV line by comma *)
Create the <csv-line> with "apple,banana,cherry".
Split the <fruits> from the <csv-line> by /,/.
(* fruits = ["apple", "banana", "cherry"] *)

(* Split by whitespace *)
Split the <words> from the <sentence> by /\s+/.

(* Split by multiple delimiters *)
Split the <tokens> from the <code> by /[;,\s]+/.

(* Case-insensitive split *)
Split the <sections> from the <text> by /SECTION/i.

Behavior:

  • Returns an array of strings between delimiter matches
  • If no match is found, returns original string as single-element array
  • Empty strings included when delimiters are adjacent
  • Supports regex flags: i (case-insensitive), s (dotall), m (multiline)

Valid Prepositions: from (with by clause)


Merge

Combines two data structures together. The source values are merged into the target, with source values overwriting target values for matching keys.

Syntax:

Merge the <target> with <source>.
Merge the <target> from <source>.

Examples:

(* Merge update data into existing entity *)
Retrieve the <existing-user> from the <user-repository> where id = <id>.
Extract the <update-data> from the <request: body>.
Merge the <existing-user> with <update-data>.
Store the <existing-user> into the <user-repository>.

(* Combine configuration objects *)
Merge the <defaults> with <overrides>.

(* Concatenate arrays *)
Merge the <all-items> with <new-items>.

(* Concatenate strings *)
Merge the <greeting> with <name>.

Supported Types:

  • Dictionaries: Source keys overwrite target keys; other target keys preserved
  • Arrays: Source elements appended to target array
  • Strings: Source string concatenated to target string

Valid Prepositions: with, into, from


Filter

Selects elements from a collection that match a predicate.

Syntax:

Filter the <result> from the <collection> where <condition>.

Comparison Operators:

Operator Description Example
is, = Equality <status> is "active"
is not, != Inequality <role> is not "guest"
>, >=, <, <= Comparison <age> >= 18
in Set membership <status> in ["a", "b"]
not in Set exclusion <status> not in <excluded>
between Range <price> between 10 and 100
contains Substring <name> contains "test"
starts with Prefix match <email> starts with "admin"
ends with Suffix match <file> ends with ".pdf"
matches Regex pattern <email> matches /^admin@/i

Examples:

(* Basic filtering *)
Filter the <admins> from the <users>
    where <role> is "admin".

Filter the <high-value> from the <orders>
    where <amount> > 1000.

(* Multiple conditions *)
Filter the <active-premium> from the <users>
    where <status> is "active" and <tier> is "premium".

(* Set membership with CSV string *)
Filter the <pending> from the <orders>
    where <status> in "pending,processing".

(* Set membership with array variable *)
Create the <exclude-statuses> with ["cancelled", "refunded"].
Filter the <active> from the <orders>
    where <status> not in <exclude-statuses>.

(* Combined with other conditions *)
Filter the <valid-orders> from the <orders>
    where <amount> > 0 and <status> not in <exclude-statuses>.

(* Regex matching *)
Filter the <admins> from the <users>
    where <email> matches /^admin@|@admin\./i.

Set Membership Notes:

  • The in and not in operators accept either a CSV string or an array variable
  • CSV string syntax: <field> in "value1,value2,value3"
  • Array syntax: <field> not in <array-variable>

Valid Prepositions: from (with where clause)


RESPONSE Actions

Return

Returns a result with status.

Syntax:

Return [article] <status> [with <data>] [for <context>].

Examples:

Return an <OK: status> with <data>.
Return a <Created: status> with <resource>.
Return a <NoContent: status> for the <deletion>.
Return a <BadRequest: status> with <errors>.
Return a <NotFound: status> for the <missing: user>.

Valid Prepositions: with, for


Throw

Throws an error.

Syntax:

Throw [article] <error-type> for the <context>.

Examples:

Throw a <ValidationError> for the <invalid: input>.
Throw a <NotFoundError> for the <missing: user>.
Throw an <AuthenticationError> for the <invalid: token>.

Valid Prepositions: for


EXPORT Actions

Store

Saves data to a repository. Triggers repository observers for new entries and updates.

Syntax:

Store the <data> into the <repository>.

Examples:

Store the <user> into the <user-repository>.
Store the <order> into the <order-repository>.

Observer Event Behavior:

Scenario Observer Event new-entry Value
New entry created fires 1
Update (same ID, different value) updated fires 0
Duplicate (same value) No event 0
  • Deduplication: Storing the same value twice is a no-op — no event fires
  • Variable binding: Binds new-entry to 1 (new) or 0 (duplicate/update)

List Storage:

When storing a List, Store triggers one observer event per item:

(* Store a list of users - triggers observer for EACH user *)
Store the <users: List> into the <user-repository>.
(Process User: user-repository Observer) {
    (* Receives ONE user, not the entire list *)
    Extract the <user> from the <event: newValue>.
    Return an <OK: status> for the <processing>.
}

Best Practice: Use repository observers to react to stored data rather than combining Store with Emit. See Guide-Repositories for patterns.

Valid Prepositions: into


Publish

Makes variables globally available.

Syntax:

Publish as <alias> <variable>.

Examples:

Publish as <app-config> <config>.
Publish as <current-user> <user>.

Valid Prepositions: as


Log

Writes to logs.

Syntax:

Log <value> to the <destination>.

Examples:

Log "User logged in" to the <console>.
Log <error> to the <console>.
Log <details> to the <audit-log>.

Valid Prepositions: to


Send

Sends data to external destinations.

Syntax:

Send the <data> to the <destination>.
Send the <data> to the <destination> with <content>.

Examples:

Send the <email> to the <user: email>.
Send the <notification> to the <push-service>.
Send the <data> to the <connection>.
Send the <message> to the <connection> with "Hello".

Valid Prepositions: to, with


Emit

Emits domain events.

Syntax:

Emit [article] <event-type: event> with <data>.

Examples:

Emit a <UserCreated: event> with <user>.
Emit an <OrderPlaced: event> with <order>.
Emit a <PaymentProcessed: event> with <payment>.

Valid Prepositions: with


Write

Writes to files with automatic format detection based on file extension.

Syntax:

Write the <data> to the <file: path>.
Write the <data> to <path>.
Write the <data> to <path> with { options }.

Format Detection:

The file extension determines the output format:

Extension Format Output
.json JSON Pretty-printed JSON
.jsonl, .ndjson JSON Lines One JSON object per line
.yaml, .yml YAML Human-readable YAML
.toml TOML TOML tables
.csv CSV Comma-separated with headers
.tsv TSV Tab-separated with headers
.xml XML XML with variable name as root
.md Markdown Markdown table
.html HTML HTML table element
.txt Plain Text key=value pairs
.sql SQL INSERT statements
.log Log Date-prefixed entries
.env Environment KEY=VALUE format
.obj, unknown Binary Raw bytes

Examples:

(* Text file *)
Write the <content> to the <file: "./output.txt">.

(* JSON - automatically serialized *)
Write the <users> to "./output/users.json".

(* JSON Lines - compact, one per line *)
Write the <events> to "./logs/events.jsonl".

(* CSV - spreadsheet friendly *)
Write the <report> to "./export/report.csv".

(* YAML - human readable *)
Write the <config> to "./settings.yaml".

(* XML - variable name becomes root element *)
Write the <products> to "./catalog/products.xml".

(* Markdown table *)
Write the <summary> to "./docs/summary.md".

(* SQL INSERT statements *)
Write the <users> to "./backup/users.sql".

(* CSV with custom options *)
Write the <data> to "./export.csv" with { delimiter: ";", header: false }.

CSV/TSV Options:

Option Type Default Description
delimiter String , / \t Field separator
header Boolean true Include header row
quote String " Quote character

Valid Prepositions: to


Append

Appends content to a file.

Syntax:

Append the <data> to the <file: path>.

Examples:

Append the <log-line> to the <file: "./logs/app.log">.
Append the <entry> to the <file: "./data.txt">.

Valid Prepositions: to, into


List

Lists directory contents.

Syntax:

Create the <dir-path> with "./path".
List the <result> from the <directory: dir-path>.
List the <result> from the <directory: dir-path> matching "pattern".
List the <result> from the <directory: dir-path> recursively.

Examples:

Create the <uploads-path> with "./uploads".
List the <entries> from the <directory: uploads-path>.
List the <aro-files> from the <directory: src-path> matching "*.aro".
List the <all-files> from the <directory: project-path> recursively.

Valid Prepositions: from


Stat

Gets file or directory metadata.

Syntax:

Stat the <result> for the <file: path>.
Stat the <result> for the <directory: path>.

Examples:

Stat the <info> for the <file: "./document.pdf">.
Stat the <dir-info> for the <directory: "./src">.

Result Properties:

  • name - file or directory name
  • path - full path
  • size - size in bytes
  • isFile - true if file
  • isDirectory - true if directory
  • created - creation date (ISO 8601)
  • modified - modification date (ISO 8601)
  • permissions - Unix-style permissions

Valid Prepositions: for


Exists

Checks if a file or directory exists.

Syntax:

Exists the <result> for the <file: path>.
Exists the <result> for the <directory: path>.

Examples:

Exists the <found> for the <file: "./config.json">.
Exists the <dir-exists> for the <directory: "./output">.

Valid Prepositions: for


CreateDirectory

Creates a directory with all intermediate directories.

Verbs: createdirectory, mkdir, make

Syntax:

Make the <directory> at the <path: path>.
CreateDirectory the <result> to the <path: path>.

Examples:

(* Natural syntax with "make" verb *)
Make the <directory> at the <path: "./output/reports/2024">.

(* Traditional syntax *)
CreateDirectory the <output-dir> to the <path: "./output/reports/2024">.

Valid Prepositions: at, to, for


Copy

Copies files or directories.

Syntax:

Copy the <file: source> to the <destination: dest>.
Copy the <directory: source> to the <destination: dest>.

Examples:

Copy the <file: "./template.txt"> to the <destination: "./copy.txt">.
Copy the <directory: "./src"> to the <destination: "./backup/src">.

Valid Prepositions: to


Move

Moves or renames files and directories.

Syntax:

Move the <file: source> to the <destination: dest>.
Move the <directory: source> to the <destination: dest>.

Examples:

Move the <file: "./draft.txt"> to the <destination: "./final.txt">.
Move the <directory: "./temp"> to the <destination: "./processed">.

Valid Prepositions: to


Delete

Removes data.

Syntax:

Delete the <target> from the <source> [where <condition>].
Delete the <file: path>.

Examples:

Delete the <user> from the <user-repository> where id = <user-id>.
Delete the <file: "./temp.txt">.
Delete the <sessions> from the <repository> where expired = true.

Valid Prepositions: from


Notify

Sends a notification to a recipient. Supports single recipients and collections.

Syntax:

Notify the <recipient> with "message".
Notify the <recipient> with <message-variable>.

Examples:

(* Notify a single user *)
Notify the <user> with "Your order has been shipped.".

(* Notify a collection - dispatches one notification per item *)
Notify the <subscribers> with "System maintenance at midnight.".

Handler Guards:

Use a when clause on the handler declaration to filter which notifications it processes:

(Send Alert: NotificationSent Handler) when <age> >= 18 {
    Extract the <user> from the <event: user>.
    Send the <email> to the <user: email>.
    Return an <OK: status> for the <notification>.
}

The guard is evaluated before the handler body executes. If the condition is false, the handler is silently skipped. The target object's fields are available directly in the condition expression.

Event Payload: When Notify fires, the NotificationSent event carries:

  • event["user"] - the target recipient object
  • event["message"] - the notification message

Valid Prepositions: with


TERMINAL Actions

Prompt

Prompts the user for text input in the terminal.

Syntax:

Prompt the <result> for "prompt text".
Prompt the <result> for <prompt-variable>.

Examples:

Prompt the <name> for "Enter your name: ".
Prompt the <password> for "Password: ".
Prompt the <choice> for "Continue? (y/n): ".

Valid Prepositions: for


Select

Presents a selection menu in the terminal and returns the chosen item.

Syntax:

Select the <result> from the <options> with "title".
Select the <result> from the <options> with <title-variable>.

Examples:

Create the <colors> with ["Red", "Green", "Blue"].
Select the <color> from the <colors> with "Choose a color".

Create the <sizes> with ["Small", "Medium", "Large"].
Select the <size> from the <sizes> with "Select size".

Valid Prepositions: from, with


Clear

Clears the terminal screen.

Syntax:

Clear the <terminal>.

Examples:

Clear the <terminal>.

Valid Prepositions: None


SERVICE Actions

Start

Starts a service. All services use the standardized with preposition for configuration.

Syntax:

Start the <service> with <configuration>.

Examples:

(* HTTP server from OpenAPI contract *)
Start the <http-server> with <contract>.

(* Socket server with port configuration *)
Start the <socket-server> with { port: 9000 }.

(* File monitor with directory path *)
Start the <file-monitor> with ".".
Start the <file-monitor> with { directory: "./data" }.

Valid Prepositions: with


Stop

Stops a service gracefully.

Syntax:

Stop the <service> with <context>.

Examples:

Stop the <http-server> with <application>.
Stop the <socket-server> with <application>.
Stop the <file-monitor> with <application>.

Valid Prepositions: with


Listen

Listens for connections.

Syntax:

Listen on port <number> as <name>.

Examples:

Listen on port 9000 as <socket-server>.

Valid Prepositions: on, as


Connect

Connects to a service.

Syntax:

Connect to <host: address> on port <number> as <name>.

Examples:

Connect to <host: "localhost"> on port 5432 as <database>.
Connect to <host: "redis.local"> on port 6379 as <cache>.

Valid Prepositions: to, on, as


Close

Closes connections.

Syntax:

Close the <connection>.

Examples:

Close the <database-connections>.
Close the <socket-server>.
Close the <connection>.

Valid Prepositions: None


Call

Makes API calls.

Syntax:

Call the <result> via <api-reference> [with <data>].

Examples:

Call the <result> via <UserAPI: POST /users> with <user-data>.
Call the <response> via <PaymentAPI: POST /charge> with <payment>.

Valid Prepositions: via, with


Broadcast

Sends to all connections.

Syntax:

Broadcast the <message> to the <server>.

Examples:

Broadcast the <message> to the <socket-server>.
Broadcast the <notification> to the <chat-server> with "User joined".

Valid Prepositions: to, with


Keepalive

Keeps a long-running application alive to process events.

Syntax:

Keepalive the <application> for the <events>.

Description: The Keepalive action blocks execution until a shutdown signal is received (SIGINT/SIGTERM). This is essential for applications that need to stay alive and process events, such as HTTP servers, file watchers, and socket servers.

Examples:

(Application-Start: My Server) {
    Start the <http-server> with <contract>.
    Keepalive the <application> for the <events>.
    Return an <OK: status> for the <startup>.
}

(Application-Start: File Watcher) {
    Start the <file-monitor> with "./watched".
    Keepalive the <application> for the <events>.
    Return an <OK: status> for the <startup>.
}

Valid Prepositions: for


Action Summary Table

Action Role Prepositions
Extract REQUEST from
Retrieve REQUEST from
Request REQUEST from, to, via
Read REQUEST from
Exec REQUEST for, on, with
Create OWN with
Compute OWN for, from
Transform OWN from
Validate OWN for
Compare OWN against
Update OWN with
Map OWN from
Filter OWN from, where
Reduce OWN from, with
Sort OWN by
Split OWN from (by clause)
Merge OWN with, into, from
Return RESPONSE with, for
Throw RESPONSE for
Store EXPORT into
Publish EXPORT as
Log EXPORT to
Send EXPORT to, with
Emit EXPORT with
Write EXPORT to
Delete EXPORT from
Notify EXPORT with
Prompt TERMINAL for
Select TERMINAL from, with
Clear TERMINAL -
List FILE from
Stat FILE for
Exists FILE for
CreateDirectory FILE to
Copy FILE to
Move FILE to
Append FILE to
Start SERVICE with
Stop SERVICE with
Listen SERVICE on, as
Connect SERVICE to, on, as
Close SERVICE -
Call SERVICE via, with
Broadcast SERVICE to, with
Keepalive SERVICE for
Accept STATE -
Given TEST with
When TEST -
Then TEST -
Assert TEST equals, contains

Clone this wiki locally