Alaja.CLI.Commands.Action (Alaja v2.0.0)

Copy Markdown View Source

alaja action — Execute Alaja commands from JSON input.

Accepts JSON from stdin, a file, or inline data and dispatches commands to Alaja.CLI.exec/1 (in-process). Supports single actions and batch operations.

Performance

Batch execution uses Alaja.CLI.exec/1 which does not re-start the application stack for each element. This makes batch actions dramatically faster than the historical implementation (which called Alaja.CLI.main/1 and paid the boot cost on every invocation).

Examples

echo '{"command": "success", "args": ["Done!"]}' | alaja action
alaja action --file actions.json
alaja action --data '{"command": "info", "args": ["Processing..."]}'
alaja action --data '{"actions":[...]}' --stop-on-error
alaja action --data '{"actions":[...]}' --parallel 4
alaja action --data '{"actions":[...]}' --dry-run

Summary

Functions

Prints help for the alaja action command.

Runs the alaja action command.

Functions

help()

@spec help() :: :ok

Prints help for the alaja action command.

run(args)

@spec run([String.t()]) :: :ok | no_return()

Runs the alaja action command.