Observer Binary Registration and Hooks (observer/registration.go)

observer · cmd/observer/registration.go · go · Apache-2.0
cli, infra, lang:go, tag:config, tag:observer

Manages robust binary registration and hook/MCP configuration resolution for observer toolings. Reuse to ensure proper CLI path handling during upgrades.

// Source: https://github.com/superbasedapp/observer | License: Apache-2.0 | Copyright 2026 Gaja AI
// Provided via justclaw.it.com; keep this notice with the code.
package main

import (
	"os"
	"path/filepath"
	"runtime"

	"github.com/marmutapp/superbased-observer/internal/config"
	"github.com/marmutapp/superbased-observer/internal/dashapi"
	"github.com/marmutapp/superbased-observer/internal/installshape"
)

// registration.go is the ONE renderer of what a hook or MCP entry invokes
// (lane FIX-UPGRADE U1 + U5). `observer init`, the interactive init, the
// enrolment's --wire-clients step and `observer start`'s auto-registration
// all build their hook / MCP options through it, so the two writers stop
// rewriting each other's entries:
//
//   - the command is installshape.Decide over the

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key