Documentation.

Everything you need to get Max running, configured, and doing useful things.

Installation.

Prerequisites

One-line install

terminal
$ curl -fsSL https://raw.githubusercontent.com/burkeholland/max/main/install.sh | bash

Or install with npm

terminal
$ npm install -g heymax

Setup.

After installing, run the interactive setup wizard:

terminal
$ max setup

The wizard walks you through:

  1. Model selection — pick your default Copilot model (you can switch anytime later)
  2. Telegram setup (optional) — create a bot via @BotFather, lock it down to your user ID, and configure it

Telegram lockdown is required. If you choose to set up Telegram, Max will not proceed until you provide your user ID. This prevents unauthorized access to your machine through the bot.

Configuration is saved to ~/.max/.env. You can re-run max setup anytime to reconfigure.

Running Max.

CommandDescription
max startStart the Max daemon. Launches the orchestrator, HTTP API (port 7777), and Telegram bot (if configured).
max tuiOpen the terminal UI. Connects to the running daemon via SSE for real-time streaming.
max setupRun the interactive setup wizard.
max helpShow available commands.
max --versionPrint the version number.

Typical workflow: Start the daemon in one terminal with max start, then open a second terminal and run max tui to chat. Or just message Max on Telegram from your phone.

Commands.

Slash commands work in both the TUI and Telegram. They're instant — they don't go through the AI, so they're great for quick actions.

CommandDescriptionWhere
/cancelCancel the in-flight messageTUI TG
/modelShow the current modelTUI TG
/model <name>Switch to a different modelTUI TG
/memoryShow all stored memoriesTUI TG
/skillsList installed skillsTUI TG
/workersList active worker sessionsTUI TG
/restartRestart the Max daemonTUI TG
/statusDaemon health checkTUI
/clearClear the terminal screenTUI
/quitExit the TUITUI
/helpShow command helpTUI TG

Tip: In the TUI, press Escape to cancel a running message — no need to type /cancel.

Talking to Max.

Anything that isn't a slash command gets sent to Max as a natural language message. Max decides how to handle it:

Messages are tagged with their source channel — [via telegram] or [via tui] — so Max can adapt his response style. Telegram gets shorter responses; TUI gets more detail.

Worker Sessions.

Workers are the backbone of Max's coding ability. Each worker is a full Copilot CLI session running in a specific directory with full access to files, terminal, git, and tools.

You don't need to manage workers directly — just tell Max what you need done and where, and he handles the rest.

conversation
You: Fix the auth bug in ~/dev/myapp Max: On it — I'll spin up a worker and let you know. ...a few minutes later... Max: Auth bug is fixed. The token refresh wasn't catching expired JWTs. Want me to push a PR?

Skills.

Skills are markdown instruction files (SKILL.md) that teach Max how to use external tools. They're stored in ~/.max/skills/.

Using skills

Just ask Max to do something. If he has a skill for it, he'll use it automatically. Ask "what skills do you have?" or use /skills to see what's available.

Learning new skills

When you ask Max to do something he doesn't know how to do, he'll:

  1. Spin up a worker to research what CLI tools are available on your machine
  2. Figure out how to accomplish the task
  3. Save the instructions as a SKILL.md so he remembers for next time
  4. Do the task

You can also explicitly teach Max: "Learn how to use kubectl" and he'll research it and create a skill.

Community skills

Max can discover and install skills from the open source community skill library. Just say "find me a skill for X".

Bundled skills

Max ships with the gogcli skill for Google services (Gmail, Calendar, Drive, Contacts, Tasks, Sheets) — requires gogcli to be installed.

Memory.

Max has a three-layer memory system:

Layer 1: Persistent session

Max maintains a single long-running orchestrator session using the Copilot SDK's infinite sessions. The SDK automatically compacts context in the background when it fills up, preserving important information. This means Max naturally remembers your conversation across messages — no manual history injection needed.

Layer 2: Long-term memory (SQLite)

For facts that should survive even a full session reset, Max has a memories table in SQLite. Things like your preferences, project context, people you work with, and routines. These are injected into Max's system prompt so he always has access.

Max saves memories two ways:

Memory categories: preference, fact, project, person, routine

Use /memory to see everything Max has remembered. Ask Max to "forget #42" to remove a specific memory.

Layer 3: Conversation log

All messages are logged to SQLite with their source channel (Telegram, TUI, background). This provides cross-channel awareness — if you tell Max something on Telegram, the TUI session knows about it too.

Models.

Max can use any model available through your Copilot subscription. Switch models in two ways:

Ask Max "what models are available?" to see the full list with billing multipliers. The model choice persists across restarts.

Default model: claude-sonnet-4.5

Environment Variables.

Configuration lives in ~/.max/.env. You can edit it directly or use max setup.

VariableDefaultDescription
COPILOT_MODELclaude-sonnet-4.5Default LLM model for the orchestrator
API_PORT7777HTTP API port (1–65535)
TELEGRAM_BOT_TOKENBot token from @BotFather (optional)
AUTHORIZED_USER_IDYour Telegram numeric user ID (required if using Telegram)

Telegram Setup.

Telegram is optional but lets you talk to Max from your phone anywhere.

  1. Open @BotFather on Telegram and send /newbot
  2. Choose a name and username for your bot
  3. Copy the bot token
  4. Get your user ID from @userinfobot — send it any message and it replies with your ID
  5. Run max setup and enter both values when prompted

Security: The AUTHORIZED_USER_ID is mandatory. Without it, anyone who finds your bot could control your machine. Max silently ignores messages from unauthorized users.

We also recommend disabling group joins: in @BotFather, go to /mybots → your bot → Bot Settings → Allow Groups → disable.

How It Works.

Max is a Node.js daemon process built on the GitHub Copilot SDK. Here's the architecture:

All data lives in ~/.max/:

~/.max/
.env # configuration max.db # SQLite database sessions/ # Copilot SDK session state skills/ # learned skills (SKILL.md files)

Copilot SDK.

Max is built on the GitHub Copilot SDK (@github/copilot-sdk). Key SDK features Max uses:

For more on the SDK: Getting Started · GitHub Repository

For more on Copilot CLI: Documentation · Features