From dd045236136db7d5ce7f59b6741542ca3bc1a8f4 Mon Sep 17 00:00:00 2001 From: Dominik Klotz <105296959+programminx-askui@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:47:43 +0200 Subject: [PATCH 1/3] Update agent.py --- src/askui/agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/askui/agent.py b/src/askui/agent.py index b59711e0..1b5ae723 100644 --- a/src/askui/agent.py +++ b/src/askui/agent.py @@ -638,9 +638,13 @@ def cli( from askui import VisionAgent with VisionAgent() as agent: + # Mac/Linux agent.cli("echo Hello World") # Prints "Hello World" agent.cli("ls -la") # Lists files in current directory with details agent.cli("python --version") # Displays Python version + + # Use for Windows + agent.cli(fr'"C:\Program Files\VideoLAN\VLC\vlc.exe"') # Ensure double quote and fr-string for spaces in name ``` """ logger.debug("VisionAgent received instruction to execute '%s' on cli", command) From 666ac7bec042caf7a81affcf8abd1411ec24076f Mon Sep 17 00:00:00 2001 From: Dominik Klotz <105296959+programminx-askui@users.noreply.github.com> Date: Mon, 9 Jun 2025 19:28:25 +0200 Subject: [PATCH 2/3] Add working examples --- src/askui/agent.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/askui/agent.py b/src/askui/agent.py index 1b5ae723..48583416 100644 --- a/src/askui/agent.py +++ b/src/askui/agent.py @@ -638,13 +638,15 @@ def cli( from askui import VisionAgent with VisionAgent() as agent: + # Use for Windows + agent.cli(fr'start "" "C:\Program Files\VideoLAN\VLC\vlc.exe"') # Start in VLC Non-Blocking + agent.cli(fr'"C:\Program Files\VideoLAN\VLC\vlc.exe"') # Start in VLC Blocking + # Mac/Linux agent.cli("echo Hello World") # Prints "Hello World" agent.cli("ls -la") # Lists files in current directory with details agent.cli("python --version") # Displays Python version - - # Use for Windows - agent.cli(fr'"C:\Program Files\VideoLAN\VLC\vlc.exe"') # Ensure double quote and fr-string for spaces in name + agent.cli("open -a chrome") # Open Chrome Non-Blocking ``` """ logger.debug("VisionAgent received instruction to execute '%s' on cli", command) From 7e64c08442d3e4367a08fabc714a5edcf6bac6fc Mon Sep 17 00:00:00 2001 From: Dominik Klotz <105296959+programminx-askui@users.noreply.github.com> Date: Wed, 11 Jun 2025 09:48:55 +0200 Subject: [PATCH 3/3] Update Examples --- src/askui/agent.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/askui/agent.py b/src/askui/agent.py index 48583416..752091ad 100644 --- a/src/askui/agent.py +++ b/src/askui/agent.py @@ -639,14 +639,21 @@ def cli( with VisionAgent() as agent: # Use for Windows - agent.cli(fr'start "" "C:\Program Files\VideoLAN\VLC\vlc.exe"') # Start in VLC Non-Blocking - agent.cli(fr'"C:\Program Files\VideoLAN\VLC\vlc.exe"') # Start in VLC Blocking + agent.cli(fr'start "" "C:\Program Files\VideoLAN\VLC\vlc.exe"') # Start in VLC non-blocking + agent.cli(fr'"C:\Program Files\VideoLAN\VLC\vlc.exe"') # Start in VLC blocking - # Mac/Linux + # Mac + agent.cli("open -a chrome") # Open Chrome non-blocking for mac + agent.cli("chrome") # Open Chrome blocking for linux agent.cli("echo Hello World") # Prints "Hello World" - agent.cli("ls -la") # Lists files in current directory with details agent.cli("python --version") # Displays Python version - agent.cli("open -a chrome") # Open Chrome Non-Blocking + + # Linux + agent.cli("nohub chrome") # Open Chrome non-blocking for linux + agent.cli("chrome") # Open Chrome blocking for linux + agent.cli("echo Hello World") # Prints "Hello World" + agent.cli("python --version") # Displays Python version + ``` """ logger.debug("VisionAgent received instruction to execute '%s' on cli", command)