mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-10 07:02:29 +02:00
Add persistent tmux terminal shell
This commit is contained in:
15
claude_desktop/rootfs/usr/local/bin/claude-terminal-shell
Normal file
15
claude_desktop/rootfs/usr/local/bin/claude-terminal-shell
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
export HOME="${HOME:-/data/data}"
|
||||
export PATH="${HOME}/.local/bin:/usr/local/bin:/usr/bin:/bin:${PATH:-}"
|
||||
|
||||
workspace="${CLAUDE_TERMINAL_WORKSPACE:-${HOME}/workspace}"
|
||||
session_name="${CLAUDE_TMUX_SESSION:-claude}"
|
||||
|
||||
mkdir -p "$workspace"
|
||||
cd "$workspace"
|
||||
|
||||
# Reattach every browser connection to the same terminal session. Closing the browser detaches
|
||||
# the client but leaves Claude Code and other commands running inside tmux.
|
||||
exec tmux new-session -A -s "$session_name"
|
||||
Reference in New Issue
Block a user