Last Light
Self-host your own software factory
lastlight.dev · Roadmap
An AI agent that maintains GitHub repositories: triaging issues, reviewing PRs, monitoring repo health, and building features through an Architect → Executor → Reviewer development cycle.
Built on agentic-pi (workflow phases) and @earendil-works/pi-ai (in-process chat) with a lightweight TypeScript harness for webhook ingestion, cron scheduling, and process management. Provider-agnostic — point LASTLIGHT_MODEL at any provider/model pi-ai supports (defaults to anthropic/claude-sonnet-5-5).
Monorepo layout
This repository is a pnpm + Turborepo workspace. The harness/server internals
now live under apps/server/ (formerly the repo root). At a glance:
apps/
server/ lastlight-core — the harness + server (src, config, workflows,
skills, agent-context, deploy, dashboard, spec, …)
www/ lastlight-www — the Astro marketing/docs site → lastlight.dev
evals/ lastlight-evals — the eval harness → evals.lastlight.dev
packages/
cli/ lastlight — the lean, published global CLI (+ the Claude Code plugin)
shared/ lastlight-shared — shared utilities (e.g. the provider registry)
workflow-engine/ lastlight-workflow-engine — the reusable workflow runner
code-facts/ lastlight-code-facts — deterministic PR analysis (`lastlight facts`)
agentic-pi/ agentic-pi — the coding-agent harness core runs in the sandbox
Seven packages publish to npm: lastlight, lastlight-core,
lastlight-workflow-engine, lastlight-shared, lastlight-code-facts,
lastlight-evals, and agentic-pi. The root package (lastlight-monorepo) is
private (as are lastlight-www and both dashboards). Common scripts run from the root
via Turborepo: pnpm build / pnpm test / pnpm typecheck (each turbo run …),
and pnpm dev (= pnpm --filter lastlight-core dev). See the root CLAUDE.md
for the canonical workspace map and orientation.
Production Setup (Clean Server)
The fastest way to go from a bare server to a running Last Light instance:
npx lastlight setup
The setup wizard walks you through:
- GitHub App — enter your App ID, Installation ID, and PEM key path
- Domain & TLS — optional Caddy config for automatic HTTPS
- Managed repositories — the
owner/repo list the bot operates on
- Model provider + API key — pick from any of pi-ai's 15+ supported
providers (Anthropic, OpenAI, Google Gemini, Mistral, Groq, Cerebras, xAI,
Hugging Face, Moonshot, NVIDIA, Fireworks, Together, DeepSeek, Z.AI,
Kimi for Coding, MiniMax, OpenCode Zen, OpenRouter), then enter the model id and the
matching API key. See
packages/shared/src/providers.ts for the full registry.
- Webhook secret — auto-generated if you don't have one
- Slack — optional bot token and app token for Slack integration
- Admin dashboard — optional password protection
It scaffolds your private deployment overlay at instance/ — writing
instance/config.yaml (your managed repos), instance/secrets/.env, and copying
your PEM to instance/secrets/app.pem (mode 600) — then offers to build and start
the Docker stack. When it's done you have a running instance ready to receive
webhooks. Everything deployment-specific lives in instance/, which is mounted
read-only and never baked into the image; edit it and docker compose restart agent
to apply (no rebuild). See Deployment overlay for the model.
Requires: Node.js 22.12+ (the repo pins 22 in .nvmrc), Docker, and a
GitHub App already created
(see Create a GitHub App below).
For a Docker-free production install (systemd unit, gondolin sandbox), see Native deploy below.
Quick Start (Local Dev)
Prerequisites
- Node.js 22.12+ (
engines.node; the repo pins 22 in .nvmrc)
- Docker Desktop (or compatible) — only needed for
LASTLIGHT_SANDBOX=docker; gondolin runs without it on macOS/Linux
- A GitHub App (see Create a GitHub App below)
- An API key for whichever provider your chosen
LASTLIGHT_MODEL uses.
The wizard surfaces pi-ai's 15+ providers — see packages/shared/src/providers.ts for the
full registry (e.g. ANTHROPIC_API_KEY for anthropic/…, OPENAI_API_KEY
for openai/…, GROQ_API_KEY for groq/…, GEMINI_API_KEY for google/…,
OPENROUTER_API_KEY for the openrouter/… aggregator).
Setup