-
Notifications
You must be signed in to change notification settings - Fork 15
CLI
zynzel edited this page Apr 19, 2025
·
1 revision
By default dmh-cli is installed in docker container.
If you need to install it manually:
- Clone
dead-man-handrepo - Run
make build(insidecmdsubdirectory you would finddmh-clibinary).
Update DMH and Vault LastSeen information
% dmh-cli alive update
Add new action to DMH, data parameter will be encrypted.
% dmh-cli action add --comment comment --kind bulksms --process-after 10 --data '{"message": "some secret message", "destination": ["+48123"]}'
Action added successfully
List all stored actions from DMH.
% dmh-cli action ls | jq
[
{
"kind": "bulksms",
"process_after": 10,
"min_interval": 0,
"comment": "comment",
"data": "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqeVVXWmN2c0kxVFlycWdlcjhOQWtRN24vS0JqUFdjZ3pseW9kdDkxbldNCmd1Q1hjejVEaWJpL1hVU25rTC81MkRQcDEyY3JVbjg1OEJNRjRsaHgxdTAKLS0tIE5BaWNWT0k0SHN4Y0dUeWVWTHdlMEhMc0xVU2gwUkVPT0FvTGhvb3FCdG8KISgQKJJ+m+7oCy8V7RlSFARNYUOzBbGVmd92wdxZA71k3PoIxpXopKfY5vnTNlGj2cVnXuSYe3BJOLSM5GCAOQwDt4QXlIheQSVu5FHS",
"uuid": "b9a95651-2cd6-4d73-9b95-eed96c151174",
"processed": 0,
"last_run": "0001-01-01T00:00:00Z"",
"encryption": {
"kind": "X25519",
"vault_url": "http://127.0.0.1:8080/api/vault/store/random-uuid-dont-copy/b9a95651-2cd6-4d73-9b95-eed96c151174"
}
}
]
Delete action from DMH
% dmh-cli action delete --uuid b9a95651-2cd6-4d73-9b95-eed96c151174
Action deleted successfully
Perform action test.
THIS IS RECOMENDATED BEFORE USING action add, TO CONFIRM THAT PROVIDED data is valid.
% dmh-cli action test --kind dummy --data '{"message": "test"}'
Action tested successfully