Skip to content
publik.
Browse appsBrowsePricing
+Publish a repoPublish
Browse appsHow it worksPublish a repoGet helpPricingDevelopersGitHubPrivacy
© 2026 publik
All apps/Nut AI/Install/Mac + Android

How to install Nut AI on Android using a Mac

Nut AI does what Cal AI does, and Cal AI costs $9.99/mo. This guide gets you the free one.

What you end up with

Nut AI running on your Android. It is free, and it stays free. It opens with Sign in with publik; no trial, no subscription.

Time
About 45 minutes
Steps
22
Cost
Free

Read this first

Nut AI installs unsigned onto the reader's own phone, and photo scans run on publik API by default from a bounded key the phone mints (the reader's own key also works). The guide says both before the first command. Built Nut AI before? Rebuild it with this guide: older builds fail photo scans, and those scans can still be charged.

Before you start

These are one-time installs. If you have used Terminal before, you may have them already — the first step checks.

  1. 1

    Install Git

    Apple opens a small installer.

    Type this into Terminal, then press Return.

    xcode-select --install

    You know this worked when: Git responds with a version number

  2. 2

    Install Node LTS

    Choose the macOS Installer (.pkg).

    Open download ↗

    You know this worked when: Node responds with a version number

Install Nut AI

  1. 3

    Open Terminal

    Keep it open beside this page.

    You know this worked when: Terminal is open

  2. 4

    Check Git and Node

    Needs Git and Node 22.16+, not 23. Rebuild an old Nut AI: its photo scans fail but can be charged.

    Type this into Terminal, then press Return.

    git --version
    node --version

    You know this worked when: Git and Node respond with version numbers

  3. 5

    Copy Nut AI to this Mac

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~
    if [ ! -d nut-ai/.git ]; then
    git clone https://github.com/Blueturboguy07/nut-ai.git
    fi

    You know this worked when: A nut-ai folder appears

  4. 6

    Open the nut-ai folder

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~
    cd nut-ai

    You know this worked when: Your terminal prompt is inside the nut-ai folder

  5. 7

    Use the reviewed version

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai
    (
    if ! git config --get remote.origin.url 2>/dev/null | sed -E 's#^git@github\.com:#https://github.com/#; s#\.git$##' | grep -qxF "https://github.com/Blueturboguy07/nut-ai"; then
      echo "~/nut-ai already exists and is not a copy of this app's source. Move or rename that folder, then press Try again."
      exit 1
    fi
    if ! git cat-file -e 6a6b9e741e307f4176a7db7a778ddb2fb58c4114 2>/dev/null && ! git fetch --no-tags https://github.com/Blueturboguy07/nut-ai.git 6a6b9e741e307f4176a7db7a778ddb2fb58c4114; then
      echo "Could not download the reviewed version. Check your internet connection, then press Try again."
      exit 1
    fi
    if git status --porcelain 2>/dev/null | grep -q .; then
      git -c user.name=iris-guide -c user.email=iris-guide@localhost stash push --include-untracked -m "Saved by the install guide" || exit 1
      echo "Your changes in ~/nut-ai are saved with git stash. To see them: git stash list"
    fi
    git checkout 6a6b9e741e307f4176a7db7a778ddb2fb58c4114
    )

    You know this worked when: Git reports the reviewed commit

  6. 8

    Install dependencies

    Vulnerability warnings at the end are expected here — don't run npm audit fix.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai
    node scripts/check-node-version.cjs && npm install --no-save

    You know this worked when: The command finishes without an error

  7. 9

    Build the nutrition database

    It downloads the USDA tables itself first (about 10 MB). Re-running it is always safe.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai
    npm run data:build

    You know this worked when: It ends with 'Built …/nutrition.db' and foods: 7928

  8. 10

    Install Android Studio

    Accept the standard setup so it installs the SDK.

    Open download ↗

    You know this worked when: Android Studio opens to its welcome screen

  9. 11

    Install Java 17

    The Android build needs a JDK 17 to 21, not only a Java runtime. Installs Temurin 17 if none.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~
    rm -f ~/.nut-ai-java-home
    if [ -n "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/javac" ] && "$JAVA_HOME/bin/java" -version 2>&1 </dev/null | grep -Eq 'version "(1[7-9]|2[01])[."]'; then echo "$JAVA_HOME" > ~/.nut-ai-java-home; fi
    [ -s ~/.nut-ai-java-home ] || find -L /Library/Java/JavaVirtualMachines ~/Library/Java/JavaVirtualMachines ~/.nut-ai-jdk -maxdepth 5 -path '*/Contents/Home/bin/java' 2>/dev/null | while IFS= read -r j; do [ -x "${j%/java}/javac" ] && "$j" -version 2>&1 </dev/null | grep -Eq 'version "17[."]' && echo "${j%/bin/java}" > ~/.nut-ai-java-home && break; done
    [ -s ~/.nut-ai-java-home ] || find -L /Library/Java/JavaVirtualMachines ~/Library/Java/JavaVirtualMachines ~/.nut-ai-jdk -maxdepth 5 -path '*/Contents/Home/bin/java' 2>/dev/null | while IFS= read -r j; do [ -x "${j%/java}/javac" ] && "$j" -version 2>&1 </dev/null | grep -Eq 'version "(1[89]|2[01])[."]' && echo "${j%/bin/java}" > ~/.nut-ai-java-home && break; done
    if [ ! -s ~/.nut-ai-java-home ]; then
      uname -m | grep -q arm64 && NUT_AI_JDK_ARCH=aarch64 NUT_AI_JDK_SHA=78b08c7f5a0598242d5719c022e19479cb4a3aa45c37c19726a757a469ed1c15 || NUT_AI_JDK_ARCH=x64 NUT_AI_JDK_SHA=868f5c672b3389fdbe48e44f94ae170f01668b1401360944fc7159d7cc9772cc
      curl -fL --retry 3 -o ~/.nut-ai-jdk.tar.gz "https://api.adoptium.net/v3/binary/version/jdk-17.0.21%2B9/mac/$NUT_AI_JDK_ARCH/jdk/hotspot/normal/eclipse"
      echo "$NUT_AI_JDK_SHA  $HOME/.nut-ai-jdk.tar.gz" | shasum -a 256 -c - && mkdir -p ~/.nut-ai-jdk && tar -xzf ~/.nut-ai-jdk.tar.gz -C ~/.nut-ai-jdk && "$HOME/.nut-ai-jdk/jdk-17.0.21+9/Contents/Home/bin/java" -version 2>&1 </dev/null | grep -Eq 'version "17[."]' && echo "$HOME/.nut-ai-jdk/jdk-17.0.21+9/Contents/Home" > ~/.nut-ai-java-home
      rm -f ~/.nut-ai-jdk.tar.gz
    fi
    read -r JAVA_HOME < ~/.nut-ai-java-home && export JAVA_HOME
    "$JAVA_HOME/bin/java" -version
    [ -x "$JAVA_HOME/bin/javac" ] && "$JAVA_HOME/bin/java" -version 2>&1 | grep -Eq 'version "(1[7-9]|2[01])[."]' || { echo 'No JDK 17 to 21 is ready. Install the Temurin 17 JDK from adoptium.net, then run this step again.'; false; }

    You know this worked when: java -version prints a JDK version from 17 to 21

  10. 12

    Turn on USB debugging

    Settings → About phone → tap Build number 7×. Then Developer options → USB debugging.

    You know this worked when: Developer options shows USB debugging on

  11. 13

    Plug in your phone

    Tap Allow on the phone. If nothing appears, try another cable — that is the usual cause.

    You know this worked when: adb devices lists your phone

  12. 14

    Generate the Android project

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile
    npx expo prebuild --platform android

    You know this worked when: An android folder appears inside apps/mobile

  13. 15

    Download the Android build tools

    The first run downloads Gradle and the Android NDK. Later runs take about a minute.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile/android
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    ./gradlew help

    You know this worked when: Gradle prints BUILD SUCCESSFUL

  14. 16

    Build the C++ code, part 1 of 3

    Compiles C++ code for your phone's processor only. Keep the phone plugged in until the end.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile/android
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    ./gradlew :react-native-worklets:externalNativeBuildRelease :react-native-nitro-modules:externalNativeBuildRelease :react-native-screens:externalNativeBuildRelease :expo-modules-core:externalNativeBuildRelease

    You know this worked when: Gradle prints BUILD SUCCESSFUL

  15. 17

    Build the C++ code, part 2 of 3

    Compiles the C++ code of the animation libraries.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile/android
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    ./gradlew externalNativeBuildRelease -x :app:externalNativeBuildRelease

    You know this worked when: Gradle prints BUILD SUCCESSFUL

  16. 18

    Build the C++ code, part 3 of 3

    Compiles the app's own C++ code. This is the longest build step.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile/android
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    ./gradlew :app:externalNativeBuildRelease

    You know this worked when: Gradle prints BUILD SUCCESSFUL

  17. 19

    Build the Kotlin and Java code

    Compiles the libraries' Kotlin and Java code.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile/android
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    ./gradlew assembleRelease -x :app:assembleRelease

    You know this worked when: Gradle prints BUILD SUCCESSFUL

  18. 20

    Check and convert the libraries

    Checks the libraries for release errors and converts them to Android code.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile/android
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    ./gradlew lintVitalAnalyzeRelease :app:mergeExtDexRelease -x :app:lintVitalAnalyzeRelease

    You know this worked when: Gradle prints BUILD SUCCESSFUL

  19. 21

    Build and install

    Builds the app, installs it on your phone and opens it.

    Type this into Terminal, then press Return. The first line moves you into the folder this step runs in, so it works in a window you have just opened.

    cd ~/nut-ai/apps/mobile
    { read -r JAVA_HOME < ~/.nut-ai-java-home && [ -x "$JAVA_HOME/bin/javac" ]; } || { echo 'Run the Install Java 17 step first. It picks the Java this build needs.'; JAVA_HOME=/run-the-Install-Java-17-step-first; }
    export JAVA_HOME
    export GRADLE_OPTS="\"-Dorg.gradle.java.home=$JAVA_HOME\""
    [ -n "$ANDROID_HOME$ANDROID_SDK_ROOT" ] || [ ! -d "$HOME/Library/Android/sdk" ] || export ANDROID_HOME="$HOME/Library/Android/sdk"
    "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/platform-tools/adb" shell getprop ro.product.cpu.abilist 2>/dev/null | tr ', \r' '\n\n\n' | grep -m 1 -x -E 'armeabi-v7a|arm64-v8a|x86|x86_64' > ~/.nut-ai-abi
    read -r ORG_GRADLE_PROJECT_reactNativeArchitectures < ~/.nut-ai-abi || ORG_GRADLE_PROJECT_reactNativeArchitectures=arm64-v8a
    export ORG_GRADLE_PROJECT_reactNativeArchitectures
    npx expo run:android --variant release --no-bundler

    You know this worked when: The build ends with an install onto your phone

  20. 22

    Open Nut AI on your phone

    Scans run on publik API; link the phone when asked. Your own AI key also works (Profile).

    You know this worked when: Nut AI opens on your phone

If something goes wrong

Nothing here can damage your computer, and every step can be run again safely. If a command fails, the usual cause is the step before it not having finished.

Still stuck? Tell us what happened and we will fix the guide. Include the step number and we can usually reproduce it.

Have a different setup?

  • How to install Nut AI on iPhone using a Mac →
  • How to install Nut AI on Android using a Windows PC →
  • Can you install Nut AI on iPhone from a Windows PC? →

This guide follows Blueturboguy07/nut-ai at the reviewed version 6a6b9e7. Pinning the version is why the commands here keep working after the project changes.

Back to Nut AI →