Configuration
Action

Action

Overview

See Beeker overview for more information.

Example yaml configuration file

update-page-title.action.yml
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

KeywordDescriptionRequired
name*The name of the action.
labelA nice label for the action.
descriptionA short text describing what the action will do.
groupThe parent group of the action, for grouping actions together.
parallelizeSet to true if rules should be applied in parallel, of false if it should be applied sequentially. (defaults to true)
target_root_dirAll paths to target files will be considered relative to this directory.
variable_interpolation_modeInterpolation mode for variables. Possible values include: double-curly-brace, simple-curly-brace, dollar-curly-brace.
variablesThe list of variables that will be injected to rules.
rules*The list of rules to apply with this action.

Variable

KeywordDescriptionRequired
name*The technical name of the variable.
labelThe label displayed next to inputs in beeker apps.
descriptionThe description displayed in a tooltip on 'Ⓘ' next to inputs in beeker apps.
valueThe value of the variable.
default_valueThe default value of the variable, displayed in the placeholder of inputs in beeker apps.
requiredSet this to false to make the variable optional (defaults to true).

Rule

KeywordDescriptionRequired
name*The reference name of the rule.
target*The relative path to the file modified by the rule.
contextThe relative path to the file (if single), or the list of the files that will serve as context for the rule (if multiple).
pathThe relative path to the configuration file of the rule. Defaults to file name.
specThe content of the rule.
onlySet this to true to apply only this rule in action (defaults to false).

Context File

KeywordDescriptionRequired
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: ${ }.