1<!--
2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
3
4SPDX-License-Identifier: CC0-1.0
5-->
6
7# wyrd
8
9[![Go report card status][goreportcard-badge]][goreportcard]
10[![REUSE status][reuse-shield]][reuse]
11[![scratchanitch.dev badge][scratchanitch-badge]][scratchanitch]
12[![XMPP Chat][xmpp-shield]][xmpp]
13
14_Receive credentials from clients in a reasonably secure manner_
15
16---
17
18Credentials are encrypted client-side with [agewasm] (a WebAssembly wrapper for
19[age]) before they're submitted to the server. The server receives that encrypted
20string and passes it to the email addresses listed in the config.
21
22[agewasm]: https://github.com/MarinX/agewasm
23[age]: https://github.com/FiloSottile/age
24
25## Installation
26
27### From binary
28
29Head to the [releases page] and download the latest binary for your platform.
30
31[releases page]: https://git.sr.ht/~amolith/wyrd/refs
32
33**NOTE:** binaries are built for as many platforms as possible, but only tested
34on Linux/amd64. If you find a bug on another platform, please [open an issue][todo].
35
36### From source
37
38```sh
39git clone https://git.sr.ht/~amolith/wyrd
40cd wyrd
41go build -o wyrd .
42```
43
44## Usage
45
46Execute the binary with the `-c` flag to specify the path to a `config.toml`
47file. If the file exists, it's read and parsed. If it doesn't exist, it's
48created with default values. Modify those values then re-execute the binary.
49
50```sh
51$ ./wyrd -h
52Usage of ./wyrd:
53 -c, --config string Path to config file (default "config.toml")
54pflag: help requested
55```
56
57Here's an example `systemd` service file.
58
59```ini
60[Unit]
61Description=Password thing
62After=syslog.target
63After=network.target
64
65[Service]
66RestartSec=2s
67Type=simple
68User=wyrd
69Group=wyrd
70WorkingDirectory=/home/wyrd/
71ExecStart=/home/wyrd/wyrd -c /home/wyrd/config.toml
72Restart=always
73
74[Install]
75WantedBy=multi-user.target
76```
77
78## Screenshots
79
80### Light mode
81
82
83
84### Dark mode
85
86
87
88
89## Contributing
90
91Contributions are very much welcome! Please take a look at the [ticket
92tracker][todo] and see if there's anything you're interested in working on. If
93there's specific functionality you'd like to see implemented and it's not
94mentioned in the ticket tracker, please post to the [mailing list][email] and
95describe the feature.
96
97Questions, comments, and patches can always be sent to the [mailing
98list][email], but I'm also in the [IRC channel][irc]/[XMPP room][xmpp] pretty
99much 24/7. However, I might not see messages right away because I'm working on
100something else (or sleeping) so please stick around.
101
102If you're wanting to introduce a new feature and I don't feel like it fits with
103this project's goal, I encourage you to fork the repo and make whatever changes
104you like!
105
106- Email: [~amolith/public-inbox@lists.sr.ht][email]
107- IRC: [irc.libera.chat/##secluded][irc]
108- XMPP: [secluded@muc.secluded.site][xmpp]
109
110[email]: mailto:~amolith/public-inbox@lists.sr.ht
111[irc]: irc://irc.nixnet.services/##secluded
112[xmpp]: xmpp:secluded@muc.secluded.site?join
113[todo]: https://todo.sr.ht/~amolith/public-tracker?search=status%3Aopen%20label%3A%22wyrd%22
114
115_If you haven't used mailing lists before, please take a look at [SourceHut's
116documentation](https://man.sr.ht/lists.sr.ht/), especially the etiquette
117section._
118
119### Required tools
120
121- [Go](https://go.dev/)
122- [gofumpt](https://github.com/mvdan/gofumpt)
123 - Stricter formatting rules than the default `go fmt`
124- [golangci-lint](https://golangci-lint.run/)
125 - Aggregates various preinstalled Go linters, runs them in parallel, and makes
126 heavy use of the Go build cache
127- [Staticcheck](https://staticcheck.dev/)
128 - Uses static analysis to find bugs and performance issues, offer
129 simplifications, and enforce style rules
130
131### Suggested tools
132
133- [just](https://github.com/casey/just)
134 - Command runner to simplify use of the required tools
135
136### Configuring git for git send-email
137
138First, go through the tutorial on
139[git-send-email.io](https://git-send-email.io/).
140
141``` shell
142git config sendemail.to "~amolith/public-inbox@lists.sr.ht"
143```
144
145[goreportcard-badge]: https://goreportcard.com/badge/git.sr.ht/~amolith/wyrd
146[goreportcard]: https://goreportcard.com/report/git.sr.ht/~amolith/wyrd
147[reuse]: https://api.reuse.software/info/git.sr.ht/~amolith/wyrd
148[reuse-shield]: https://img.shields.io/reuse/compliance/git.sr.ht%2F~amolith%2Fwyrd
149[fosspay]: https://secluded.site/donate/
150[fosspay-shield]: https://shields.io/badge/donate-fosspay-yellow
151[scratchanitch-badge]: https://img.shields.io/badge/scratchanitch-dev-FFC4B5
152[scratchanitch]: https://scratchanitch.dev
153[xmpp-shield]: https://img.shields.io/badge/XMPP-secluded@muc.secluded.site-dc5f1d?logo=xmpp
154[xmpp]: xmpp:secluded@muc.secluded.site?join