@pre(file_name=_file_is_in_sync)
def build(file_name: Path):
...
I believe such libraries do exist even, but I haven't yet researched the topic; if jeeves proves to be useful for the simplest use case then it will make sense to expand its scope. j lint
is shorter than python scripts.py lint
and the letter `j` is what the index finger of your right hand is pointing to on the keyboard. There is usually a tactile bump on that key. It is something you can type very quickly. You can also install shell completion to improve the experience further. compose = sh.docker.compose.bake('-f', 'deploy/dev.yml')
…
compose.down()
…
compose.up('--force-recreate', '-d')
I feel this is a major improvement on top of Makefiles + shell commands in them. Nice API _matters_; it is ergonomics and therefore productivity. pip install jeeves-yeti-pyproject
will provide you with jeeves, a bunch of commands, and a pack of dev dependencies which I personally happen to like and to use in my projects. my_sh = sh.bake(_tty_out=False)
my_sh.do_whatever()
The way how sh captures output can apparently be altered, say, by providing a callable to _out argument.
contains the command's stdout.
In addition stdout can be redirected to a file, or to another command, or to a callable, — which will be called for chunks of stdout while the command is in operation.