Your always-on AI assistant, living in Telegram — running entirely on your Mac mini.
Grab the zip, then follow the steps below. Bookmark this page — it's your whole setup guide.
Gobot is a personal AI agent you talk to through Telegram. You text it like a person; it thinks using Claude and remembers everything in two local databases on your own machine. Nothing about your conversations leaves your Mac.
Every conversation, the facts & goals it learns about you, activity logs, and background tasks.
Semantic search, a knowledge base, and any documents you feed it — so it can recall things by meaning, not just keywords.
Everything else (Bun, Claude Code CLI) we install in Step 2.
You need two things from Telegram: a bot token and your user ID.
/newbot and follow the prompts (give it a name and a username ending in bot).123456789:ABCdefGhIjKlMnOpQrStUvWxYz. Copy it — that's your TELEGRAM_BOT_TOKEN.987654321).TELEGRAM_USER_ID — it locks the bot to only you.Open the Terminal app (⌘-Space, type "Terminal", Enter) and paste these one at a time.
curl -fsSL https://bun.sh/install | bashAfter it finishes, quit and reopen Terminal so Bun is on your PATH. Verify with bun --version.
A fresh Mac has no npm. If npm -v says "command not found", install it via Homebrew — paste these one at a time:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Homebrew may ask for your Mac password and prompt to install Xcode Command Line Tools — that's normal, click through it.
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile && eval "$(/opt/homebrew/bin/brew shellenv)"That line puts brew on your PATH (needed on Apple Silicon).
brew install nodeVerify both print a version number: node -v && npm -v
.pkg, click Continue through it, then reopen Terminal.npm install -g @anthropic-ai/claude-codeNow that npm works, this installs the CLI that lets the bot think.
claudeRun claude once, pick "Log in with your subscription", and finish the browser sign-in.
This is what lets the bot think for free. Confirm with claude --version. Type /exit to leave.
gobot folder.gobot folder somewhere permanent, e.g. your home folder.cd ~/gobot
bun installbun install downloads the bot's dependencies. It takes a minute or two the first time.
.env file)The bot reads its settings from a file called .env. Create it from the template:
cp .env.example .env
open -e .envThat opens the file in TextEdit. Fill in just these three lines, then save (⌘-S) and close:
TELEGRAM_BOT_TOKEN=paste_your_botfather_token_here
TELEGRAM_USER_ID=paste_your_numeric_id_here
USER_NAME=Your First Name.env private. It holds your bot token. Don't share it or post it anywhere.Start the bot:
bun run startYou should see "Bot online as @YourBotName". The two databases get created automatically at this moment. Now open your bot in Telegram and send it a message like "hey, are you working?" — it should reply within a few seconds.
Leave it running to keep chatting. Press Ctrl+C in Terminal to stop it. Next step makes it run forever on its own.
So the bot runs 24/7 without a Terminal window open, install it as a background service:
bun run setup:launchd -- --service telegram-relaymacOS may show a popup that "software from 'Jared Sumner' can run in the background" — that's just the Bun runtime. Click Allow.
Now the bot starts automatically when the Mac boots and restarts itself if it ever crashes. Your Mac mini can be left running headless and the bot just stays online.
--service all instead. Optional — skip it for now if you just want the chat bot.Brain 2 works out of the box with text search. If you want it to recall things by meaning (semantic search), install Ollama — free and local:
# Download the app from https://ollama.com then run:
ollama pull nomic-embed-textThe bot auto-detects Ollama on startup and switches memory to semantic mode. Nothing to configure — if it's running, it just works. Totally optional.
Tell the bot about you so it tailors its answers. Create a profile from the template:
cp config/profile.example.md config/profile.md
open -e config/profile.mdFill in your name, business, timezone, and how you like it to communicate. Save, then restart the bot (or the launchd service) to pick it up.
| What | Command |
|---|---|
| Start the bot manually | bun run start |
| Health check everything | bun run setup:verify |
| Test Telegram connection | bun run test:telegram |
| Stop the always-on service | launchctl unload ~/Library/LaunchAgents/com.go.telegram-relay.plist |
| Start the always-on service | launchctl load ~/Library/LaunchAgents/com.go.telegram-relay.plist |
| See live logs | tail -50 logs/telegram-relay.log |
.env have no extra spaces.bun run test:telegram to confirm the connection.claude --version.brew install node).echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.zshrc then reopen.claude once and sign in.logs/telegram-relay.log for the real error.README.md,
CLAUDE.md, and docs/troubleshooting.md.