added invoke task to help wrap core-cli

This commit is contained in:
Blake Harnden 2020-07-10 20:29:47 -07:00
parent 80eaa27469
commit d0e9cee650
2 changed files with 27 additions and 0 deletions

View file

@ -61,3 +61,21 @@ Example running the core-daemon task from the root of the repo:
```shell ```shell
inv daemon inv daemon
``` ```
Some tasks are wrappers around command line tools and requires running
them with a slight variation for compatibility. You can enter the
poetry shell to run the script natively.
```shell
# running core-cli as a task requires all options to be provided
# within a string
inv cli "query session -i 1"
# entering the poetry shell to use core-cli natively
cd $REPO/daemon
poetry shell
core-cli query session -i 1
# exit the shell
exit
```

View file

@ -205,6 +205,15 @@ def gui(c):
c.run("poetry run scripts/core-pygui", pty=True) c.run("poetry run scripts/core-pygui", pty=True)
@task
def cli(c, args):
"""
run core-cli used to query and modify a running session
"""
with c.cd(DAEMON_DIR):
c.run(f"poetry run scripts/core-cli {args}", pty=True)
@task @task
def cleanup(c): def cleanup(c):
""" """