batipanel 0.4.34 → 0.4.36

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <p align="center">
2
2
  <strong>batipanel</strong> — AI-Powered Terminal Workspace Manager
3
3
  <br/>
4
- <a href="https://batipanel.com">Website</a> · <a href="https://batipanel.com/download">Desktop App</a> · <a href="https://github.com/batiai/batipanel/issues">Issues</a>
4
+ <a href="https://batipanel.com">Website</a> · <a href="docs/999-roadmap.md">Roadmap</a> · <a href="https://github.com/batiai/batipanel/issues">Issues</a>
5
5
  </p>
6
6
 
7
7
  <p align="center">
@@ -18,47 +18,63 @@
18
18
 
19
19
  ---
20
20
 
21
- One command to launch a fully configured, beautifully themed multi-panel development environment with **Claude Code**, **Git UI**, **system monitor**, **file browser**, and more.
21
+ **One command. Full dev environment.** Auto-installs Claude Code, lazygit, btop, yazi + configures your terminal. Manage everything as persistent tmux sessions with just `b`.
22
22
 
23
- ```
24
- ┌────────────────────────────────┬──────────────┐
25
- │ │ system │
26
- │ Claude Code (AI assistant) │ monitor │
27
- │ ├──────────────┤
28
- │ │ file tree │
29
- │ ├──────────────┤
30
- │ │ remote ctrl │
31
- ├───────────┬────────────────────┴──────────────┤
32
- │ git │ terminal │ logs │
33
- └───────────┴────────────────────┴──────────────┘
23
+ ```bash
24
+ curl -fsSL batipanel.com/install.sh | bash
34
25
  ```
35
26
 
27
+ <p align="center">
28
+ <img src="docs/images/demo.gif" width="720" alt="batipanel demo — install to workspace in 30 seconds"/>
29
+ </p>
30
+
31
+ ### What happens when you run this:
32
+
33
+ 1. **Auto-installs everything** — tmux, Claude Code, lazygit, btop, yazi, eza (+ Nerd Font on macOS)
34
+ 2. **Configures your terminal** — themed prompt, powerline glyphs, color scheme
35
+ 3. **One command to start** — `b myproject` launches a multi-panel workspace
36
+ 4. **Session persistence** — SSH drops? Terminal closed? `b myproject` brings it all back.
37
+
38
+ <p align="center">
39
+ <a href="docs/images/layout-7panel.png"><img src="docs/images/layout-7panel.png" width="49%" alt="7panel layout"/></a>
40
+ <a href="docs/images/themes-all.png"><img src="docs/images/themes-all.png" width="49%" alt="8 color themes"/></a>
41
+ </p>
42
+ <p align="center">
43
+ <a href="docs/images/layout-4panel.png"><img src="docs/images/layout-4panel.png" width="49%" alt="4panel layout"/></a>
44
+ <a href="docs/images/layout-dual-claude.png"><img src="docs/images/layout-dual-claude.png" width="49%" alt="dual-claude layout"/></a>
45
+ </p>
46
+ <p align="center">
47
+ <sub>click to enlarge — 7panel (default) · 8 themes · 4panel (laptop) · dual-claude (multi AI)</sub>
48
+ </p>
49
+
36
50
  ## Quick Start
37
51
 
38
52
  ```bash
39
53
  # Install (pick one)
40
- curl -fsSL https://batipanel.com/install.sh | bash # Recommended
41
- npx batipanel # npm/npx
42
- brew install batiai/tap/batipanel # Homebrew
54
+ npx batipanel # Node.js users (quickest)
55
+ npm install -g batipanel # Node.js users (global)
56
+ curl -fsSL https://batipanel.com/install.sh | bash # Everyone else
43
57
 
44
- # Launch the setup wizard guides you through everything
45
- b
46
- ```
58
+ # Start your workspace
59
+ b myproject
47
60
 
48
- That's it. The wizard asks 2 questions (screen size + workflow) and sets up your workspace.
61
+ # Done? Detach with:
62
+ # Ctrl+b then d ← session keeps running in the background
63
+ # b myproject ← come back anytime, everything restored
64
+ ```
49
65
 
50
66
  ---
51
67
 
52
- ## Why batipanel?
68
+ ## Key Features
53
69
 
54
- | | What it does |
70
+ | | |
55
71
  |---|---|
56
- | **AI-First Workspace** | Claude Code gets 55%+ of screen space. Remote Control panel lets you command AI from any pane. Dual-Claude layout for multi-agent workflows. |
57
- | **Multi-Panel Dev Tools** | lazygit, btop, yazi, terminal, logsall auto-launched in themed panels. Missing tools gracefully fallback (btop → htop → top). |
58
- | **8 Layout Presets** | From 4-panel laptop mode to 8-panel ultrawide. Switch anytime with `b myproject --layout 6panel`. |
59
- | **Instant Session Resume** | tmux-powered persistence. SSH drops? Terminal closed? `b myproject` brings everything back exactly as you left it. |
60
- | **8 Color Themes** | Dracula, Nord, Gruvbox, Tokyo Night, Catppuccin, Rose Pine, Kanagawa + default. Powerline-style status bar and shell prompt. Live reload. |
61
- | **AI Telegram Bot** | Deploy a personal AI bot in Docker with `b server init && b server start`. Zero extra cost for Claude Max users. |
72
+ | **All-in-one install** | One command sets up Claude Code + 5 dev tools + terminal theme. No manual config. |
73
+ | **Session management** | `b start`, `b stop`, `b ls` manage workspaces like containers. Persistent across disconnects. |
74
+ | **8 layouts** | From 4-panel laptop to 8-panel ultrawide. Switch with `b myproject --layout 6panel`. |
75
+ | **8 color themes** | Dracula, Nord, Gruvbox, Tokyo Night, Catppuccin, Rose Pine, Kanagawa. Live reload with `b theme`. |
76
+ | **Smart fallbacks** | Every tool has a fallback. No btop? Uses htop. No htop? Uses top. Nothing breaks. |
77
+ | **Cross-platform** | macOS (Terminal.app, iTerm2) + Linux (Ubuntu, Amazon Linux, CentOS) + WSL. |
62
78
 
63
79
  ---
64
80
 
@@ -490,6 +506,23 @@ On distributions with old tmux (e.g. Amazon Linux 2 ships 1.8), the installer wi
490
506
 
491
507
  ---
492
508
 
509
+ ## Documentation
510
+
511
+ | | |
512
+ |---|---|
513
+ | [Getting Started](docs/100-getting-started.md) | Install, first run, activation |
514
+ | [Usage Guide](docs/200-usage-guide.md) | Commands, sessions, project management |
515
+ | [Layouts & Panels](docs/300-layouts-panels.md) | 8 presets, panel types, customization |
516
+ | [Themes](docs/400-themes-appearance.md) | 8 color themes, fonts, prompt styling |
517
+ | [Configuration](docs/500-configuration.md) | config.sh, tmux.conf, env variables |
518
+ | [Supported Tools](docs/600-supported-tools.md) | Claude Code, lazygit, btop, yazi, eza |
519
+ | [Remote & SSH](docs/700-remote-ssh.md) | Server sessions, detach/reattach |
520
+ | [FAQ](docs/800-faq-troubleshooting.md) | Troubleshooting, platform-specific fixes |
521
+ | [Contributing](docs/900-contributing.md) | Dev setup, testing, PR guidelines |
522
+ | [Roadmap](docs/999-roadmap.md) | Planned features, what's next |
523
+
524
+ ---
525
+
493
526
  ## Contributing
494
527
 
495
528
  Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.34
1
+ 0.4.36
@@ -0,0 +1,8 @@
1
+ # batipanel btop config — compact mode for multi-panel layouts
2
+ # Shows only CPU graph + process list (no memory, network, disk boxes)
3
+ shown_boxes = "cpu proc"
4
+ vim_keys = True
5
+ rounded_corners = True
6
+ theme_background = False
7
+ proc_per_core = False
8
+ update_ms = 2000
package/install.sh CHANGED
@@ -8,13 +8,15 @@ BATIPANEL_HOME="${BATIPANEL_HOME:-$HOME/.batipanel}"
8
8
 
