Generate Your Own Nyno Workflow Extensions

Generate Your Own Nyno Workflow Extensions (Markdown Version)


Nyno Extension Rules (Simple)

1. Basic Rules

2. Dynamic Output Key

3. Return Values

4. Context Usage

5. Syntax

6. Language Choice Guideline

7. Examples

Example Python extension

# extensions/hello-py/command.py
def hello_py(args, context):
    name = args[0] if args else "World"
    set_name = context.get("set_context", "prev")
    context[set_name] = f"Hello, {name} from Python!"
    return 0

Example PHP extension

<?php
// extensions/hello-php/command.php
function hello_php($args, &$context) { // & required to modify context
    $name = $args[0] ?? "World";
    $setName = $context["set_context"] ?? "prev";
    $context[$setName] = "Hello, $name from PHP!";
    return 0;
}

Example Ruby extension

# extensions/hello-rb/command.rb
def hello_rb(args, context)
  name = args[0] || "World"
  set_name = context["set_context"] || "prev"
  context[set_name] = "Hello, #{name} from Ruby!"
  return 0
end

JS Example using context to pass data between steps

export function some_extension(args, context) {
  const result = args[0] || "default value";

  const setName = context?.set_context ?? "prev";

  // Save output in context for the next step
  context[setName] = result;

  return 0; // default path
}

8. Libraries

9. Security

Making an Extension Appear in the GUI

For an extension to be detected and loaded in the GUI (search/loader), it must include a minimal set of correctly named files.

If any of these are missing or misnamed, the extension will not show up at all.


Required Files

template.yml (mandatory)

Example:

- step: ai-mistral-embeddings
  args:
    - '${prev}'

label.txt (optional)

Example:

🔵 Generate 1024-dimension vector from text for search

Icon (optional: pick one)

You must include one of:


Example Directory Structure

your-extension/
├── command.py
├── template.yml
├── label.txt
└── (icon.webp OR emoji.txt)