bin

command
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

usr/bin/env go run "$0" "$@"; exit bin/serve.go - async Go HTTP server for the 2dph brain (see bin/server).

KB_ROOT=/path/to/2dph ./bin/serve.go        # serve the brain
KB_SEARCH_CMD=... KB_WORKERS=4 KB_PORT=8630 ./bin/serve.go

Shebang trick: the first line is a Go `//` comment; when executed, env runs `go run "$0"` so this file doubles as an executable script. The real code lives in the importable package (module path, never a relative import). NOTE: never run `gofmt -w` on this file - it rewrites `//usr/bin/env` to `// usr/...` and breaks the shebang.

Directories

Path Synopsis
usr/bin/env go run "$0" "$@"; exit bin/kb/watch.go - re-index the 2dph brain when corpus files change.
usr/bin/env go run "$0" "$@"; exit bin/kb/watch.go - re-index the 2dph brain when corpus files change.
usr/bin/env go run "$0" "$@"; exit bin/mail/sync.go - async download of OnlyOffice and Gmail mail to var/mail/.
usr/bin/env go run "$0" "$@"; exit bin/mail/sync.go - async download of OnlyOffice and Gmail mail to var/mail/.
sync
Package synccmd wires the sync library to a CLI: reads .env, parses flags, picks sources, prints stats.
Package synccmd wires the sync library to a CLI: reads .env, parses flags, picks sources, prints stats.
Package server serves the 2dph brain over HTTP.
Package server serves the 2dph brain over HTTP.
Package watch polls corpus directories for changes and re-runs bin/kb/index.
Package watch polls corpus directories for changes and re-runs bin/kb/index.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL