batipanel 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/VERSION +1 -1
  2. package/install.sh +73 -25
  3. package/package.json +1 -1
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.6
1
+ 0.4.7
package/install.sh CHANGED
@@ -63,39 +63,75 @@ install_packages() {
63
63
  fi
64
64
  }
65
65
 
66
+ # install tmux via micromamba (no admin required, works on any macOS/Linux)
67
+ # uses conda-forge packages installed to ~/.batipanel/.mamba
68
+ install_via_mamba() {
69
+ local pkg="$1"
70
+ local mamba_root="$BATIPANEL_HOME/.mamba"
71
+ local mamba_bin="$mamba_root/bin/micromamba"
72
+
73
+ # install micromamba if not present
74
+ if [ ! -x "$mamba_bin" ]; then
75
+ echo " Setting up package manager (no admin required)..."
76
+ mkdir -p "$mamba_root/bin"
77
+ local platform
78
+ case "$OS" in
79
+ Darwin)
80
+ case "$(uname -m)" in
81
+ arm64) platform="osx-arm64" ;;
82
+ *) platform="osx-64" ;;
83
+ esac
84
+ ;;
85
+ *)
86
+ case "$(uname -m)" in
87
+ aarch64|arm64) platform="linux-aarch64" ;;
88
+ ppc64le) platform="linux-ppc64le" ;;
89
+ *) platform="linux-64" ;;
90
+ esac
91
+ ;;
92
+ esac
93
+ if ! curl -fsSL "https://micro.mamba.pm/api/micromamba/${platform}/latest" \
94
+ | tar xj -C "$mamba_root/bin" --strip-components=1 bin/micromamba 2>/dev/null; then
95
+ echo " Failed to download micromamba"
96
+ return 1
97
+ fi
98
+ chmod +x "$mamba_bin"
99
+ fi
100
+
101
+ # install package into base environment
102
+ echo " Installing $pkg..."
103
+ "$mamba_bin" install -r "$mamba_root" -n base -c conda-forge -y "$pkg" 2>/dev/null || return 1
104
+
105
+ # symlink binary to ~/.batipanel/bin/ for easy PATH access
106
+ local installed_bin="$mamba_root/bin/$pkg"
107
+ if [ ! -f "$installed_bin" ]; then
108
+ installed_bin=$(find "$mamba_root" -name "$pkg" -type f -executable 2>/dev/null | head -1)
109
+ fi
110
+ if [ -n "$installed_bin" ] && [ -f "$installed_bin" ]; then
111
+ mkdir -p "$BATIPANEL_HOME/bin"
112
+ ln -sf "$installed_bin" "$BATIPANEL_HOME/bin/$pkg"
113
+ export PATH="$BATIPANEL_HOME/bin:$PATH"
114
+ echo " Installed $pkg successfully"
115
+ return 0
116
+ fi
117
+ return 1
118
+ }
119
+
66
120
  # required: tmux
67
121
  if ! command -v tmux &>/dev/null; then
68
122
  echo "Installing tmux..."
69
123
  install_packages tmux 2>/dev/null || true
70
124
  fi
71
125
 
126
+ # fallback: install via micromamba (no admin, no package manager needed)
127
+ if ! command -v tmux &>/dev/null; then
128
+ install_via_mamba tmux || true
129
+ fi
130
+
72
131
  if ! command -v tmux &>/dev/null; then
73
132
  echo ""
74
- echo "tmux is required but could not be installed automatically."
75
- echo ""
76
- echo "Install tmux using any of these methods:"
77
- case "$OS" in
78
- Darwin)
79
- echo " # Homebrew (most common)"
80
- echo " brew install tmux"
81
- echo ""
82
- echo " # MacPorts"
83
- echo " sudo port install tmux"
84
- echo ""
85
- echo " # Nix (no admin required)"
86
- echo " curl -L https://nixos.org/nix/install | sh && nix-env -iA nixpkgs.tmux"
87
- ;;
88
- *)
89
- echo " Ubuntu/Debian: sudo apt install tmux"
90
- echo " Fedora/RHEL: sudo dnf install tmux"
91
- echo " Arch: sudo pacman -S tmux"
92
- echo " Alpine: sudo apk add tmux"
93
- echo " openSUSE: sudo zypper install tmux"
94
- echo " Nix: nix-env -iA nixpkgs.tmux"
95
- ;;
96
- esac
97
- echo ""
98
- echo "After installing tmux, re-run this installer."
133
+ echo "tmux is required but could not be installed."
134
+ echo "Please install tmux manually and re-run this installer."
99
135
  exit 1
100
136
  fi
101
137
 
@@ -195,6 +231,10 @@ latest_github_tag() {
195
231
  # ensure tool directories are in PATH for this script
196
232
  NEED_LOCAL_BIN_PATH=0
197
233
  mkdir -p "$HOME/.local/bin"
234
+ case ":$PATH:" in
235
+ *":$BATIPANEL_HOME/bin:"*) ;;
236
+ *) export PATH="$BATIPANEL_HOME/bin:$PATH" ;;
237
+ esac
198
238
  case ":$PATH:" in
199
239
  *":$HOME/.local/bin:"*) ;;
200
240
  *) export PATH="$HOME/.local/bin:$PATH" ;;
@@ -454,6 +494,14 @@ else
454
494
  fi
455
495
 
456
496
  # === 8. persist tool paths in shell RC ===
497
+ # ~/.batipanel/bin (mamba-installed tools like tmux)
498
+ if [ -d "$BATIPANEL_HOME/bin" ]; then
499
+ if ! grep -qF '.batipanel/bin' "$SHELL_RC" 2>/dev/null; then
500
+ echo 'export PATH="$HOME/.batipanel/bin:$PATH"' >> "$SHELL_RC"
501
+ echo " Added ~/.batipanel/bin to PATH ($SHELL_RC)"
502
+ fi
503
+ fi
504
+
457
505
  # ~/.claude/bin (Claude Code native installer location)
458
506
  if [ -d "$HOME/.claude/bin" ]; then
459
507
  if ! grep -qF '.claude/bin' "$SHELL_RC" 2>/dev/null; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "batipanel",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "AI-powered terminal workspace manager — multi-panel tmux layouts with Claude Code, git, monitoring, and more",
5
5
  "bin": {
6
6
  "batipanel": "./bin/cli.sh"