diff --git a/docs/install2.md b/docs/install2.md index c877086c..86e3db92 100644 --- a/docs/install2.md +++ b/docs/install2.md @@ -61,3 +61,21 @@ Example running the core-daemon task from the root of the repo: ```shell 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 +``` diff --git a/tasks.py b/tasks.py index 0255ffd9..b180688d 100644 --- a/tasks.py +++ b/tasks.py @@ -205,6 +205,15 @@ def gui(c): 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 def cleanup(c): """