Skip to content

Instantly share code, notes, and snippets.

@gabriel1l
Created April 3, 2026 16:49
Show Gist options
  • Select an option

  • Save gabriel1l/2e6ebe57e9a17983aa8596fd7c5bcdc7 to your computer and use it in GitHub Desktop.

Select an option

Save gabriel1l/2e6ebe57e9a17983aa8596fd7c5bcdc7 to your computer and use it in GitHub Desktop.
Step-by-step guide to setting up a 24/7 personal stock analysis assistant using OpenClaw, Alpha Vantage, and Telegram on a macOS VM (Lume) or Mac mini. Companion to the YouTube tutorial.

24/7 Personal Stock Analysis Assistant

Powered by OpenClaw x Alpha Vantage

macOS VM or Mac mini · Telegram · OpenAI

(your preference for messaging channel & LLM provider)


What You're Building

A personal AI agent running 24/7 on a Mac, accessible via Telegram, with stock analysis via Alpha Vantage.

This guide covers two hardware paths:

  • macOS VM (primary) — run OpenClaw inside a sandboxed Lume VM on your Mac
  • Mac mini (supplemental) — run OpenClaw directly on a dedicated Mac mini

The steps are the same from Part 4 onward. Mac mini users can skip Parts 1–3 entirely.

What You'll Need Before Starting

Required

VM path only

  • ~40 GB free disk space
  • ~30–45 minutes

Interchangeable (you need one from each category, but have options)

  • LLM provider — OpenAI, Claude, Gemini, etc. (comprehensive list in the install-daemon)
  • Messaging channel — Telegram, WhatsApp, Discord, Signal, etc. (comprehensive list in the install-daemon)

The TUI itself also works as a basic interface for testing and development, but a channel like Telegram is what lets you interact with your agent from your phone or anywhere — which is the whole point of running it 24/7.

  • Hardware — Apple Silicon is recommended. For always-on use, a dedicated Mac mini is ideal.
  • VM tool — This guide uses Lume, but UTM or hosted Mac providers (e.g. MacStadium) work too

Optional

  • Web API Key - Free Brave API Key at api.search.brave.com; enables web search capability for your agent. Other web providers supported as well. (comprehensive list in the install-daemon)

Why OpenAI? In February 2026, OpenAI acquired OpenClaw's creator Peter Steinberger in what is effectively an acqui-hire, and now sponsors the project's independent open-source foundation. OpenClaw works with any LLM provider, but OpenAI models are a natural fit given the relationship. If you use OpenAI, make sure you have billing set up. It is recommended to use the latest model for consistency (gpt-5.4 at the time of writing).


Part 1: Install Lume and Create the VM

Mac mini: Skip Parts 1–3. Open Terminal on your Mac mini and continue from Part 4.

Lume is a CLI tool that manages macOS VMs on Apple Silicon. All commands in this section run on your host Mac.

First, verify that your host machine is updated to the latest (System Settings → General → Software Update). The VM may fail to install if not.

1. Install Lume:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"

2. Add Lume to your PATH if needed:

echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc && source ~/.zshrc

3. Verify it installed:

lume --version

4. Create the VM (this downloads macOS — takes 10–20 minutes):

lume create openclaw --os macos --ipsw latest

5. Start the VM with a display:

lume run openclaw

A Screen Sharing window will open showing the VM.


Part 2: Set Up the VM

Mac mini: Skip this part.

In the Screen Sharing window, complete macOS Setup Assistant:

  • Select your language and region
  • Skip Apple ID (not needed)
  • Create a username and password — remember these
  • Skip all optional features

Once at the desktop, enable SSH:

System Settings → General → Sharing → Remote Login → toggle ON

You can close the Screen Sharing window now — you don't need it anymore.


Part 3: SSH Into the VM

Mac mini: Skip this part. You're already on the machine — just use Terminal directly.

Back in your host Mac terminal:

Tip: Open a second terminal tab and SSH in again whenever you need to run commands while something else is running in the first session.

1. Get the VM's IP address:

lume get openclaw

Look for the IP in the ip column (e.g. 192.168.64.6).

2. SSH in (replace yourusername and IP with your values):

ssh yourusername@192.168.64.6

Answer 'yes' to the authenticity question. Enter the password you set up.


Part 4: Install Homebrew and Node.js

VM users: All remaining commands run inside the VM via SSH.

Mac mini users: Run these commands directly in Terminal on your Mac mini.

1. Install Homebrew:

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

Install the Xcode Command Line Tools when prompted. It will take a few minutes.

2. Add Homebrew to your PATH:

echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

3. Install Node.js:

brew install node

Part 5: Install OpenClaw

1. Install OpenClaw globally:

npm install -g openclaw@latest

2. Run the onboarding wizard:

openclaw onboard --install-daemon

Follow the prompts:

Prompt What to choose
Personal-by-default acknowledgement Yes
Onboarding mode Quickstart
Model/auth provider OpenAI
OpenAI auth method OpenAI API Key
Default model openai/gpt-5.4 (should be the default model)
Channel Telegram
Telegram bot token See Part 7 below
Web search provider Brave Search (or skip — it's optional)
Brave API key From api.search.brave.com (skip if you don't have one)
Configure skills now? Yes
Install missing skill dependencies clawhub (press 'Space' to select, then 'Enter')
Preferred node manager npm
Various Set ... API_KEY ...? prompts No to all
Hooks Install all, doesn't hurt (press 'Space' to select each one, then 'Enter')
How to hatch your bot Skip if you plan to set up with telegram; otherwise, Hatch in TUI

If you do not see the "How to hatch your bot" prompt, see next section (Post Onboarding "Hiccups").

Post Onboarding "Hiccups"

After you submit your setup parameters, OpenClaw will begin installation. If you do not see the "How to hatch your bot" prompt, it's because installation experienced some hiccups, but it still installed successfully. You'll likely see two warnings — both are harmless:

  1. Gateway service install failed — OpenClaw tries to install a LaunchAgent for auto-startup, but this requires a logged-in GUI session and will always fail over SSH. You'll need to start the gateway manually each time.
  2. Health check failed — the gateway isn't running yet, so this is expected.

Hatch in TUI (Optional)

If the TUI didn't launch automatically (or you weren't prompted to hatch your bot), you can start it manually. The TUI lets you interact with the agent directly in the terminal — useful for testing without your messaging channel set up. Once Telegram (or your chosen channel) is configured, you'll use that instead.

openclaw tui

Part 6: Install the Global Stock Analysis Skill and its prerequisites

If the TUI is running in your current Terminal: Open a new Terminal for the commands below. Otherwise, use your current Terminal.

  • VM users: SSH into your VM.
  • Mac mini users: Open a new Terminal window or tab.

1. Install uv (Python package manager) and add to PATH:

curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env

2. Install marketdata-cli (the CLI the skill uses):

uv tool install marketdata-cli --force

3. Set your Alpha Vantage API key (persists across sessions):

export ALPHAVANTAGE_API_KEY=your_key_here
source ~/.zshrc
echo $ALPHAVANTAGE_API_KEY

You may safely ignore the compdef error that comes up. Confirm that your API Key displays in the terminal results for the echo command.

4. If you forgot to install clawhub (the skill package manager) during setup, install it:

npm install -g clawhub

5. Install the skill:

clawhub install global-stock-analysis

6. Start up OpenClaw:

openclaw gateway --force

Part 7: Create Your Telegram Bot

Do this while the onboarding wizard is waiting for your bot token.

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Follow the prompts to name your bot
  4. BotFather will give you a token that looks like 123456789:ABCdef...
  5. Paste that token into the OpenClaw onboarding prompt

Part 8: Pair Telegram With Your Agent

  1. Open Telegram and find your bot
  2. Send /start.
  3. The bot will reply with a pairing code and instructions.
  4. On your machine where OpenClaw is running, open an additional terminal session:
    • VM users: SSH in again from your host Mac:
      ssh yourusername@192.168.64.6
      Replace yourusername and the IP address with yours.
    • Mac mini users: Open a new Terminal window or tab.
  5. Run the approval command (replace XXXXXXXX with your actual code):
    openclaw pairing approve telegram XXXXXXXX

Your terminal should display Approved telegram sender ##########. Your bot should now respond in Telegram. Send /new to start a new session.


Part 9: Test It

In Telegram, if you didn't come from Part 8, start a new session with your bot:

/new

Ask it:

"List your skills."

You should see the global-stock-analysis skill listed.

Ask it:

"Use the global-stock-analysis skill you listed to give a detailed report on AAPL. Confirm that you are using my personal Alpha Vantage API Key and not the demo API Key."


Part 10: Always-On Setup

VM path

To keep the VM running in the background without a display:

# On your host Mac (not in SSH):
lume stop openclaw
lume run openclaw --no-display

To keep it running 24/7, make sure your Mac is plugged in and go to System Settings → Energy → Prevent automatic sleeping.

Mac mini path

OpenClaw runs directly on the machine. Just ensure it stays awake and recovers from power failures:

System Settings → Energy → Prevent automatic sleeping when the display is off → toggle ON

System Settings → Energy → Start up automatically after a power failure → toggle ON


Troubleshooting

Problem Fix
Can't SSH into VM Check Remote Login is enabled in VM's System Settings → General → Sharing
lume command not found Add ~/.local/bin to your PATH
Bot doesn't respond Run openclaw gateway --force in a terminal, then try /new in Telegram
Skill not found after install Restart gateway with openclaw gateway --force and start a new session with /new
TUI doesn't launch after onboarding Run openclaw tui in one terminal and openclaw gateway --force in a second terminal
@gabriel1l
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment