MPL hard-fork of albedo
README.md

Overview (pre-alpha) #

Gegenschein is a hard fork of albedo, taken at albedo commit a14c202b, the last one before albedo moved from MPL-2.0 to AGPL-3.0-only. Gegenschein stays under the Mozilla Public License 2.0, and was forked with the albedo maintainer's okay. Nothing from albedo after a14c202b is merged into gegenschein; changes are written here, or contributed by their own authors under MPL-2.0.

gegenschein in a terminal

the web client's canvas: chats, a review with notes tied to its lines, a terminal and an artifact

the web client tiled: three windows side by side

Gegenschein is an agentic coding harness that can act on your device and soon able to manage sessions on other devices with agents that can act remotely on different machines or within containers. Our hope is that it being built on BEAM allows it to maintain low memory usage while running many concurrent agents and subagents across devices.

It is daemonized with the CLI and the web client being clients of this daemon. This ensures the agents can be programatically created, controlled, and even stopped all while still providing an experience similar to other harnesses like Claude Code and Codex. Gegenschein provides a Python REPL for the agents to use as a scratchpad and data manipulation allowing them to experiment, reason, and play with code before actually writing it down. This is similar to what other harnesses call CodeMode, and is based on prime-agent's's Python REPL and design.

The CLI is written in Go and uses the Charm stack.

# build native go cli
go -C cli build -o bin/gegenschein ./cmd/gegenschein
./cli/bin/gegenschein

# or to install it globally
go -C cli install ./cmd/gegenschein
gegenschein

When installed globally outside the checkout, set GEGENSCHEIN_ROOT to the absolute repo path if the daemon needs to be started:

GEGENSCHEIN_ROOT=/path/to/gegenschein gegenschein

or embed the root at install time:

go -C cli install -ldflags "-X main.buildRoot=$(pwd)" ./cmd/gegenschein

The default Nix package includes the client, compiled server, Python runtime, and Chrome Headless Shell for browser automation. The development shell also includes the browser:

nix build .#gegenschein
nix run . -- --help
nix-build -A default   # without flakes: the root default.nix goes through flake-compat
# package checks, with a local mock provider (no model credentials):
python3 test/manual/nix_package_smoke.py "$PWD/result/bin/gegenschein"
GEGENSCHEIN_NO_BROWSER=1 GEGENSCHEIN_TEST_BINARY="$PWD/result/bin/gegenschein" python3 test/daemon/integration.py

The client and server also build separately:

nix build .#gegenschein-client --out-link result-client
nix build .#gegenschein-server --out-link result-server
GEGENSCHEIN_DAEMON="$PWD/result-server/bin/gegenschein-daemon" ./result-client/bin/gegenschein

optional: view, which lets the model see its changes and code as highlighted images for a final review pass. needs cargo.

native/render/install.sh   # then enable `view` in /extensions

CLI usage #

Run gegenschein to open the terminal interface, or use --prompt to print a reply:

gegenschein -p "Explain this project"
gegenschein --prompt "Run the checks" --session SESSION_ID --timeout 10m
gegenschein resume SESSION_ID
gegenschein sessions --json
gegenschein sessions read SESSION_ID 3      # the newest 3 turns (default 1); --json for structure
gegenschein sessions send SESSION_ID "message"

Session IDs can be shortened to any unique prefix. Run gegenschein --help or gegenschein COMMAND --help for command options.

To inspect disk usage without starting the daemon, run gegenschein storage --json or gegenschein storage --sessions. Offline database inspection and cleanup use the local daemon executable without starting its server. Set GEGENSCHEIN_DAEMON to a packaged executable or GEGENSCHEIN_ROOT to a source checkout. These storage commands do not require Python. To clean up local files, stop the daemon first:

gegenschein daemon --stop
gegenschein storage prune --backups

Cleanup shows a preview and asks for confirmation. To permanently delete sessions, use gegenschein storage prune --session SESSION_ID, repeating --session for each full ID. Add --yes to skip confirmation in scripts.

Editor usage #

