Action
Overview
See Beeker overview for more information.
Example yaml configuration file
name: update-page-title
label: Example - Update page title
description: Allow to update example page title
group: Example
parallelize: true
variables:
- name: title
label: Title
rules:
- name: update-page-title
target: ./page.tsx
Note: The extension for this configuration file needs to be .action.yml
Configuration keywords
Root
Keyword | Description | Required |
---|---|---|
name* | The name of the action. | ✔ |
label | A nice label for the action. | ✘ |
description | A short text describing what the action will do. | ✘ |
group | The parent group of the action, for grouping actions together. | ✘ |
parallelize | Set to true if rules should be applied in parallel, of false if it should be applied sequentially. (defaults to true) | ✘ |
target_root_dir | All paths to target files will be considered relative to this directory. | ✘ |
variable_interpolation_mode | Interpolation mode for variables. Possible values include: double-curly-brace, simple-curly-brace, dollar-curly-brace. | ✘ |
variables | The list of variables that will be injected to rules. | ✘ |
rules* | The list of rules to apply with this action. | ✔ |
Variable
Keyword | Description | Required |
---|---|---|
name* | The technical name of the variable. | ✔ |
label | The label displayed next to inputs in beeker apps. | ✘ |
description | The description displayed in a tooltip on 'Ⓘ' next to inputs in beeker apps. | ✘ |
value | The value of the variable. | ✘ |
default_value | The default value of the variable, displayed in the placeholder of inputs in beeker apps. | ✘ |
required | Set this to false to make the variable optional (defaults to true). | ✘ |
Rule
Keyword | Description | Required |
---|---|---|
name* | The reference name of the rule. | ✔ |
target* | The relative path to the file modified by the rule. | ✔ |
context | The relative path to the file (if single), or the list of the files that will serve as context for the rule (if multiple). | ✘ |
path | The relative path to the configuration file of the rule. Defaults to file name. | ✘ |
spec | The content of the rule. | ✘ |
only | Set this to true to apply only this rule in action (defaults to false). | ✘ |
Context File
Keyword | Description | Required |
---|---|---|
name* | The name of the context reference for use in the rule. | ✔ |
path* | The relative path to the file that will serve as context. | ✔ |
Shortcuts
If you want to add only one file to the context, you can provide directly the path of the file :
rules:
- name: example-rule
target: ./target.tsx
context: ./context.tsx
If you want to add multiple files to the context without specifying context names, you can provide a list of paths :
rules:
- name: example-rule
target: ./target.tsx
context:
- ./context1.tsx
- ./context2.tsx
💡 The default context names will be Context1, Context2, etc... if not specified.
Accommodate your Programming Language
By its very nature, Beeker supports all languages that AI can handle. The default template interpolation mode for variables is double-curly-brace {{ }}
. However, in certain programming languages, this syntax is already utilized for variable binding.
In such scenarios, you can employ the variable_interpolation_mode property to modify the way variable templates are processed in your action. For instance, in Angular, the double curly brace syntax is used for data binding. To circumvent conflicts with Angular's syntax, you could opt for the dollar-curly-brace syntax: ${ }
.