[GH-ISSUE #3187] How do you install the ollama gui and terminal executable from command line without manually installing it? #27724

Open
opened 2026-04-22 05:16:24 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @shyamalschandra on GitHub (Mar 16, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3187

What are you trying to do?

Automating the process of using the ollama package without going through the manual processing of installing it every time.

How should we solve this?

Make a brew that handles this -- brew install ollama -- is not enough.

What is the impact of not solving this?

It is going to cripple your users.

Anything else?

Please add more tuning parameters and hooks for developers from CLI and other languages like Swift and Python.

Originally created by @shyamalschandra on GitHub (Mar 16, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3187 ### What are you trying to do? Automating the process of using the ollama package without going through the manual processing of installing it every time. ### How should we solve this? Make a brew that handles this -- brew install ollama -- is not enough. ### What is the impact of not solving this? It is going to cripple your users. ### Anything else? Please add more tuning parameters and hooks for developers from CLI and other languages like Swift and Python.
GiteaMirror added the feature request label 2026-04-22 05:16:24 -05:00
Author
Owner

@BruceMacD commented on GitHub (Mar 21, 2024):

Hi @shyamalschandra, as a workaround this is possible with some bash scripting, here is an example (that might need a bit of tweaking, but generally these are the steps):

#!/bin/bash

# Define GitHub API URL for Ollama releases
GITHUB_API_URL="https://api.github.com/repos/ollama/ollama/releases/latest"

# Use curl and jq to parse the JSON returned by GitHub API to find the download URL for Ollama-darwin.zip and ollama-darwin
OLLAMA_DARWIN_ZIP_URL=$(curl -s $GITHUB_API_URL | jq -r '.assets[] | select(.name | test("Ollama-darwin\\.zip$")) | .browser_download_url')
OLLAMA_DARWIN_BIN_URL=$(curl -s $GITHUB_API_URL | jq -r '.assets[] | select(.name | test("ollama-darwin$")) | .browser_download_url')

# Ensure the URLs were found
if [[ -z "$OLLAMA_DARWIN_ZIP_URL" || -z "$OLLAMA_DARWIN_BIN_URL" ]]; then
    echo "Failed to find the download URLs. Exiting..."
    exit 1
fi

# Download Ollama-darwin.zip
echo "Downloading Ollama-darwin.zip..."
curl -L $OLLAMA_DARWIN_ZIP_URL -o Ollama-darwin.zip

# Unzip Ollama-darwin.zip
echo "Unpacking Ollama-darwin.zip..."
unzip Ollama-darwin.zip

# Move the Ollama application to the user's Applications directory
echo "Moving Ollama application to the Applications directory..."
mv Ollama.app /Applications/

# Clean up the zip file
rm Ollama-darwin.zip

# Download ollama-darwin binary
echo "Downloading ollama-darwin binary..."
curl -L $OLLAMA_DARWIN_BIN_URL -o ollama-darwin

# Make the binary executable
chmod +x ollama-darwin

# Move the binary to /usr/local/bin/ollama
echo "Moving ollama-darwin to /usr/local/bin/ollama..."
sudo mv ollama-darwin /usr/local/bin/ollama

echo "Ollama installation complete."

Once #3240 goes in this should work pretty well.

<!-- gh-comment-id:2011804553 --> @BruceMacD commented on GitHub (Mar 21, 2024): Hi @shyamalschandra, as a workaround this is possible with some bash scripting, here is an example (that might need a bit of tweaking, but generally these are the steps): ```bash #!/bin/bash # Define GitHub API URL for Ollama releases GITHUB_API_URL="https://api.github.com/repos/ollama/ollama/releases/latest" # Use curl and jq to parse the JSON returned by GitHub API to find the download URL for Ollama-darwin.zip and ollama-darwin OLLAMA_DARWIN_ZIP_URL=$(curl -s $GITHUB_API_URL | jq -r '.assets[] | select(.name | test("Ollama-darwin\\.zip$")) | .browser_download_url') OLLAMA_DARWIN_BIN_URL=$(curl -s $GITHUB_API_URL | jq -r '.assets[] | select(.name | test("ollama-darwin$")) | .browser_download_url') # Ensure the URLs were found if [[ -z "$OLLAMA_DARWIN_ZIP_URL" || -z "$OLLAMA_DARWIN_BIN_URL" ]]; then echo "Failed to find the download URLs. Exiting..." exit 1 fi # Download Ollama-darwin.zip echo "Downloading Ollama-darwin.zip..." curl -L $OLLAMA_DARWIN_ZIP_URL -o Ollama-darwin.zip # Unzip Ollama-darwin.zip echo "Unpacking Ollama-darwin.zip..." unzip Ollama-darwin.zip # Move the Ollama application to the user's Applications directory echo "Moving Ollama application to the Applications directory..." mv Ollama.app /Applications/ # Clean up the zip file rm Ollama-darwin.zip # Download ollama-darwin binary echo "Downloading ollama-darwin binary..." curl -L $OLLAMA_DARWIN_BIN_URL -o ollama-darwin # Make the binary executable chmod +x ollama-darwin # Move the binary to /usr/local/bin/ollama echo "Moving ollama-darwin to /usr/local/bin/ollama..." sudo mv ollama-darwin /usr/local/bin/ollama echo "Ollama installation complete." ``` Once #3240 goes in this should work pretty well.
Author
Owner

@shyamalschandra commented on GitHub (Mar 22, 2024):

@BruceMacD: I will check if this works with zsh too. Zsh comes out of the box with MacOS and bash is secondary. I will try it.

<!-- gh-comment-id:2014172975 --> @shyamalschandra commented on GitHub (Mar 22, 2024): @BruceMacD: I will check if this works with zsh too. Zsh comes out of the box with MacOS and bash is secondary. I will try it.
Author
Owner

@shyamalschandra commented on GitHub (Mar 26, 2024):

hi @BruceMacD: I just tried it and it gave some Javascript errors when it automatically ran the executable for ollama. I will investigate some more.

<!-- gh-comment-id:2021537613 --> @shyamalschandra commented on GitHub (Mar 26, 2024): hi @BruceMacD: I just tried it and it gave some Javascript errors when it automatically ran the executable for ollama. I will investigate some more.
Author
Owner

@shyamalschandra commented on GitHub (Mar 30, 2024):

Hi @BruceMacD, it like I will need more time to investigate. I will let you know as soon as I get time.

<!-- gh-comment-id:2028436147 --> @shyamalschandra commented on GitHub (Mar 30, 2024): Hi @BruceMacD, it like I will need more time to investigate. I will let you know as soon as I get time.
Author
Owner

@shyamalschandra commented on GitHub (Apr 15, 2024):

hi @BruceMacD, it works perfectly now. Would you like to include it as a part of the ollama offering as a script when trying to install ollama from brew on mac intel?

<!-- gh-comment-id:2054313492 --> @shyamalschandra commented on GitHub (Apr 15, 2024): hi @BruceMacD, it works perfectly now. Would you like to include it as a part of the ollama offering as a script when trying to install ollama from brew on mac intel?
Author
Owner

@quertc commented on GitHub (Apr 15, 2024):

brew install --cask ollama seems to work, no?

<!-- gh-comment-id:2057711794 --> @quertc commented on GitHub (Apr 15, 2024): `brew install --cask ollama` seems to work, no?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27724