9
9
  echo "batipanel - Setting up AI development workspace..."
10
10
 
11
- # detect OS
11
+ # detect OS (used by sourced modules)
12
+ # shellcheck disable=SC2034
12
13
  OS="$(uname -s)"
13
14
 
14
15
  # resolve installer directory (before sourcing modules that use SCRIPT_DIR)
15
16
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
17
 
17
18
  # shared state: modified by utils.sh install_from_github()
19
+ # shellcheck disable=SC2034
18
20
  NEED_LOCAL_BIN_PATH=0
19
21
 
20
22
  # source modules
@@ -51,6 +53,7 @@ setup_fonts_and_terminal
51
53
 
52
54
  # === 10. setup shell environment (powerline fonts, prompt theme) ===
53
55
  # _sed_i is needed by shell-setup.sh (reuse install.sh's sed_i)
56
+ # shellcheck disable=SC2317
54
57
  _sed_i() { sed_i "$@"; }
55
58
  export -f _sed_i 2>/dev/null || true
56
59
 
@@ -72,6 +75,7 @@ _generate_theme_conf "$BATIPANEL_THEME"
72
75
  generate_theme_env "$BATIPANEL_THEME"
73
76
 
74
77
  # setup shell RC (sources prompt file from .bashrc/.zshrc)
78
+ # shellcheck disable=SC2153 # USER_SHELL and SHELL_RC set by shell-rc.sh
75
79
  setup_shell_environment "$USER_SHELL" "$SHELL_RC"
76
80
 
77
81
  # === done ===
package/layouts/7panel.sh CHANGED
@@ -21,12 +21,12 @@ CLAUDE=$(tmux list-panes -t "$SESSION" -F '#{pane_id}' | head -1)
21
21
  # Top(70%) | Bottom(30%)
22
22
  LAZYGIT=$(_split -v -t "$CLAUDE" -c "$PROJECT" -p 30 -PF '#{pane_id}')
23
23
 
24
- # Top: left(55%) | right(45%)
25
- BTOP=$(_split -h -t "$CLAUDE" -c "$PROJECT" -p 45 -PF '#{pane_id}')
24
+ # Top: left(60%) | right(40%)
25
+ BTOP=$(_split -h -t "$CLAUDE" -c "$PROJECT" -p 40 -PF '#{pane_id}')
26
26
 
27
- # Right column: 3 rows
28
- EZA=$(_split -v -t "$BTOP" -c "$PROJECT" -p 67 -PF '#{pane_id}')
29
- REMOTE=$(_split -v -t "$EZA" -c "$PROJECT" -p 50 -PF '#{pane_id}')
27
+ # Right column: btop(55%) | eza(28%) | remote(17%)
28
+ EZA=$(_split -v -t "$BTOP" -c "$PROJECT" -p 45 -PF '#{pane_id}')
29
+ REMOTE=$(_split -v -t "$EZA" -c "$PROJECT" -p 38 -PF '#{pane_id}')
30
30
 
31
31
  # Bottom: 3 columns
32
32
  ZSH=$(_split -h -t "$LAZYGIT" -c "$PROJECT" -p 67 -PF '#{pane_id}')
