mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-13 20:08:05 +08:00
14 lines
356 B
Bash
Executable File
14 lines
356 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
if [ "$#" -ne 1 ] || [ -z "$1" ]; then
|
|
echo "usage: kai-session-launch WORKING_DIRECTORY" >&2
|
|
exit 2
|
|
fi
|
|
|
|
cd "$1"
|
|
OPENCODE_PASSWORD="$(cat "${KAI_ENGINE_PASSWORD_FILE:?missing KAI engine credential file}")"
|
|
[ -n "$OPENCODE_PASSWORD" ] || exit 1
|
|
export OPENCODE_PASSWORD
|
|
exec /usr/sbin/kai_session serve --port 8196 --hostname 127.0.0.1
|