# macOS Setup Guide (Primary)

This project is optimized for macOS and zsh.

## 1) Prerequisites

Install Homebrew if needed:
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install core dependencies:
- brew install python git jq curl wget
- brew install --cask iterm2

Optional tools used by some JARVIS features:
- brew install imagesnap
- brew install gitleaks
- brew install ollama
- brew install --cask android-platform-tools

## 2) Python Environment

From repository root:
- python3 -m venv .venv
- source .venv/bin/activate
- python3 -m pip install --upgrade pip

If your local setup uses optional modules (voice features), install as needed:
- pip install SpeechRecognition pyaudio

## 3) Zsh Configuration

Use your own ~/.zshrc, or selectively copy sections from config/zshrc.template.

Create secrets file:
- cp config/zshrc.secrets.example ~/.zshrc.secrets

Edit values:
- TELEGRAM_BOT_TOKEN
- TELEGRAM_CHAT_ID
- OLLAMA_API_KEY (if cloud)
- NVIDIA_* keys (if NVIDIA APIs used)

Reload:
- source ~/.zshrc

## 4) Verify Setup

- python3 jarvis_ai.py --status
- python3 jarvis_ai.py --text

If status reports missing optional keys, only the related provider features are disabled.

## 5) Run Telegram Daemon

- python3 telegram_bot.py

or

- python3 jarvis_ai.py --telegram-bot

## 6) Background Run (Optional)

Using nohup:
- nohup python3 telegram_bot.py > ~/jarvis_telegram.log 2>&1 &

Stop process:
- pkill -f telegram_bot.py

## 7) Security Checklist

- Keep ~/.zshrc.secrets out of git.
- Rotate exposed keys immediately.
- Run secret scan before push.
- Use least-privilege API keys where possible.
