rpc: Call an exported Erlang function on the node

Call an exported Erlang function on the node.

Syntax

bin/zotonic rpc <module> <function> [argument ...]

Requirements and effects

Requires a running node; effects depend entirely on the called function.

Each argument is passed as a string, not parsed as an Erlang term. A value such as garden is therefore not automatically an atom. Use the shell for typed Erlang expressions and context-aware model calls. The no-argument ping example is read-only.

Example

bin/zotonic rpc zotonic ping

Run commands from the Zotonic workspace root. Replace garden with your site name where applicable.