Configure your ACP editor to run gegenschein acp. Use an absolute executable path if gegenschein is not on the editor's PATH.

The editor uses your existing provider configuration. Run gegenschein login in a terminal if no provider is configured. Execution requires a local daemon and workspace. File tools use saved files, and closing the editor leaves accepted work running.

The ACP reference covers model selection, sessions, cancellation, and editor MCP servers.

Web usage #

The web client is a canvas of chat windows on a desktop and one chat at a time on a phone. It lives in web/ (Svelte). The Nix package includes it, so gegenschein web works straight away:

nix run . -- web           # serves on 127.0.0.1:4317 and opens the browser
gegenschein web --port 0 --no-open
nix build .#gegenschein-web     # just the built client

From a checkout without Nix, build it once first:

npm --prefix web ci
npm --prefix web run build

gegenschein web finds or starts the daemon the same way the terminal client does, and keeps the daemon's token to itself. It prints a link that signs the browser in, so don't share it. It only answers on localhost unless you allow a network:

gegenschein web --allow 10.0.0.0 --allow 100.64.0.0   # home LAN and tailnet
gegenschein web --allow 192.168.1.0/24 --save         # remember it for next time
gegenschein web --save                                # forget the saved networks

A network is CIDR, or an address whose trailing zeros stand for any (10.0.0.0 is 10.0.0.0/8). It then also listens on this machine's addresses in those networks, prints a sign-in link for each, and refuses devices from anywhere else. Set GEGENSCHEIN_WEB_DIST to serve a client built somewhere else.

What it does: new sessions (pick a folder, provider, model and effort), live chats with images, / commands and a model picker in the composer, reviews of a turn's changes on highlighted diffs, and notes you can tie to a message, a window or diff lines and send back as one message. Press ⌘K for everything else.

To work on the client, run the Vite dev server against the running daemon:

npm --prefix web run dev   # http://localhost:5173, restart it after the daemon restarts
npm --prefix web run check # svelte-check

The dev server listens on the local network with no sign-in, so other devices at home can open it, and anyone who reaches it gets full control of the daemon. Only run it on a network you trust. robot-docs/web.md describes how the client is put together.

formatting

nix fmt                         # treefmt: Nix, Gleam, Go, Python, and shell files
pre-commit install              # once per checkout; available in `nix develop`
pre-commit run --all-files       # format, lint Python, and type-check Python
test/quick.sh                   # every static check, without a hook
gleam format src test           # fix Gleam formatting
ruff format priv/python test    # fix Python formatting
ruff check                      # lint Python
ty check                        # type-check the kernel, plugins, and tests

The commit hook formats staged files and runs the Python checks; it needs gleam on PATH. jj runs no git hooks, so with jj run test/quick.sh before each commit.

tests

./test.sh               # gleam, native go cli, and daemon suites
go -C cli test ./...    # native go cli tests
go -C cli vet ./...     # native go cli vet
gleam test              # gleam suite

test/manual holds opt-in checks that need a packaged binary or real credentials.

todo

  • [] flesh out plugin system more
  • [] sdk and -p, command to print out most recent assistant message from session
  • [✓] compaction strategy plugins LCM and snapcompact
  • [] compaction evaluations: old-fact recall, corrected instructions, tool pairing, images, restarts, and token/cost comparisons
  • [✓] subagents plugin
  • [] social plugins like discord
  • [✓] plugins like heartbeat and skills
  • [ish] oauth that we shamelessly rip from omp
  • [] ai powered approve for me (jev/llm)
  • [] improve verbose mode on tui
  • [ish] webui: canvas on desktop, single chat on phones
  • [] connect to other gegenscheins on tui/webui and manage sessions
  • [ish we have remote but model opts into it, not yet able to have the model natively act in a different machine] ability to offload tools like python/bash onto other machines/containers

license #

gegenschein is Copyright © 2026 okami.mom, ptr.pet and aly.codes, and the other contributors in its git history, under the Mozilla Public License 2.0. See AUTHORS.md and THIRD_PARTY_NOTICES.md.