Help us shape the future of Go! Take the 2026 Go Developer Survey

uninstall

package
v0.1.2448 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package uninstall takes magpie off this computer: `magpie uninstall` and Settings › Uninstall magpie.

Jevik_AI on X deleted magpie's folders by hand, and Codex's config.toml kept openai_base_url on 127.0.0.1:3425: every Codex turn failed with a 502, with nothing left that knew why. Deleting magpie's files never puts an agent back, so uninstalling does that first, the way each agent's Disconnect does (what magpie changed goes back, what the user changed by hand since stays theirs), then removes what magpie registered with the system, then its own files.

What it leaves: the magpie executable itself (a running program can't delete itself everywhere, and the user put it there), and the Library's folder while it holds skills or servers the user's agents use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agents

func Agents(ctx context.Context, r *Report)

Agents disconnects every agent magpie is in: the first half of uninstalling, which the app does while it still runs.

func Connected

func Connected() []*agent.Agent

Connected are the agents magpie is in now, which Run disconnects.

func Data

func Data(r *Report)

Data removes magpie's own files: settings, providers, sign-ins kept by magpie, usage, caches. With the Library in use, everything in magpie's folder but it goes.

func DataAfterExit

func DataAfterExit() error

DataAfterExit starts `magpie uninstall --data-after <this pid>`, which removes magpie's files once this process, the app, has quit: the app's half of Run after Agents and System.

func Folders

func Folders() (remove []string, keep string)

Folders are magpie's own folders Data removes, and the Library's folder when it keeps that.

func System

func System(r *Report)

System removes what magpie registered with the system: its background service, opening at login, its Start menu shortcut and links.

Types

type Done

type Done struct {
	What string `json:"what"`
	Err  string `json:"error,omitempty"`
}

Done is one thing uninstalling did, or couldn't.

type Report

type Report struct {
	Agents []Done `json:"agents"`
	System []Done `json:"system"`
	Data   []Done `json:"data"`
	// Kept are folders left on purpose, each with why
	Kept []Done `json:"kept,omitempty"`
	// CodexApp: a Codex app still on the config it read before, which
	// the user quits and opens
	CodexApp bool `json:"codexApp,omitempty"`
	// Exe is the magpie executable, left where it is
	Exe string `json:"exe"`
}

Report is what Run did.

func AfterExit

func AfterExit(pid int, wait time.Duration) *Report

AfterExit waits for process pid to end, for up to wait, then removes magpie's files: what the app starts as it quits.

func Run

func Run(ctx context.Context) *Report

Run uninstalls magpie: agents, then the system, then its files. The app runs Data itself once it has quit (WebView2 holds its folder open while it runs), so it calls Agents and System only.

func (*Report) Failed

func (r *Report) Failed() bool

Failed says whether anything couldn't be done.

func (*Report) Says

func (r *Report) Says() []string

Says is the report as lines, for the terminal and the app's log.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL