12 Commits
15 changed files with 234 additions and 71 deletions
+23 -13
View File
@@ -23,26 +23,36 @@ Additionally, MUTN is available as a source package ("[mutn](https://aur.archlin
After installing, please review the [usage guide](https://github.com/rwinkhart/MUTN/blob/main/wiki/usage.md).
# Roadmap
#### Release v0.3.0
- [ ] Replace Glamour with a more minimal Markdown renderer (likely custom)
#### Release v0.4.0
### Release v0.3.0
- [ ] libmutton v0.3.0
- [ ] Swap to native (cascade) encryption (custom)
- [ ] Implement "netpin" (quick-unlock) with new encryption
#### Release v0.5.0
- [ ] libmutton v0.4.0
- [ ] Password aging support
#### Release v0.6.0
- [ ] libmutton v0.5.0
- [ ] Add refresh/re-encrypt functionality
- [ ] Re-implement init menu
- [ ] Implement tweak menu
#### Release v1.0.0
- [ ] Bump Glamour version and switch to fully-compliant Markdown (do not preserve new lines)
- [x] Add experimental build option for building with [BEAN](https://github.com/Trojan2021/BEAN) instead of Glamour
### Release v0.4.0
- [ ] Evaluate defaulting to building w/Bean over Glamour
- [ ] Verify having Glamour in go.mod does not impact binary size/speed (drop it if it does)
### Release v0.5.0
- [ ] libmutton v0.4.0
- [ ] Password aging support
- [ ] Append UNIX timestamp to entry names
- [ ] Trim timestamps to allow for vanity entry names in the following cases:
- [ ] Argument parsing
- [ ] Shell completions
- [ ] Entry list readout
- [ ] Add yellow/red dot indicators to entry list readout for when passwords should be changed
### Release v0.6.0
- [ ] libmutton v0.5.0
- [ ] Swap to native (cascading) encryption
- [ ] Implement "netpin" (quick-unlock) with new encryption
### Release v1.0.0 - Distribution packages
- [ ] Evaluate implementing custom types/interfaces (where applicable)
- [ ] Create packaging scripts
- [x] Stable source PKGBUILD
- [ ] Stable source APKBUILD
- [x] Stable source APKBUILD
- [ ] Debian/Ubuntu
- [ ] Fedora
- [ ] FreeBSD
- [ ] Windows installer
- Hunt for polishing opportunities and bugs
- Perform extensive testing
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
gofmt -l -w -s ./src/cli/*.go ./mutn.go
git commit -am "$1"
git push
+1 -1
View File
@@ -1,4 +1,4 @@
.TH MUTN 1 "20 August 2024" "v0.2.2" "MUTN man page"
.TH MUTN 1 "13 December 2024" "v0.2.4" "MUTN man page"
.SH NAME
\fBmutn\fR - Simple, self-hosted, SSH-synchronized password and note management based on libmutton. It is the successor to sshyp.
+57 -1
View File
@@ -1,5 +1,61 @@
**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.2.4**
Built with libmutton v0.2.4
December 13, 2024
# The Tripe Transmission Update - Patch 4
This release updates libmutton to v0.2.4 and includes only a minor tweak and some dependency bumps.
## IMPORTANT
- This release includes a dependency bump to address a high-severity CVE (CVE-2024-45337) - Please update as soon as possible!
## Changes
- A build option/tag was added (`BEAN`) for building with experimental [BEAN](https://github.com/Trojan2021/BEAN) Markdown rendering support (instead of Glamour)
- Note that the BEAN Markdown renderer is a new project and is **not** near complete
- The pre-compiled binaries provided below do **not** make use of this new build tag (they are still Glamour-based)
- From libmutton v0.2.4:
- The MIME type of data copied to the clipboard on UNIX-like systems (X11 and Wayland) is now statically set to "text/plain" to avoid potential issues with type inference
## Dependencies
- Bumps (direct and indirect)
- Go: v1.23.2 => 1.23.4
- github.com/rwinkhart/libmutton: v0.2.3 => v0.2.4
- github.com/charmbracelet/x/ansi: v0.4.0 => v0.5.2
- github.com/pkg/sftp: v1.13.6 => v1.13.7
- golang.org/x/crypto: v0.28.0 => v0.31.0
- golang.org/x/net: v0.30.0 => v0.32.0
- golang.org/x/sys: v0.26.0 => v0.28.0
- golang.org/x/term: v0.25.0 => v0.27.0
---
**MUTN v0.2.3**
Built with libmutton v0.2.3
October 19, 2024
# The Tripe Transmission Update - Patch 3
This release updates libmutton to v0.2.3 to fix a minor bug causing the client to make a request to the server under an inappropriate condition.
## Fixes
- From libmutton v0.2.3:
- Fixed renaming/moving an entry/folder to an invalid path still having clients request the operation on the server
## Dependencies
- Bumps (direct and indirect)
- Go: v1.22.6 => 1.23.2
- github.com/rwinkhart/libmutton: v0.2.2 => v0.2.3
- github.com/yuin/goldmark: v1.7.4 => v1.7.8
- github.com/yuin/goldmark-emoji: v1.0.3 => v1.0.4
- golang.org/x/crypto: v0.26.0 => v0.28.0
- golang.org/x/net: v0.28.0 => v0.30.0
- golang.org/x/sys: v0.24.0 => v0.26.0
- golang.org/x/term: v0.23.0 => v0.25.0
---
**MUTN v0.2.2**
Built with libmutton v0.2.2
August 20, 2024
@@ -9,7 +65,7 @@ August 20, 2024
This release updates libmutton to v0.2.2 to address a regression from v0.2.1. Additionally, a Windows-only entry adding bug has been fixed.
## Fixes
- From libmutton v0.2.1:
- From libmutton v0.2.2:
- Edited entries are no longer improperly synced if their line count is reduced
- (8c1b986e20bf8e02b4b27e18748f7677be2b2743) Adding new entries from Windows now works as intended
+12 -9
View File
@@ -1,11 +1,12 @@
module github.com/rwinkhart/MUTN
go 1.22.6
go 1.23.4
require (
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514
github.com/charmbracelet/glamour v0.7.0
github.com/rwinkhart/libmutton v0.2.2
golang.org/x/term v0.23.0
github.com/rwinkhart/libmutton v0.2.4
golang.org/x/term v0.27.0
)
require (
@@ -13,6 +14,7 @@ require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/boombuler/barcode v1.0.2 // indirect
github.com/charmbracelet/x/ansi v0.5.2 // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/fortis/go-steam-totp v0.0.0-20171114202746-18e928674727 // indirect
github.com/gorilla/css v1.0.1 // indirect
@@ -24,14 +26,15 @@ require (
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pkg/sftp v1.13.6 // indirect
github.com/pkg/sftp v1.13.7 // indirect
github.com/pquerna/otp v1.4.1-0.20231130234153-3357de7c0481 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rwinkhart/convertroman v0.2.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/yuin/goldmark v1.7.4 // indirect
github.com/yuin/goldmark-emoji v1.0.3 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.4 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sys v0.28.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
+37 -21
View File
@@ -1,3 +1,5 @@
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514 h1:PbqBQdkQ51VLfwemHdp3DqDAeMoPqzGSK39ZtFHJLG0=
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514/go.mod h1:Xkl7xpjhrhefSpFAJEc1uNIarmVU+EFASB8VLODTOsA=
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
@@ -13,6 +15,8 @@ github.com/boombuler/barcode v1.0.2 h1:79yrbttoZrLGkL/oOI8hBrUKucwOL0oOjUgEguGMc
github.com/boombuler/barcode v1.0.2/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/charmbracelet/glamour v0.7.0 h1:2BtKGZ4iVJCDfMF229EzbeR1QRKLWztO9dMtjmqZSng=
github.com/charmbracelet/glamour v0.7.0/go.mod h1:jUMh5MeihljJPQbJ/wf4ldw2+yBP59+ctV36jASy7ps=
github.com/charmbracelet/x/ansi v0.5.2 h1:dEa1x2qdOZXD/6439s+wF7xjV+kZLu/iN00GuXXrU9E=
github.com/charmbracelet/x/ansi v0.5.2/go.mod h1:KBUFw1la39nl0dLl10l5ORDAqGXaeurTQmwyyVKse/Q=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -42,8 +46,8 @@ github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo=
github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk=
github.com/pkg/sftp v1.13.7 h1:uv+I3nNJvlKZIQGSr8JVQLNHFU9YhhNpvC14Y6KgmSM=
github.com/pkg/sftp v1.13.7/go.mod h1:KMKI0t3T6hfA+lTR/ssZdunHo+uwq7ghoN09/FSu3DY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/otp v1.4.1-0.20231130234153-3357de7c0481 h1:FkxbO331O7mS5EJkP+MCi0o2gswh/Aezs+//NmefrR8=
@@ -52,8 +56,10 @@ github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rwinkhart/libmutton v0.2.2 h1:PN3VaM8IiKy6Ea2dfyTQxwyNeIu00CZ2vsgVZESrcvU=
github.com/rwinkhart/libmutton v0.2.2/go.mod h1:W4xYquN2Hz5rNyaaIUZCMTLvTNcAx804f1Y4vaUBmiw=
github.com/rwinkhart/convertroman v0.2.0 h1:otUm939eXT77q/Lr31mJtMwVWEw0RjEUB71gO65h9OM=
github.com/rwinkhart/convertroman v0.2.0/go.mod h1:Af6HqvX0EIM4Y3HcnNXbbRey1dLasGB7WU0+3Cowgmw=
github.com/rwinkhart/libmutton v0.2.4 h1:Uu/Xjgeau1YiEztTaEeVQONopXuGVKty+gIb/xA6jQ8=
github.com/rwinkhart/libmutton v0.2.4/go.mod h1:PdB+cyRsd3F4Uwxx8EJCRraJTwbvvrynY9iQVr/V+Wg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
@@ -63,45 +69,55 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg=
github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-emoji v1.0.3 h1:aLRkLHOuBR2czCY4R8olwMjID+tENfhyFDMCRhbIQY4=
github.com/yuin/goldmark-emoji v1.0.3/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U=
github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-emoji v1.0.4 h1:vCwMkPZSNefSUnOW2ZKRUjBSD5Ok3W78IXhGxxAEF90=
github.com/yuin/goldmark-emoji v1.0.4/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI=
golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
+8 -4
View File
@@ -22,11 +22,15 @@ case "$1" in
. ./resources/release-binaries.sh
create_release_binaries
;;
pkgbuild-git-stable)
. ./resources/pkgbuild-git-stable.sh
create_pkgbuild_git_stable
pkgbuild-git-stable-optimized)
. ./resources/pkgbuild-git-stable-optimized.sh
create_pkgbuild_git_stable_optimized
;;
apkbuild-source-stable-optimized)
. ./resources/apkbuild-source-stable-optimized.sh
create_apkbuild_source_stable_optimized
;;
*)
printf '\nusage: package.sh [target] <revision>\n\ntargets: release-binaries pkgbuild-git-stable\n\n'
printf '\nusage: package.sh [target] <revision>\n\ntargets: release-binaries pkgbuild-git-stable-optimized apkbuild-source-stable-optimized\n\n'
;;
esac
@@ -0,0 +1,61 @@
#!/bin/sh
create_apkbuild_source_stable_optimized() {
printf '\nGenerating APKBUILD...\n'
local source="https://github.com/rwinkhart/MUTN/archive/refs/tags/v"$version".tar.gz"
local checksum=$(curl -sL "$source" | sha512sum | cut -d ' ' -f1)
printf "# Maintainer: Randall Winkhart <idgr@tutanota.com>
pkgname=mutn
pkgver="$version"
pkgrel="$((revision-1))"
pkgdesc='A simple, self-hosted, SSH-synchronized password/note manager for the CLI (based on libmutton)'
arch='all'
url='https://github.com/rwinkhart/MUTN'
license='MIT'
depends='gnupg'
makedepends='busybox go'
options='!check net'
source=\"\$pkgname-\$pkgver.tar.gz::"$source"\"
build() {
cd \${srcdir}/MUTN-\$pkgver
# compress man page
gzip -kf ./docs/man
# determine microarchitecture feature level
case \$CARCH in
'x86_64')
cpuFlags=\$(grep -E 'flags\s+:\s' /proc/cpuinfo)
if [ ! -z \"\$(echo \"\$cpuFlags\" | grep 'avx512f')\" ]; then
export GOAMD64=v4
elif [ ! -z \"\$(echo \"\$cpuFlags\" | grep 'avx2')\" ]; then
export GOAMD64=v3
elif [ ! -z \"\$(echo \"\$cpuFlags\" | grep 'sse4_2')\" ]; then
export GOAMD64=v2
else
export GOAMD64=v1
fi
;;
# TODO check aarch64 feature level
esac
# compile binary
CGO_ENABLED=1 go build -ldflags=\"-s -w\" -trimpath ./mutn.go
}
package() {
cd \${srcdir}/MUTN-\$pkgver
install -Dm755 ./mutn \${pkgdir}/usr/bin/mutn
install -Dm644 ./LICENSE \${pkgdir}/usr/share/licenses/mutn/LICENSE
install -Dm644 ./completions/zsh/_mutn \${pkgdir}/usr/share/zsh/site-functions/_mutn
install -Dm644 ./completions/bash/mutn \${pkgdir}/usr/share/bash-completion/completions/mutn
install -Dm644 ./docs/man.gz \${pkgdir}/usr/share/man/man1/mutn.1.gz
}
sha512sums=\"
$checksum \$pkgname-\$pkgver.tar.gz
\"
" > 1output/APKBUILD
printf '\nAPKBUILD generated\n\n'
}
@@ -1,6 +1,6 @@
#!/bin/sh
create_pkgbuild_git_stable() {
create_pkgbuild_git_stable_optimized() {
printf '\nGenerating PKGBUILD...\n'
local source="git+https://github.com/rwinkhart/MUTN.git#tag=v\${pkgver}"
printf "# Maintainer: Randall Winkhart <idgr at tutanota dot com>
@@ -11,7 +11,8 @@ pkgdesc='A simple, self-hosted, SSH-synchronized password/note manager for the C
arch=('x86_64' 'i686' 'i486' 'pentium4' 'aarch64' 'armv7h' 'riscv64')
url='https://github.com/rwinkhart/MUTN'
license=('MIT')
makedepends=(go util-linux gzip)
depends=(gnupg)
makedepends=(go grep gzip)
optdepends=(
'wl-clipboard: Wayland clipboard support'
'xclip: X11 clipboard support'
@@ -29,12 +30,12 @@ build() {
# determine microarchitecture feature level
case \$CARCH in
'x86_64')
lscpuOutput=\$(lscpu | grep Flags)
if [ ! -z \"\$(echo \$lscpuOutput | grep avx512f)\" ]; then
cpuFlags=\$(grep -E 'flags\s+:\s' /proc/cpuinfo)
if [ ! -z \"\$(grep 'avx512f' <<< \"\$cpuFlags\")\" ]; then
export GOAMD64=v4
elif [ ! -z \"\$(echo \$lscpuOutput | grep avx2)\" ]; then
elif [ ! -z \"\$(grep 'avx2' <<< \"\$cpuFlags\")\" ]; then
export GOAMD64=v3
elif [ ! -z \"\$(echo \$lscpuOutput | grep sse4_2)\" ]; then
elif [ ! -z \"\$(grep 'sse4_2' <<< \"\$cpuFlags\")\" ]; then
export GOAMD64=v2
else
export GOAMD64=v1
+1 -1
View File
@@ -11,7 +11,7 @@ var (
)
const (
MUTNVersion = "0.2.2" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
MUTNVersion = "0.2.4" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
AnsiBold = "\033[1m"
ansiBlackOnWhite = "\033[38;5;0;48;5;15m"
+3 -5
View File
@@ -3,7 +3,6 @@ package cli
import (
"fmt"
"os"
"strings"
"github.com/rwinkhart/libmutton/core"
"github.com/rwinkhart/libmutton/sync"
@@ -50,14 +49,13 @@ func EntryReader(decryptedEntry []string, hideSecrets, syncEnabled bool) {
fmt.Println(ansiDirectoryHeader + "Notes:" + core.AnsiReset)
// combine remaining fields into a single string (to support Markdown rendering)
var notesSlice []string
var noteLines []string
for ; field < len(decryptedEntry); field++ {
notesSlice = append(notesSlice, decryptedEntry[field])
noteLines = append(noteLines, decryptedEntry[field])
}
joinedString := strings.Join(notesSlice, "\n")
// print notes to stdout
renderNote(&joinedString)
renderNote(noteLines)
// break after notes have been printed
break
+14
View File
@@ -0,0 +1,14 @@
//go:build !noMarkdown && BEAN
package cli
import (
"fmt"
bean "github.com/Trojan2021/BEAN/render"
)
// renderNote renders the notes section of an entry (in Markdown) to stdout.
func renderNote(noteLines []string) {
fmt.Println(bean.RenderMarkdown(noteLines, width))
}
+3 -2
View File
@@ -4,9 +4,10 @@ package cli
import (
"fmt"
"strings"
)
// renderNote prints the notes section of an entry to stdout (when Markdown rendering is disabled).
func renderNote(note *string) {
fmt.Print("\n" + *note + "\n\n")
func renderNote(noteLines []string) {
fmt.Print("\n" + strings.Join(noteLines, "\n") + "\n\n")
}
@@ -1,17 +1,19 @@
//go:build !noMarkdown
//go:build !noMarkdown && !BEAN
package cli
import (
"fmt"
"strings"
"github.com/charmbracelet/glamour"
)
// renderNote renders the notes section of an entry (in Markdown) to stdout.
func renderNote(note *string) {
func renderNote(noteLines []string) {
note := strings.Join(noteLines, "\n")
r, _ := glamour.NewTermRenderer(glamour.WithStylesFromJSONBytes(glamourStyle()), glamour.WithPreservedNewLines(), glamour.WithWordWrap(width))
markdownNotesString, _ := r.Render(*note)
markdownNotesString, _ := r.Render(note)
// print markdown-rendered notes
fmt.Print(markdownNotesString)
+2 -1
View File
@@ -5,6 +5,7 @@ CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath ./mutn.go
```
Additionally, some custom build tags can be used to create different binaries. The following tags are not used in official builds:
- `noMarkdown`: Creates a binary without Markdown support (much smaller binary size and faster launch time)
- `BEAN`: Creates a binary with the experimental [BEAN](https://github.com/Trojan2021/BEAN) Markdown renderer in place of Glamour
- `noMarkdown`: Creates a binary without Markdown support (much smaller binary size and faster launch time VS Glamour)
- `wsl`: Allows creating a Linux binary that can interact with the Windows clipboard (for WSL)
- `termux`: Allows creating a Linux binary that can interact with the Termux clipboard (for Android)