Your First Task File
Task files are plain-text files with a .oce extension. They describe what to run and with what parameters. This page walks through creating and running your first one.
Create the file
Create a new file called my-first-task.oce anywhere on your computer — your Desktop is fine to start. Open it in any text editor and paste the following:
[["toy-calculator::calculate"]]operation = "add"operands = [1, 2, 3]output_dir = "./outputs/add"Save it.
What this means
The file defines one task:
[["toy-calculator::calculate"]]— run thecalculatecommand provided by thetoy-calculatorplugin.toy-calculatoris the alias — the short name that maps to the installed plugin. See Aliases for how this works.operation = "add"— add the operands togetheroperands = [1, 2, 3]— the numbers to add: 1 + 2 + 3output_dir = "./outputs/add"— where to write the result file, relative to the task file
Run it
- In Open Choice, open the Recent Files panel
- Click Add file and select
my-first-task.oce - The file appears in the list — click it to open it in the editor
- Click the Run button (▶) in the editor toolbar, or press Ctrl+Enter
The run panel opens and you will see:
- A
startedevent - Progress events as the calculation steps through each operand
- An
artifact_createdevent whenresult.jsonis written - A
finishedevent withsuccess: true
Check the output
Open the folder containing your task file. A new outputs/add/ directory has been created containing:
result.json— the machine-readable result:{"result": 6, "steps": [...]}run.log— a human-readable execution log
Using snippets
Instead of typing task file content from scratch, you can use the snippet library. Open the Snippets panel, find the Toy Calculator snippets, and click one to insert it into the editor. Snippets are contributed by plugins at install time.
You can also open the Help Explorer panel, find the Toy Calculator → Calculate endpoint, and click Insert template to append the template directly into the active editor, or Copy template to copy it to the clipboard.
Next steps
- The .oce File Format — full syntax reference
- Running Tasks — understanding the run panel output
- Browsing the Registry — finding more plugins to install