Rename Basking to Nurse

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
VeillaxandClaude Sonnet 5.5 committed 2026-11-01 00:06:51 -06:00
1 parent cec2702260
commit 6a4be5b2f4
24 files changed
+208 -208

No files matched your search

+21 -21
View File
@@ -1,4 +1,4 @@
// Command basking is a private notebook: pages you can link, nest and search, kept as plain
// Command nurse is a private notebook: pages you can link, nest and search, kept as plain
// markdown files. You sign in with Authentik; there is no other way in.
package main
@@ -15,27 +15,27 @@ import (
"syscall"
"time"
"git.veillax.com/Veillax/basking/internal/config"
"git.veillax.com/Veillax/basking/internal/oidc"
"git.veillax.com/Veillax/basking/internal/web"
"git.veillax.com/Veillax/nurse/internal/config"
"git.veillax.com/Veillax/nurse/internal/oidc"
"git.veillax.com/Veillax/nurse/internal/web"
)
var version = "dev"
const usage = `basking is a private notebook that you sign in to with Authentik.
const usage = `nurse is a private notebook that you sign in to with Authentik.
basking serve [-config basking.json] [-listen addr] [-data dir]
nurse serve [-config nurse.json] [-listen addr] [-data dir]
run the notebook
basking check [-config basking.json] test the Authentik settings without starting
basking version
nurse check [-config nurse.json] test the Authentik settings without starting
nurse version
Settings come from the settings file and can be overridden by environment variables:
BASKING_PUBLIC_URL where you open Basking, such as https://notes.example.com
BASKING_OIDC_ISSUER the Authentik provider's OpenID configuration issuer
BASKING_OIDC_CLIENT_ID the provider's Client ID
BASKING_OIDC_CLIENT_SECRET the provider's Client Secret
BASKING_ALLOWED optional: only these emails or usernames may sign in (comma separated)
BASKING_LISTEN, BASKING_DATA, BASKING_CONFIG
NURSE_PUBLIC_URL where you open Nurse, such as https://notes.example.com
NURSE_OIDC_ISSUER the Authentik provider's OpenID configuration issuer
NURSE_OIDC_CLIENT_ID the provider's Client ID
NURSE_OIDC_CLIENT_SECRET the provider's Client Secret
NURSE_ALLOWED optional: only these emails or usernames may sign in (comma separated)
NURSE_LISTEN, NURSE_DATA, NURSE_CONFIG
`
// exitConfig is the exit status for settings that need fixing by hand, so a service manager does
@@ -55,7 +55,7 @@ func main() {
case "check":
err = check(os.Args[2:])
case "version", "-v", "--version":
fmt.Println("basking", version)
fmt.Println("nurse", version)
case "help", "-h", "--help":
fmt.Print(usage)
default:
@@ -63,7 +63,7 @@ func main() {
os.Exit(2)
}
if err != nil {
fmt.Fprintln(os.Stderr, "basking:", err)
fmt.Fprintln(os.Stderr, "nurse:", err)
var ce configError
if errors.As(err, &ce) {
os.Exit(exitConfig)
@@ -75,9 +75,9 @@ func main() {
type configError struct{ error }
func configFlag(fs *flag.FlagSet) *string {
def := os.Getenv("BASKING_CONFIG")
def := os.Getenv("NURSE_CONFIG")
if def == "" {
def = "basking.json"
def = "nurse.json"
}
return fs.String("config", def, "path of the settings file")
}
@@ -89,10 +89,10 @@ func serve(args []string) error {
data := fs.String("data", "", "override the folder the notes are kept in")
fs.Parse(args)
if *listen != "" {
os.Setenv("BASKING_LISTEN", *listen)
os.Setenv("NURSE_LISTEN", *listen)
}
if *data != "" {
os.Setenv("BASKING_DATA", *data)
os.Setenv("NURSE_DATA", *data)
}
h, err := config.Load(*path)
@@ -122,7 +122,7 @@ func serve(args []string) error {
defer stop()
errc := make(chan error, 1)
go func() { errc <- srv.ListenAndServe() }()
log.Printf("basking %s: notes are kept in %s; open %s", version, cfg.DataDir, cfg.PublicURL)
log.Printf("nurse %s: notes are kept in %s; open %s", version, cfg.DataDir, cfg.PublicURL)
log.Printf("sign-in goes through %s; the redirect URI to allow there is %s", cfg.OIDC.Issuer, cfg.RedirectURL())
if len(cfg.Allowed) == 0 {
log.Print("anyone Authentik lets into this application gets a notebook of their own; set \"allowed\" to limit it")