Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

1.4 KB
Raw Blame
#!/bin/sh
. /usr/lib/harness-os/runtime-path
# The OS already supervises the daemon. Run the native client directly instead
# of keeping a second Node process resident for the lifetime of the screen.
export HARNESS_CLI=/usr/bin/harness
export HARNESS_CLI_ARGS='[]'
# This computer's working tabs survive sign-out and temporary network outages.
# hn's ordinary local sessions retain their complete pane references.
# Signed in, these windows join the account's shared tabs as in the desktop app;
# on sign-out, the harnesses running on this computer stay. A screen unit that
# sets HARNESS_TUI_DESK_SIGNED_IN (a test computer on a shared account) keeps it.
export HARNESS_TUI_DESK=off HARNESS_TUI_DESK_SIGNED_IN="${HARNESS_TUI_DESK_SIGNED_IN-sync}"
if [ ! -f "$HOME/.local/state/harness-os/onboarded" ]; then
    export HARNESS_OS_FIRST_USE=1
else
    unset HARNESS_OS_FIRST_USE
fi
if [ -f /etc/harness-live ]; then
    export HARNESS_OS_LIVE=1
    export HARNESS_TUI_TMUX_CONF=/usr/share/harness-os/tmux-live.conf
else
    unset HARNESS_OS_LIVE
fi
# The OS connects before launching its interactive TUI. Commands sent to an
# existing client must never open a form or wait for a network connection.
if [ "${HARNESS_OS:-}" = 1 ] && [ "$#" -eq 0 ] && [ -t 0 ] && [ ! -f /etc/harness-live ]; then
    /usr/bin/python3 /usr/lib/harness-os/onboarding.py --prepare || exit "$?"
fi
exec "$harness_runtime/hn" "$@"