batipanel 0.4.34 → 0.4.35
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 +49 -20
- package/VERSION +1 -1
- package/config/btop/btop.conf +8 -0
- package/install.sh +5 -1
- package/layouts/7panel.sh +2 -2
- package/lib/layout.sh +26 -23
- package/package.json +1 -1
- package/scripts/install/files.sh +6 -0
- package/scripts/install/shell-rc.sh +31 -0
- package/scripts/install/tools.sh +1 -0
package/README.md
CHANGED
|
@@ -18,47 +18,59 @@
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
One command
|
|
21
|
+
**One command. Full dev environment.** Install Claude Code, Git UI, system monitor, file browser — and manage them all as tmux sessions with a single keystroke.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -fsSL batipanel.com/install.sh | bash
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
<!-- GIF: before/after demo on a fresh Linux server -->
|
|
28
|
+
<!-- <p align="center"><img src="docs/demo.gif" width="720" alt="batipanel demo"/></p> -->
|
|
29
|
+
|
|
30
|
+
### What happens when you run this:
|
|
31
|
+
|
|
32
|
+
1. **Auto-installs everything** — tmux, Claude Code, lazygit, btop, yazi, eza (+ Nerd Font on macOS)
|
|
33
|
+
2. **Configures your terminal** — themed prompt, powerline glyphs, color scheme
|
|
34
|
+
3. **One command to start** — `b myproject` launches a multi-panel workspace:
|
|
22
35
|
|
|
23
36
|
```
|
|
24
37
|
┌────────────────────────────────┬──────────────┐
|
|
25
|
-
│ │
|
|
26
|
-
│
|
|
27
|
-
│
|
|
28
|
-
│ │ file tree │
|
|
38
|
+
│ │ monitor │
|
|
39
|
+
│ Claude Code (AI) ├──────────────┤
|
|
40
|
+
│ │ file tree │
|
|
29
41
|
│ ├──────────────┤
|
|
30
42
|
│ │ remote ctrl │
|
|
31
43
|
├───────────┬────────────────────┴──────────────┤
|
|
32
|
-
│
|
|
44
|
+
│ git │ terminal │ logs │
|
|
33
45
|
└───────────┴────────────────────┴──────────────┘
|
|
34
46
|
```
|
|
35
47
|
|
|
48
|
+
4. **Session persistence** — SSH drops? Terminal closed? `b myproject` brings it all back.
|
|
49
|
+
|
|
36
50
|
## Quick Start
|
|
37
51
|
|
|
38
52
|
```bash
|
|
39
53
|
# Install (pick one)
|
|
40
54
|
curl -fsSL https://batipanel.com/install.sh | bash # Recommended
|
|
41
|
-
|
|
42
|
-
|
|
55
|
+
npm install -g batipanel # npm
|
|
56
|
+
npx batipanel # npx (no install)
|
|
43
57
|
|
|
44
|
-
#
|
|
45
|
-
b
|
|
58
|
+
# Start your workspace
|
|
59
|
+
b myproject
|
|
46
60
|
```
|
|
47
61
|
|
|
48
|
-
That's it. The wizard asks 2 questions (screen size + workflow) and sets up your workspace.
|
|
49
|
-
|
|
50
62
|
---
|
|
51
63
|
|
|
52
|
-
##
|
|
64
|
+
## Key Features
|
|
53
65
|
|
|
54
|
-
| |
|
|
66
|
+
| | |
|
|
55
67
|
|---|---|
|
|
56
|
-
| **
|
|
57
|
-
| **
|
|
58
|
-
| **8
|
|
59
|
-
| **
|
|
60
|
-
| **
|
|
61
|
-
| **
|
|
68
|
+
| **All-in-one install** | One command sets up Claude Code + 5 dev tools + terminal theme. No manual config. |
|
|
69
|
+
| **Session management** | `b start`, `b stop`, `b ls` — manage workspaces like containers. Persistent across disconnects. |
|
|
70
|
+
| **8 layouts** | From 4-panel laptop to 8-panel ultrawide. Switch with `b myproject --layout 6panel`. |
|
|
71
|
+
| **8 color themes** | Dracula, Nord, Gruvbox, Tokyo Night, Catppuccin, Rose Pine, Kanagawa. Live reload with `b theme`. |
|
|
72
|
+
| **Smart fallbacks** | Every tool has a fallback. No btop? Uses htop. No htop? Uses top. Nothing breaks. |
|
|
73
|
+
| **Cross-platform** | macOS (Terminal.app, iTerm2) + Linux (Ubuntu, Amazon Linux, CentOS) + WSL. |
|
|
62
74
|
|
|
63
75
|
---
|
|
64
76
|
|
|
@@ -490,6 +502,23 @@ On distributions with old tmux (e.g. Amazon Linux 2 ships 1.8), the installer wi
|
|
|
490
502
|
|
|
491
503
|
---
|
|
492
504
|
|
|
505
|
+
## Documentation
|
|
506
|
+
|
|
507
|
+
| | |
|
|
508
|
+
|---|---|
|
|
509
|
+
| [Getting Started](docs/100-getting-started.md) | Install, first run, activation |
|
|
510
|
+
| [Usage Guide](docs/200-usage-guide.md) | Commands, sessions, project management |
|
|
511
|
+
| [Layouts & Panels](docs/300-layouts-panels.md) | 8 presets, panel types, customization |
|
|
512
|
+
| [Themes](docs/400-themes-appearance.md) | 8 color themes, fonts, prompt styling |
|
|
513
|
+
| [Configuration](docs/500-configuration.md) | config.sh, tmux.conf, env variables |
|
|
514
|
+
| [Supported Tools](docs/600-supported-tools.md) | Claude Code, lazygit, btop, yazi, eza |
|
|
515
|
+
| [Remote & SSH](docs/700-remote-ssh.md) | Server sessions, detach/reattach |
|
|
516
|
+
| [FAQ](docs/800-faq-troubleshooting.md) | Troubleshooting, platform-specific fixes |
|
|
517
|
+
| [Contributing](docs/900-contributing.md) | Dev setup, testing, PR guidelines |
|
|
518
|
+
| [Roadmap](docs/999-roadmap.md) | Planned features, what's next |
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
493
522
|
## Contributing
|
|
494
523
|
|
|
495
524
|
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.4.
|
|
1
|
+
0.4.35
|
|
@@ -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,8 +21,8 @@ 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(
|
|
25
|
-
BTOP=$(_split -h -t "$CLAUDE" -c "$PROJECT" -p
|
|
24
|
+
# Top: left(60%) | right(40%)
|
|
25
|
+
BTOP=$(_split -h -t "$CLAUDE" -c "$PROJECT" -p 40 -PF '#{pane_id}')
|
|
26
26
|
|
|
27
27
|
# Right column: 3 rows
|
|
28
28
|
EZA=$(_split -v -t "$BTOP" -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:
|
|
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
|
-
|
|
82
|
-
|
|
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 ((
|
|
86
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
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
|
-
|
|
127
|
-
|
|
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/package.json
CHANGED
package/scripts/install/files.sh
CHANGED
|
@@ -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
|
}
|
package/scripts/install/tools.sh
CHANGED
|
@@ -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/"
|