Getting started
This guide takes a fresh Mac to a first conversation with your Telegram bot. One Mac can host Luna for several trusted users. Akno adds a shared knowledge base; email and Apple services can be added afterward. You can also start with terminal chat alone.
- An Apple silicon Mac running macOS 26 or newer. Luna’s host is macOS-only.
- Node 22.22 or newer and pnpm 10.33.0. The repository’s
packageManagerpins pnpm. - Apple Container, installed through its signed installer.
- An OpenAI API key with access to
gpt-6-luna, or another OpenAI-compatible endpoint.
Source installations also need Bun 1.3.12 or newer to install the agent-runner dependencies. The npm installation uses Bun inside its container image.
Start the container service:
container system startThe first agent image build downloads its tools and can take several minutes. Leave the setup terminal open. If npm needs to compile SQLite and reports a missing compiler, install the Xcode command line tools with xcode-select --install, then retry.
npm install -g @tenphi/luna
luna setupThe package creates a private install directory at ~/.luna. Configuration, credentials, logs, and conversations are kept there, separately from the npm package. To choose a different location, set LUNA_HOME consistently for every invocation.
The standard wizard guides you through:
- Checking the Mac and building the agent sandbox.
- Connecting or installing the OneCLI credential gateway.
- Entering an OpenAI key. The endpoint defaults to
https://api.openai.com/v1, the model togpt-6-luna. - Connecting an existing Akno service, or continuing without memory.
- Installing the Luna background service and terminal agent.
- Creating or connecting your Telegram bot, pairing the owner, and adding other people to the roster. Telegram is recommended; you can skip it for a terminal-only start.
Use Advanced to choose a different endpoint or model. A local endpoint may be keyless. Credentials go into the private .env, while settings go into config/local.jsonc. Setup diagnostics stay on your Mac.
Install Akno independently:
npm install -g @tenphi/akno
akno initFollow Akno’s getting-started guide. Choose its OpenAI minimum preset for gpt-6-luna and text-embedding-3-small, and configure the Markdown folder and write boundaries there. Finish its service setup; akno doctor should report a usable service.
Then connect from Luna setup, or later:
luna config memory set --enabled true
luna redeploy --no-build
luna healthLuna uses Akno’s default socket at ~/.akno/akno.sock. A custom path can be set with luna config memory set --socket /path/to/akno.sock. See Akno integration.
Message your bot in Telegram. Setup sends a welcome message after pairing; the other people in your roster can message the same bot. See Telegram and shared use for groups and adding people later.
For a terminal conversation:
lunaOr send a single prompt:
luna ask "Introduce yourself and explain which tools are available."A one-shot request uses an ephemeral session. The interactive chat keeps conversation history. Run luna health to inspect the model, sandbox, memory, and enabled services.
luna setup step apple
luna setup step emailFollow the guides for Apple services and email. Telegram is offered by the wizard; only the people in your configured roster are admitted.
Before the first npm release, or for development:
git clone https://github.com/tenphi/luna.git
cd luna
pnpm install --frozen-lockfile
(cd container/agent-runner && bun install --frozen-lockfile)
./bin/luna setupSource installs keep state in the checkout. Do not copy it into another repository or add its private folders to Git. See operations if setup stops partway through.
