Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f9e710f
feat: Add easy CLI install mode for executing scripts,
AlexSimao Oct 20, 2025
4160f3b
feat: Implement easy CLI install handling in main script, that search…
AlexSimao Oct 20, 2025
0b2b602
feat: Add script installation handling in EASY CLI mode with a functi…
AlexSimao Oct 20, 2025
266f5fd
feat: Add feedback mechanism for script execution and user prompt on …
AlexSimao Oct 20, 2025
cb760fa
feat: Add function to run scripts without Zenity interaction by simul…
AlexSimao Oct 20, 2025
05f2cc7
feat: Add support for disabling Zenity prompts in Docker and Mise scr…
AlexSimao Oct 20, 2025
4999b34
feat: Refactor installation functions in EASY CLI mode and improve us…
AlexSimao Oct 20, 2025
2191314
feat: Disable Zenity prompts for CLI execution.
AlexSimao Oct 20, 2025
58b86ff
feat: Add manifest mode to EASY CLI. The -m | --manifest flag enables…
AlexSimao Oct 20, 2025
b9705ec
refactor: Refactor user confirmation function and add confirmation pr…
AlexSimao Oct 20, 2025
a478db2
feat(easy-cli): add support for -v to show current version and -y to …
AlexSimao Oct 20, 2025
d33975d
feat(easy-cli): add support for -l | --list to display all available …
AlexSimao Oct 21, 2025
49ad6c4
refactor(easy-cli): modularize EASY CLI mode for better readability a…
AlexSimao Oct 21, 2025
8fa9df6
feat: add check for DISABLE_ZENITY=1 to skip interactive GUI dialogs
AlexSimao Oct 21, 2025
9760949
feat(easy-cli): support -D | --DEV_MODE flag to enable developer mode…
AlexSimao Oct 21, 2025
bf539cd
fix(easy-cli): prevent "list index out of range" when no subcommand i…
AlexSimao Oct 21, 2025
fe9c6d6
feat(easy-cli): now user can see the progress while script is running
AlexSimao Oct 21, 2025
faae07e
feat(easy-cli): prevent xdg-open commands from running during EASY CL…
AlexSimao Oct 21, 2025
0df14b1
refactor(easy-cli): convert all CLI output messages and code comments…
AlexSimao Oct 21, 2025
835ec22
Merge branch 'psygreg:master' into master
AlexSimao Oct 22, 2025
b700273
Merge branch 'psygreg:master' into master
AlexSimao Oct 23, 2025
2f1c6e9
fix(easy-cli): restore lost paths in built app by setting code source…
AlexSimao Oct 22, 2025
d972ad9
refactor(easy-cli): add 3-attempt limit for sudo authentication and d…
AlexSimao Oct 22, 2025
639760f
refactor(easy-cli): modularize long functions and add code comments
AlexSimao Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 49 additions & 20 deletions p3/app/cli_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def run_script(script_info):
In developer mode, performs dry-run validation instead of execution.
"""
# Check if we should dry-run instead of execute

try:
from .dev_mode import should_dry_run_scripts, dry_run_script
if should_dry_run_scripts():
Expand All @@ -301,11 +302,19 @@ def run_script(script_info):
print("-" * 50)

try:
# Execute the script with bash, similar to how the GUI does it
result = subprocess.run(['bash', script_info['path']],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True)
if os.environ.get("EASY_CLI") == "1":
result = subprocess.run(['bash', script_info['path']],
stdin=sys.stdin,
stdout=sys.stdout,
stderr=sys.stderr,
check=True)

else:
# Execute the script with bash, similar to how the GUI does it
result = subprocess.run(['bash', script_info['path']],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True)

# Print the output
if result.stdout:
Expand Down Expand Up @@ -404,6 +413,7 @@ def check_ostree_deployment_cli(translations=None):
return False



def print_cli_usage():
"""
Print usage information for CLI mode.
Expand Down Expand Up @@ -446,21 +456,40 @@ def run_manifest_mode(translations=None):
# Parse command-line arguments
manifest_path = 'manifest.txt' # Default manifest path

if len(sys.argv) > 1:
arg = sys.argv[1]

# Check for help request
if arg in ['--help', '-h', 'help']:
print_cli_usage()
return 0

# Check if user wants to run update check
elif arg in ['check-updates', 'update-check', '--check-updates']:
return 1 if run_update_check_cli(translations) else 0

# Otherwise, treat the argument as a manifest file path
else:
manifest_path = arg
# If LT_MANIFEST != "1", it means the script is running in EASY_CLI mode.
if os.environ.get("LT_MANIFEST") != "1":
if len(sys.argv) > 2:
arg = sys.argv[2]

# Check for help request
if arg in ['--help', '-h', 'help']:
print_cli_usage()
return 0

# Check if user wants to run update check
elif arg in ['check-updates', 'update-check', '--check-updates']:
return 1 if run_update_check_cli(translations) else 0

# Otherwise, treat the argument as a manifest file path
else:
manifest_path = arg

else:
if len(sys.argv) > 1:
arg = sys.argv[1]

# Check for help request
if arg in ['--help', '-h', 'help']:
print_cli_usage()
return 0

# Check if user wants to run update check
elif arg in ['check-updates', 'update-check', '--check-updates']:
return 1 if run_update_check_cli(translations) else 0

# Otherwise, treat the argument as a manifest file path
else:
manifest_path = arg

print("LinuxToys CLI Manifest Mode")
print("=" * 40)
Expand Down
Loading