Sync with latest libmutton development version

This commit is contained in:
2026-01-01 20:03:23 -05:00
parent 25f2013d62
commit 441730e0e0
8 changed files with 23 additions and 16 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
MUTN MUTN
Copyright (c) 2024-2025 Randall Winkhart Copyright (c) 2024-2026 Randall Winkhart
MUTN is licensed under the AGPL 3.0 due to its usage of MUTN is licensed under the AGPL 3.0 due to its usage of
a custom fork of https://github.com/jessp01/gohighlight. a custom fork of https://github.com/jessp01/gohighlight.
+1 -1
View File
@@ -1,4 +1,4 @@
.TH MUTN 1 "26 December 2025" "v0.D.0" "MUTN man page" .TH MUTN 1 "01 January 2026" "v0.D.0" "MUTN man page"
.SH NAME .SH NAME
\fBmutn\fR - Simple, self-hosted, SSH-synchronized password and note management based on libmutton. \fBmutn\fR - Simple, self-hosted, SSH-synchronized password and note management based on libmutton.
+7
View File
@@ -0,0 +1,7 @@
**WARNING: AS LIBMUTTON HAS NOT YET REACHED v1.0.0, [BREAKING CHANGES](https://github.com/rwinkhart/libmutton/blob/main/wiki/breaking.md) IN FUTURE UPDATES ARE PLANNED**
**MUTN v0.4.0**
Built with libmutton v0.5.0
Release date TBD
This release syncs with libmutton v0.5.0 and adds a new multi-field copy menu.
+1 -1
View File
@@ -5,7 +5,7 @@ go 1.25.5
require ( require (
github.com/charmbracelet/glamour v0.7.0 github.com/charmbracelet/glamour v0.7.0
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366 github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366
github.com/rwinkhart/libmutton v0.4.3-0.20251227024942-bdbdce61aa77 github.com/rwinkhart/libmutton v0.4.3-0.20260102005208-28286788a045
golang.org/x/term v0.38.0 golang.org/x/term v0.38.0
) )
+2 -2
View File
@@ -48,8 +48,8 @@ github.com/rwinkhart/go-highlite v0.1.1 h1:9TxbRhYVfD/3YaEgNk1BtEiZ0t8/5mxDUZqNM
github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA= github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA=
github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg= github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg=
github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0= github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0=
github.com/rwinkhart/libmutton v0.4.3-0.20251227024942-bdbdce61aa77 h1:CQ9YH2g74HQnaXLKPgaxsp3PLRLpyOX2td58W/SpDP0= github.com/rwinkhart/libmutton v0.4.3-0.20260102005208-28286788a045 h1:NIOFaievf9iYJgfZ8k4VaAZovQlqhtRWTuCpDWnlYtc=
github.com/rwinkhart/libmutton v0.4.3-0.20251227024942-bdbdce61aa77/go.mod h1:nOEBckA0iNZePuXzkxpTlzBevKQlZqkvwstZjMB3yBU= github.com/rwinkhart/libmutton v0.4.3-0.20260102005208-28286788a045/go.mod h1:nOEBckA0iNZePuXzkxpTlzBevKQlZqkvwstZjMB3yBU=
github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo= github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo=
github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c= github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c=
github.com/rwinkhart/rcw v0.2.4 h1:FrRSsl+ui1WLmDwqjLSROtFPKqSeGLEfF2SPENt4qP0= github.com/rwinkhart/rcw v0.2.4 h1:FrRSsl+ui1WLmDwqjLSROtFPKqSeGLEfF2SPENt4qP0=
+6 -6
View File
@@ -12,8 +12,8 @@ import (
"github.com/rwinkhart/go-boilerplate/front" "github.com/rwinkhart/go-boilerplate/front"
"github.com/rwinkhart/go-boilerplate/other" "github.com/rwinkhart/go-boilerplate/other"
"github.com/rwinkhart/libmutton/age" "github.com/rwinkhart/libmutton/age"
"github.com/rwinkhart/libmutton/cfg"
"github.com/rwinkhart/libmutton/clip" "github.com/rwinkhart/libmutton/clip"
"github.com/rwinkhart/libmutton/config"
"github.com/rwinkhart/libmutton/core" "github.com/rwinkhart/libmutton/core"
"github.com/rwinkhart/libmutton/crypt" "github.com/rwinkhart/libmutton/crypt"
"github.com/rwinkhart/libmutton/global" "github.com/rwinkhart/libmutton/global"
@@ -199,7 +199,7 @@ func main() {
case "init": case "init":
err := core.LibmuttonInit(front.Input, err := core.LibmuttonInit(front.Input,
map[string]any{"mutnTextEditor": getTextEditorInput()}, map[string]any{"mutnTextEditor": getTextEditorInput()},
confirmRCWPassword("new"), false, false) confirmRCWPassword("new"), front.InputBinary("Preserve existing config directory?"), false)
if err != nil { if err != nil {
other.PrintError("Initialization failed: "+err.Error(), 0) other.PrintError("Initialization failed: "+err.Error(), 0)
} }
@@ -207,10 +207,10 @@ func main() {
choice := front.InputMenuGen("Action:", []string{"Set text editor", "Change device ID", "Age all entries", "Change master password/Optimize entries"}) choice := front.InputMenuGen("Action:", []string{"Set text editor", "Change device ID", "Age all entries", "Change master password/Optimize entries"})
switch choice { switch choice {
case 1: case 1:
newCfg := &cfg.ConfigT{} newCfg := &config.CfgT{}
newThirdPartyCfg := map[string]any{"mutnTextEditor": getTextEditorInput()} newClientSpecificCfg := map[string]any{"mutnTextEditor": getTextEditorInput()}
newCfg.ThirdParty = &newThirdPartyCfg newCfg.ClientSpecific = &newClientSpecificCfg
err := cfg.WriteConfig(newCfg, true) err := config.Write(newCfg, true)
if err != nil { if err != nil {
other.PrintError("Failed to set text editor: "+err.Error(), back.ErrorWrite) other.PrintError("Failed to set text editor: "+err.Error(), back.ErrorWrite)
} }
+3 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/rwinkhart/go-boilerplate/back" "github.com/rwinkhart/go-boilerplate/back"
"github.com/rwinkhart/go-boilerplate/front" "github.com/rwinkhart/go-boilerplate/front"
"github.com/rwinkhart/go-boilerplate/other" "github.com/rwinkhart/go-boilerplate/other"
"github.com/rwinkhart/libmutton/cfg" "github.com/rwinkhart/libmutton/config"
"github.com/rwinkhart/libmutton/core" "github.com/rwinkhart/libmutton/core"
"github.com/rwinkhart/libmutton/syncclient" "github.com/rwinkhart/libmutton/syncclient"
) )
@@ -95,12 +95,12 @@ func editNote(baseNote []string) ([]string, bool) {
}(tempFile.Name()) }(tempFile.Name())
// fetch the user's text editor // fetch the user's text editor
config, err := cfg.LoadConfig() cfg, err := config.Load()
if err != nil { if err != nil {
other.PrintError("Failed to load libmuttoncfg.json: "+err.Error(), back.ErrorRead) other.PrintError("Failed to load libmuttoncfg.json: "+err.Error(), back.ErrorRead)
} }
var editor string var editor string
if value, exists := (*config.ThirdParty)["mutnTextEditor"]; !exists { if value, exists := (*cfg.ClientSpecific)["mutnTextEditor"]; !exists {
other.PrintError("Failed to retrieve text editor from libmuttoncfg.json\n\nPlease specify one with \"mutn tweak\"", back.ErrorRead) other.PrintError("Failed to retrieve text editor from libmuttoncfg.json\n\nPlease specify one with \"mutn tweak\"", back.ErrorRead)
} else { } else {
editor = value.(string) editor = value.(string)
+2 -2
View File
@@ -15,7 +15,7 @@ const (
) )
func HelpMain() { func HelpMain() {
fmt.Print(back.AnsiBold + "\nMUTN | Copyright (c) 2024-2025 Randall Winkhart\n" + back.AnsiReset + ` fmt.Print(back.AnsiBold + "\nMUTN | Copyright (c) 2024-2026 Randall Winkhart\n" + back.AnsiReset + `
This software exists under the MIT license; you may redistribute it under certain conditions. This software exists under the MIT license; you may redistribute it under certain conditions.
This program comes with absolutely no warranty; type "mutn version" for details. This program comes with absolutely no warranty; type "mutn version" for details.
@@ -156,7 +156,7 @@ func Version() {
"\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" + "\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
"\\" + ansiBlackOnWhite + " Built with libmutton v" + global.LibmuttonVersion + " " + back.AnsiReset + ansiVersionOutline + "/\n" + "\\" + ansiBlackOnWhite + " Built with libmutton v" + global.LibmuttonVersion + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
"\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" + "\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
"\\" + ansiBlackOnWhite + " Copyright (c) 2024-2025: Randall Winkhart " + back.AnsiReset + ansiVersionOutline + "/\n" + "\\" + ansiBlackOnWhite + " Copyright (c) 2024-2026: Randall Winkhart " + back.AnsiReset + ansiVersionOutline + "/\n" +
"\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" + "\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
"<><><><><><><><><><><><><><>-<><><><><><><><><><><><><><>\n" + back.AnsiReset + "<><><><><><><><><><><><><><>-<><><><><><><><><><><><><><>\n" + back.AnsiReset +
"\n For more information, see:\n\n" + "\n For more information, see:\n\n" +