How do I create an app in automator for running terminal commands?

I want an automator app that will run two terminal commands to configure and start my web app. I have not seen a simple explanation for doing what seems a simple thing. Open terminal, enter commands, web app starts. That is all I want to do. In a little startup app I can click on my desktop.


These are the terminal commands:


cd stable-diffusion-webui


./webui.sh --no-half


Thanks for any solution, or directions to where this is concisely explained.

Posted on Mar 8, 2024 12:28 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 8, 2024 12:51 PM

  1. Launch Automator
    1. New Document
    2. Application
    3. Choose
  2. Library > Utilities
    1. Run Shell Script
    2. Drag/Drop to the right onto the large workflow window
      1. Remove any default content in the Run Shell Script action
      2. Pass Input: (since no input is being passed, ignore this
      3. Shell: if your Terminal shell is configured for Zsh, this will default to Zsh, or you can set it to /bin/zsh.
      4. Enter the following code in the action:


# get your PATH statement here as Automator doesn't know what it is beforehand.

source ~/.zshrc

cd full/path/to/stable-diffusion-webui
./webui.sh --no-half &
exit 0


Save the Automator application to your Desktop, and then double-click to run.

1 reply
Question marked as Top-ranking reply

Mar 8, 2024 12:51 PM in response to gambitine9

  1. Launch Automator
    1. New Document
    2. Application
    3. Choose
  2. Library > Utilities
    1. Run Shell Script
    2. Drag/Drop to the right onto the large workflow window
      1. Remove any default content in the Run Shell Script action
      2. Pass Input: (since no input is being passed, ignore this
      3. Shell: if your Terminal shell is configured for Zsh, this will default to Zsh, or you can set it to /bin/zsh.
      4. Enter the following code in the action:


# get your PATH statement here as Automator doesn't know what it is beforehand.

source ~/.zshrc

cd full/path/to/stable-diffusion-webui
./webui.sh --no-half &
exit 0


Save the Automator application to your Desktop, and then double-click to run.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I create an app in automator for running terminal commands?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.