From 261f0594de11f749c3029d87f5676a265a66d825 Mon Sep 17 00:00:00 2001 From: yetone Date: Sun, 27 Sep 2026 20:28:39 +0800 Subject: [PATCH] web: magpie web's usage tells of MAGPIE_WEB_KEY, which keeps one key across runs and browsers signed in for 400 days (#113) --- main.go | 1 + web_cli.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 5d4bbc49..e5f24eab 100644 --- a/main.go +++ b/main.go @@ -32,6 +32,7 @@ const usage = `magpie — one place to pick every agent's model magpie tui the same thing, in the terminal magpie web [--addr host:port] [--lan] [--no-open] the app's window in a browser, with the gateway (no desktop needed: WSL, a server over SSH) + a new key each run; MAGPIE_WEB_KEY (16+ letters, digits, - . _ ~) keeps one, signed in for 400 days magpie ls list detected agents and their settings magpie show one agent magpie set an agent's model e.g. magpie claude deepseek/deepseek-chat diff --git a/web_cli.go b/web_cli.go index 53a2e2d6..3e6bbf73 100644 --- a/web_cli.go +++ b/web_cli.go @@ -29,7 +29,7 @@ func webCmd(args []string) error { case a == "--no-open": open = false default: - return fmt.Errorf("magpie web: unknown %q · magpie web [--addr host:port] [--lan] [--no-open]", a) + return fmt.Errorf("magpie web: unknown %q · magpie web [--addr host:port] [--lan] [--no-open], MAGPIE_WEB_KEY to keep one key", a) } } if lan && addr == webAddr { @@ -50,7 +50,7 @@ func webCmd(args []string) error { } fmt.Println(amber.Render("!"), "anyone with the link can change magpie and see its keys, and the network carries it unencrypted") } - carries := "this run's key" + carries := "this run's key (MAGPIE_WEB_KEY keeps one across runs)" if os.Getenv("MAGPIE_WEB_KEY") != "" { carries = "MAGPIE_WEB_KEY" }