packaging: bin/aish wrapper + examples/config.lua + LICENSE for v0.1.0 release

main.lua now resolves package.path relative to its own script directory
rather than cwd, so the packaged install at /usr/share/lua/5.1/aish/
finds its siblings regardless of where the user invokes aish from. Dev
mode (luajit main.lua from the repo root) is preserved: arg[0] is
"main.lua" with no "/" so the regex returns nil and _dir falls back to
"./" — identical to the previous behavior.

bin/aish is a POSIX-sh wrapper that execs luajit against $AISH_LIB/main.lua
(default /usr/share/lua/5.1/aish). The AISH_LIB env override lets users
point at a dev checkout without uninstalling the package. Wrapper emits
distinct errors when AISH_LIB is missing or when luajit isn't on PATH so
broken installs surface clearly instead of through a bare sh: not found.

examples/config.lua is the canonical commented reference, shipped at
/usr/share/doc/aish/examples/config.lua. Stripped of the two live MCP
bearer tokens carried by the in-tree config.lua and switched to the
auth_env env-var indirection form; mcp.servers entries are commented
out so a copy-to-~/.config/aish/config.lua produces a working starting
point on first uncomment. HOSSENFELDER URL flagged as maintainer-LAN.

LICENSE: MIT, copyright 2026 Markus Fritsche. README updated to match.

Sonnet review of the changeset (per feedback_reviews_use_sonnet.md +
bugfix-process step 4): no blockers; the two Important findings (USAGE
text still said "luajit main.lua", bin/aish didn't pre-check luajit)
and one Nit (unredacted HOSSENFELDER URL) were folded in before commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-25 00:21:55 +02:00
parent ff5a545404
commit 8fb5954bc5
5 changed files with 543 additions and 6 deletions
Executable
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
# aish — AI-augmented conversational shell launcher.
# Source of truth: git.reauktion.de/marfrit/aish
#
# Installed by the aish package at /usr/bin/aish; execs LuaJIT against
# the packaged main.lua under $AISH_LIB (default /usr/share/lua/5.1/aish).
#
# Dev mode: AISH_LIB=$HOME/src/aish aish ...
AISH_LIB="${AISH_LIB:-/usr/share/lua/5.1/aish}"
if [ ! -r "$AISH_LIB/main.lua" ]; then
echo "aish: $AISH_LIB/main.lua not found." >&2
echo "aish: set AISH_LIB to the directory containing main.lua." >&2
exit 2
fi
if ! command -v luajit >/dev/null 2>&1; then
echo "aish: luajit not found in PATH. Install luajit." >&2
exit 2
fi
exec luajit "$AISH_LIB/main.lua" "$@"