Commands live at bin/brain/{index,get,stats,eval,watch}.go and
bin/mail/import.go, bin/markdown/import.go, bin/postgres/query.go.
Python remains the Ladybug write worker. index_mail is a deprecation
shim that rebuilds via --with-mail.
28 lines
980 B
Bash
Executable File
28 lines
980 B
Bash
Executable File
#!/usr/bin/env bash
|
||
# bin/docker-entrypoint - run 2dph tools inside the container.
|
||
#
|
||
# brain shell (default)
|
||
# brain search <q> bin/brain/search.go
|
||
# brain index bin/kb/index --with-mail
|
||
# brain watch <dir> compiled /app/bin/watch (bin/brain/watch.go)
|
||
# brain serve compiled /app/bin/serve (bin/brain/serve.go)
|
||
# brain extract bin/facts/extract (docker×compose pairing)
|
||
# brain audit bin/facts/audit
|
||
#
|
||
# Usage comment starts at line 2 (self-describing convention).
|
||
set -euo pipefail
|
||
|
||
CMD="${1:-shell}"
|
||
shift || true
|
||
|
||
case "$CMD" in
|
||
shell) exec bash ;;
|
||
search) exec "$KB_PY" /app/bin/kb/search "$@" ;;
|
||
index) exec "$KB_PY" /app/bin/kb/index --with-mail "$@" ;;
|
||
watch) exec /app/bin/watch "$@" ;;
|
||
serve) exec /app/bin/serve "$@" ;;
|
||
extract) exec "$KB_PY" /app/bin/facts/extract "$@" ;;
|
||
audit) exec "$KB_PY" /app/bin/facts/audit "$@" ;;
|
||
*) echo "unknown command: $CMD" >&2; exit 2 ;;
|
||
esac
|