/lastlight:lastlight-serverfrom Last Light
Installs and configures a Last Light server with its docker-compose stack on a host. Gathers GitHub App credentials, domain, managed repos, and model provider API key, then writes config and launches the agent.
Ships in Last Light. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A Last Light server runs the agent and a docker-compose stack on a host. It
needs: Docker, a GitHub App (so it can act on repos), a model provider API key,
and a list of repos it's allowed to manage. Configuration lives in a private
overlay at instance/ (a config.yaml plus secrets/.env + secrets/app.pem).
Your job: gather the inputs, get the working directory in place, write the config, then build and launch. Prefer the deterministic file-writing path below (fully automatable) over the interactive wizard.
Run these and report anything missing before continuing:
docker info >/dev/null 2>&1 && echo "docker: ok" || echo "docker: NOT running"
git --version; node --version
command -v lastlight >/dev/null && lastlight --help >/dev/null 2>&1 && echo "lastlight: installed" || echo "lastlight: missing"
lastlight is missing: npm i -g lastlight.Ask for each of these (don't guess). Group the questions; explain what each is for.
Required
GitHub App — App ID, Installation ID, and the path to the App's private
key .pem file. (If they don't have a GitHub App yet, point them at GitHub →
Settings → Developer settings → GitHub Apps; it needs webhook + repo
contents/issues/pull-requests/checks permissions, plus workflows (read &
write) so it can merge/push PRs that touch .github/workflows/ — e.g.
dependency PRs bumping GitHub Actions versions. Recommend actions (read)
too — a different permission from workflows: it lets the fix workflow read
the actual Actions job logs instead of only check annotations. It is optional,
so an app without it still works; the CI evidence is just weaker, and the
prompt says so. Recommend commit statuses (read) as well — again distinct
from checks: it covers the classic statuses external CI posts (CircleCI,
Jenkins), and without it CI is judged on check runs alone. They install it on
their repos to get the Installation ID.)
Domain — the public hostname for webhooks/dashboard, e.g.
lastlight.example.com. Ask whether to use the bundled Caddy for
automatic TLS (default yes). The GitHub App webhook URL will be
https://<domain>/webhook.
Managed repos — one or more owner/repo the bot is allowed to act on. The
bot ignores any repo not listed.
State database — SQLite (recommended, the default) or an external
Postgres. SQLite is a file in the agent-data volume with nothing to run;
answering it writes no config at all, which is deliberate (the slot resolving
by absence is what lets STATE_DIR move the file). Choose Postgres only if
the user already has a server — then they supply a postgres://user:pass@host:port/db
URL, which the wizard writes to the gitignored instance/secrets/.env and
never to instance/config.yaml (that file becomes a GitHub repo at the
end of setup). The driver is detected from the host, not asked
(*.neon.tech → Neon's serverless driver, else node-postgres). The wizard
only TCP-probes the host; run lastlight server db check after the build for
the full credential check. An existing SQLite deployment can move across
later with lastlight server db migrate — no need to decide now.
Model — a provider/model string (default anthropic/claude-sonnet-5-5),
plus the matching provider's API key. Last Light is multi-provider: the
provider/ prefix picks the provider and the model id follows, e.g.
anthropic/claude-sonnet-5-5, openai/gpt-5.5, google/gemini-2.5-pro,
openrouter/anthropic/claude-sonnet-4.5. Set only the one API-key env var
that matches the provider you chose. Common ones:
anthropic/… → ANTHROPIC_API_KEY (sk-ant-…)openai/… → OPENAI_API_KEY (sk-…)openrouter/… → OPENROUTER_API_KEY (sk-or-…) — aggregator, reaches
Anthropic/Google/xAI/… models through one keygoogle/… → GEMINI_API_KEY, mistral/… → MISTRAL_API_KEY,
groq/… → GROQ_API_KEY, xai/… → XAI_API_KEY, deepseek/… →
DEEPSEEK_API_KEY, and more (Cerebras, Hugging Face, Moonshot, NVIDIA,
Fireworks, Together, Z.AI, Kimi, MiniMax).The env var name is not always <PROVIDER>_API_KEY (e.g. Google uses
GEMINI_API_KEY, Hugging Face uses HF_TOKEN); the full provider → model
prefix → env-var map is the registry in src/providers.ts, echoed in
references/env-schema.md.
Optional
/admin.xoxb-…), app token (xapp-…), delivery channel id,
allowed user ids.The server runs out of a working directory: a checkout of the lastlight repo
plus an instance/ overlay. Scaffold it (this clones the core repo if needed
and creates/clones the overlay):
lastlight server setup # interactive: confirms working dir + overlay
If you need to do this non-interactively / the user already has a checkout, work
in that directory directly (it has docker-compose.yml, workflows/, skills/,
config/). The overlay you write to is <workdir>/instance/.
Create the overlay files directly (this is the automatable path — it avoids the TTY wizard). From the working directory:
mkdir -p instance/secrets && chmod 700 instance/secretsinstance/secrets/app.pem and chmod 600 it.openssl rand -hex 32 for WEBHOOK_SECRET and
again for ADMIN_SECRET.instance/secrets/.env (chmod 600) and instance/config.yaml
following references/env-schema.md — it has the exact keys, value
formats, and ready-to-fill templates for both files.instance/docker-compose.override.yml to
disable it (template in references/env-schema.md).Read references/env-schema.md now before writing the files — it has the precise
key list and value formats.
Alternative (let the user drive): if they'd rather answer prompts themselves, have them run
lastlight setup --serverin the working directory — the same wizard, interactive. It is a TTY wizard, so you can't fill it in from a script.
lastlight server update # build images, bring stack up, recreate sidecars, health-check
Then verify:
curl -fsS http://127.0.0.1:8644/health && echo " ← healthy"
lastlight server status # compose state + version drift
Tell the user to:
WEBHOOK_SECRET and the webhook URL
(https://<domain>/webhook) into their GitHub App settings, and confirm a
test delivery succeeds.https://<domain>/admin (password is ADMIN_PASSWORD if they set one).lastlight server restart agent
(no rebuild). See the lastlight-overlay skill for forking workflows/assets.For day-2 operations (start/stop/restart/update, logs, redeploy after a code
change), read references/operations.md.
The stack is up, GET /health returns ok, lastlight server status shows the
agent running, and the user has the webhook secret + URL to finish GitHub App
setup. Report the webhook URL, dashboard URL, and which config you wrote.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nearform/lastlight --plugin lastlight7 skills in this plugin
/lastlight-clientInstall the `lastlight` CLI and connect it as a CLIENT to an existing Last Light server — log in, save the token, and verify the connection. Use when the user wants to "connect / point my lastlight CLI at a server", "log in to Last Light", "set up the lastlight client", or run lastlight commands against a remote instance. For standing up the server itself use lastlight-server; for editing a deployment's config use lastlight-overlay./lastlight-debugDebug a running Last Light instance over its admin API with the `lastlight` CLI — no SSH. Use when the user wants to "look at / debug a failed or stuck workflow", "why didn't the bot do X", "check a bad agent run / phase error on <instance>", "tail a session", "search the logs", "read the server/docker logs", "list/trigger a cron", "resolve an approval", or "check stats/cost" against a deployed server. Needs a CLI already connected (see lastlight-client to log in). For standing up the server use lastlight-server; for editing config/workflows use lastlight-overlay./lastlight-evalsScaffold, configure and run a Last Light EVALS workspace — the harness that runs Last Light's real workflows against a mocked GitHub and grades them deterministically. Use when the user wants to "set up / scaffold Last Light Evals", "create an evals workspace or instance", "run evals", "compare models", or author new eval cases — including "create an eval dataset/case from this PR/issue <github url>" and "create a PR-review eval dataset from these gold PRs" (triage / code-fix / pr-review instances, via `add-case --pr <url> --review|--code-fix` / `--issue`). GitHub is mocked when running, so no real GitHub token is needed — only a model provider API key (the one exception is `add-case`, which reads real PRs/issues via `gh`).Other plugins' skills for the same job