The hemictl
command is a generic tool to script commands to various daemons.
hemictl <daemon> <action> [json parameters]
daemon
: Determines the default URIhemictl
connects to (e.g.,bss
connects tows://localhost:8081/v1/ws
)action
: Specifies which command will be called (e.g.,ping
)parameters
: JSON encoded parameters for theaction
(e.g.,{"timestamp":1}
)
LOGLEVEL
: Sets the logging level (e.g.,INFO
,DEBUG
)PGURI
: Override database connection URI for database operationsHEMI_URI
: Override default daemon URI (format:ws://host:port/v1/ws
)
hemictl bss ping '{"timestamp":1}'
Response:
{
"origintimestamp": 1,
"timestamp": 1701091119
}
hemictl bss l1tick '{"l1_height":0}'
Response:
{
"error": {
"timestamp": 1701091156,
"trace": "804d952f893e686c",
"error": "L1 tick notification with height zero"
}
}
hemictl
provides direct access to the storage layer, currently supporting PostgreSQL.
hemictl bfgdb version
Response:
{"bfgdb_version":1}
LOGLEVEL=INFO PGURI="user=username password=secretpassword database=bfgdb" hemictl bfgdb version
The tool provides detailed error messages with:
- Timestamp of the error
- Trace ID for debugging
- Human-readable error message
- Always ensure proper JSON formatting in parameters
- Use appropriate environment variables for production deployments
- Check logs when troubleshooting failed commands