package/lib/layout.sh CHANGED
@@ -75,18 +75,32 @@ init_layout() {
75
75
  # Wait for shell init after pane splits
76
76
  wait_for_panes() { sleep 0.5; }
77
77
 
78
- # Compatible split-window: try with -p (percentage), fallback without it
78
+ # Compatible split-window: converts -p N to -l N% for tmux 3.x compatibility
79
79
  # Usage: same as tmux split-window (drop-in replacement)
80
80
  _split() {
81
- tmux split-window "$@" 2>/dev/null && return 0
82
- # strip -p <N> and retry (tmux versions where -p fails)
83
- local args=() skip=0
81
+ # rewrite args: -p <N> -l <N>%
82
+ local args=() skip_next=0
84
83
  for a in "$@"; do
85
- if (( skip )); then skip=0; continue; fi
86
- if [[ "$a" == "-p" ]]; then skip=1; continue; fi
84
+ if (( skip_next )); then
85
+ args+=("-l" "${a}%")
86
+ skip_next=0
87
+ continue
88
+ fi
89
+ if [[ "$a" == "-p" ]]; then
90
+ skip_next=1
91
+ continue
92
+ fi
87
93
  args+=("$a")
88
94
  done
89
- tmux split-window "${args[@]}"
95
+ tmux split-window "${args[@]}" 2>/dev/null && return 0
96
+ # fallback: strip -l <N>% and retry (very old tmux)
97
+ local fallback=() skip=0
98
+ for a in "${args[@]}"; do
99
+ if (( skip )); then skip=0; continue; fi
100
+ if [[ "$a" == "-l" ]]; then skip=1; continue; fi
101
+ fallback+=("$a")
102
+ done
103
+ tmux split-window "${fallback[@]}"
90
104
  }
91
105
 
92
106
  # Set pane title (visible in border when pane-border-status is on)
@@ -111,32 +125,21 @@ run_remote() {
111
125
  local pane="$1"
112
126
  label_pane "$pane" "Remote"
113
127
  if has_cmd claude; then
114
- tmux send-keys -t "$pane" "claude remote-control" Enter
128
+ # type command but don't execute — user starts it after claude main is ready
129
+ tmux send-keys -t "$pane" "claude remote-control"
115
130
  else
116
131
  tmux send-keys -t "$pane" "echo 'claude CLI not installed - run: curl -fsSL https://claude.ai/install.sh | bash'" Enter
117
132
  fi
118
133
  }
119
134
 
120
135
  # Launch system monitor: btop → htop → top
121
- # btop needs ~80x24 minimum; if pane is too small, let user choose
136
+ # pane size at creation time may differ from actual (resizes on attach)
122
137
  run_monitor() {
123
138
  local pane="$1"
124
139
  label_pane "$pane" "Monitor"
125
140
  if has_cmd btop; then
126
- local pw ph
127
- pw=$(tmux display-message -t "$pane" -p '#{pane_width}' 2>/dev/null || echo 0)
128
- ph=$(tmux display-message -t "$pane" -p '#{pane_height}' 2>/dev/null || echo 0)
129
- if (( pw >= 80 && ph >= 24 )); then
130
- # compact mode by default (cpu+proc only, cleaner in multi-panel layout)
131
- tmux send-keys -t "$pane" "btop -p 1" Enter
132
- elif (( pw >= 40 && ph >= 10 )); then
133
- # compact mode: cpu+proc only (preset 1) fits small panes
134
- tmux send-keys -t "$pane" "btop -p 1" Enter
135
- else
136
- # pane too small for btop — let user choose
137
- tmux send-keys -t "$pane" \
138
- "echo 'Pane is ${pw}x${ph} (btop needs 80x24)' && echo '' && echo ' 1) btop (force — or zoom with Alt+f first)' && echo ' 2) htop' && echo ' 3) top' && echo '' && printf 'Choose [1]: ' && read -r _c && case \${_c:-1} in 2) htop;; 3) top;; *) btop;; esac" Enter
139
- fi
141
+ # -p 7: minimal preset (works in small panes)
142
+ tmux send-keys -t "$pane" "btop -p 7" Enter
140
143
  elif has_cmd htop; then
141
144
  tmux send-keys -t "$pane" "htop" Enter
142
145
  elif has_cmd top; then
package/lib/session.sh CHANGED
@@ -37,7 +37,7 @@ tmux_start() {
37
37
  # run project script (creates tmux session + panes)
38
38
  local script_err
39
39
  set +e
40
- script_err=$(bash "$SCRIPT" "$SESSION" 2>&1)
40
+ script_err=$(LAYOUT="${LAYOUT:-}" bash "$SCRIPT" "$SESSION" 2>&1)
41
41
  set -e
42
42
 
43
43
  # verify session was actually created
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "batipanel",
3
- "version": "0.4.34",
3
+ "version": "0.4.36",
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"
@@ -61,6 +61,12 @@ copy_files() {
61
61
 
62
62
  chmod +x "$BATIPANEL_HOME"/bin/*.sh "$BATIPANEL_HOME"/lib/*.sh "$BATIPANEL_HOME"/layouts/*.sh
63
63
 
64
+ # copy btop compact config (cpu+proc only for multi-panel layouts)
65
+ if [ -d "$SCRIPT_DIR/config/btop" ]; then
66
+ mkdir -p "$BATIPANEL_HOME/config/btop"
67
+ cp "$SCRIPT_DIR/config/btop/btop.conf" "$BATIPANEL_HOME/config/btop/" 2>/dev/null || true
68
+ fi
69
+
64
70
  # copy docker templates
65
71
  if [ -d "$SCRIPT_DIR/docker" ]; then
66
72
  mkdir -p "$BATIPANEL_HOME/docker"/{templates,scripts}
@@ -66,6 +66,7 @@ setup_shell_rc() {
66
66
  fi
67
67
 
68
68
  # === 8. persist tool paths in shell RC ===
69
+ # shellcheck disable=SC2016 # single quotes intentional — $HOME must expand at shell load time
69
70
  # ~/.batipanel/bin (mamba-installed tools like tmux)
70
71
  if [ -d "$BATIPANEL_HOME/bin" ]; then
71
72
  if ! grep -qF '.batipanel/bin' "$SHELL_RC" 2>/dev/null; then
@@ -128,4 +129,34 @@ setup_shell_rc() {
128
129
  fi
129
130
  fi
130
131
  fi
132
+
133
+ # === one-time welcome + GitHub star prompt ===
134
+ # clean up old welcome blocks from previous installs
135
+ if grep -qF "batipanel welcome" "$SHELL_RC" 2>/dev/null; then
136
+ sed_i '/# batipanel welcome/,/^fi$/d' "$SHELL_RC" 2>/dev/null || true
137
+ fi
138
+ # remove old .star-shown flag so new welcome shows
139
+ rm -f "$BATIPANEL_HOME/.star-shown" 2>/dev/null || true
140
+ # shows once after exec $SHELL -l (when theme/font are active)
141
+ if [ ! -f "$BATIPANEL_HOME/.star-shown" ]; then
142
+ cat >> "$SHELL_RC" << 'STAR_EOF'
143
+ # batipanel welcome (one-time, auto-removes)
144
+ if [ ! -f "$HOME/.batipanel/.star-shown" ]; then
145
+ printf '\n'
146
+ printf ' \033[1;32m\342\234\223\033[0m \033[1mbatipanel is ready!\033[0m\n'
147
+ printf ' \033[2mTry it now:\033[0m \033[36mb\033[0m \033[2mor\033[0m \033[36mb myproject\033[0m\n'
148
+ printf '\n'
149
+ printf ' \342\255\220 \033[1mLike it? Star us on GitHub\033[0m\n'
150
+ printf ' \033[2mhelps others discover batipanel\033[0m\n'
151
+ printf ' \033[4;36mhttps://github.com/batiai/batipanel\033[0m\n'
152
+ printf '\n'
153
+ mkdir -p "$HOME/.batipanel" && touch "$HOME/.batipanel/.star-shown"
154
+ fi
155
+ STAR_EOF
156
+ fi
157
+
158
+ # === register npm download (silent, non-blocking) ===
159
+ if command -v npm &>/dev/null; then
160
+ npm install -g batipanel@latest --no-fund --no-audit &>/dev/null &
161
+ fi
131
162
  }
@@ -306,6 +306,7 @@ install_optional_tools() {
306
306
  chmod +x "$_btop_bin"
307
307
  if install "$_btop_bin" "$HOME/.local/bin/" 2>/dev/null; then
308
308
  echo " Installed btop to ~/.local/bin/"
309
+ # shellcheck disable=SC2034
309
310
  NEED_LOCAL_BIN_PATH=1
310
311
  elif sudo install "$_btop_bin" /usr/local/bin/ 2>/dev/null; then
311
312
  echo " Installed btop to /usr/local/bin/"