Meroctl
Meroctl is a command-line tool that enables you to interact with your Calimero node directly from the shell.
Installation
You can choose to install meroctl
using either the installation script or
Homebrew.
- Homebrew
- Installation Script
If you use Homebrew, you can install meroctl
directly with the following
steps:
Steps​
-
Add the Calimero Homebrew tap:
brew tap calimero-network/homebrew-tap
-
Install
merod
:brew install meroctl
-
Verify the installation:
meroctl --version
If the version number appears, the installation was successful.
The installation script supports multiple terminal environments and will automatically configure your PATH based on your shell.
Steps​
-
Open your terminal and run:
curl -sSf https://raw.githubusercontent.com/calimero-network/core/master/scripts/install-meroctl.sh | bash
-
Source the updated PATH:
source <your-shell-config-file>
Replace
<your-shell-config-file>
with.bashrc
,.zshrc
, or the relevant configuration file for your shell. -
Verify the installation:
meroctl --version
If the version number appears, the installation was successful.
Notes for Shell Environments​
The script automatically updates your PATH based on your shell configuration:
- Bash: Updates
.bashrc
. - Zsh: Updates
.zshrc
. - Fish: Modifies
~/.config/fish/config.fish
. - Csh/Tcsh: Updates
.cshrc
.
To apply the changes immediately, use the source
command as described in step
2 above.
Usage​
meroctl [OPTIONS] --node-name <NAME> <COMMAND>
Commands:​
app
Command for managing applicationscontext
Command for managing contextsidentity
Command for managing applicationsproxy
Command for managing proxy contractcall
Executing read and write RPC callshelp
Print this message or the help of the given subcommand(s)
Run help to get more information about the available options and commands.
meroctl --help
Options:​
--home <PATH>
Directory for config and data-n
,--node-name <NAME>
Name of node-h
,--help
Print help-output-format <FORMAT>
[default: plain-text] [possible values: json, plain-text]-V
,--version
Print version
Default location of the config and data directory is ~/.calimero
. You can
change the location by using the --home
option.
All of the communication with your node through the meroctl CLI is protected by your nodes private key.
Examples:​
Command | Description |
---|---|
meroctl --node-name <NAME> app <COMMAND> | Command for managing applications |
meroctl --node-name <NAME> context <COMMAND> | Command for managing contexts |
meroctl --node-name <NAME> identity <COMMAND> | Command for managing identities |
meroctl --node-name <NAME> proxy <COMMAND> | Command for managing proxy contract |
meroctl --node-name <NAME> call [OPTIONS] --as <EXECUTOR> <CONTEXT_ID> <METHOD> | Executing read and write RPC calls |
Manage Applications​
meroctl --node-name <NAME> app <COMMAND>
Commands:
get
Fetch application detailsinstall
Install an applicationlist
List installed applications
Manage Contexts​
meroctl --node-name <NAME> context <COMMAND>
Commands:
list
List all contextscreate
Create a new contextjoin
Join an application contextinvite
Create invitation to a context for a inviteeget
Fetch details about the contextdelete
Delete an contextwatch
Watch events from a contextupdate
Update app in context
Manage Identities​
meroctl --node-name <NAME> identity <COMMAND>
Commands:
generate
Generate public/private key pair used for context identity
Command for managing proxy contract​
meroctl --node-name <NAME> proxy <COMMAND>
Commands:
get
Fetch details about the proxy contract
Executing read and write RPC calls​
meroctl --node-name <NAME> call [OPTIONS] --as <EXECUTOR> <CONTEXT_ID> <METHOD>
Arguments:
<CONTEXT_ID>
ContextId of the context<METHOD>
Method to fetch details
Options:
--args <ARGS>
JSON arguments to pass to the method--as <EXECUTOR>
Public key of the executor--id <ID>
Id of the RPC execute call [default: dontcare]