This is a CLI Checklist tool and task runner.
If you have go:
go install github.com/midry3/hato@latestLinux, Mac:
curl https://raw.githubusercontent.com/midry3/hato/main/install.sh | shWindows:
winget install --id Midry.hatoor download binary from here.
# Initialize
$ hato --init
# Add an item of checklist
$ hato --add Check A
$ hato --add Check B
# Create `test` checklist and add an item of checklist
$ hato test --add Test Check A
$ hato test --add Test Check B
# Check the list
$ hato
$ hato test
# When -g, --global option was selected, use ~/hato.yml
$ hato -gPlease edit hato.yml on current directory.
The way of checking the list is this:
- If ok,
Enterand next. - If not ok,
Escand stop.
If all checklists are ok, and if you set actions, run the actions.
# https://github.com/midry3/hato
default:
nargs: 0
aliases:
- Alias1
- Alias2
inform:
checklist:
- Check A
- Check B
actions:
- echo Action1
- echo Action2
checklist_name:
nargs: 2
aliases:
- Alias3
inform:
- echo Information1
- echo Information2
checklist:
# You can recieve an argument by %position
- Value1 is "%1", ok?
- Value2 is "%2", ok?
actions:
- echo %1
- echo %(2)And result will be like this:
$ hato
[1]: Check A => ✅
[2]: Check B => ✅
All of checklist are ok!
Running 1/2: `echo Action1` ...
Action1
Running 2/2: `echo Action2` ...
Action2
✅All actions have been completed!$ hato checklist_name 123 abc
――――――――――――――――――――――――――――Information――――――――――――――――――――――――――――――――――――――――――
Information1
Information2
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[1]: Value1 is "123", ok? => ✅
[2]: Value2 is "abc", ok? => ✅
All of checklist are ok!
Running 1/2: `echo 123` ...
123
Running 2/2: `echo abc` ...
abc
✅All actions have been completed!$ hato Alias3
This checklist needs just 2 arguments.# https://github.com/midry3/hato
default:
checklist:
- Are you happy?
push:
nargs: 1
aliases:
- p
checklist:
- Current branch is %1?
- Updated version?
- README is ok?
actions:
- git pull origin %1
- git push origin %1
commit:
nargs: 1
aliases:
- c
inform:
- git status
checklist:
- Checked the stages?
- Removed test debug codes?
- Are you ok this commit message?
actions:
- git commit -m %1