batipanel 0.3.0 → 0.4.0
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 +220 -125
- package/VERSION +1 -1
- package/bin/start.sh +12 -0
- package/docker/docker-compose.yml +39 -0
- package/docker/scripts/healthcheck.sh +13 -0
- package/docker/templates/env.template +17 -0
- package/docker/templates/openclaw.json +20 -0
- package/install.sh +3 -9
- package/lib/common.sh +8 -0
- package/lib/logger.sh +87 -0
- package/lib/server-init.sh +13 -0
- package/lib/server.sh +25 -8
- package/lib/session.sh +3 -1
- package/lib/shell-setup.sh +5 -3
- package/lib/themes-bash.sh +182 -0
- package/lib/themes-data.sh +79 -0
- package/lib/themes-tmux.sh +43 -0
- package/lib/themes.sh +4 -299
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[]()
|
|
8
8
|
|
|
9
|
-
AI-powered terminal workspace manager
|
|
9
|
+
**AI-powered terminal workspace manager.** One command to launch a fully configured, beautifully themed multi-panel development environment.
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
┌────────────────────────────────┬──────────────┐
|
|
@@ -23,6 +23,97 @@ AI-powered terminal workspace manager. One command to launch a fully configured
|
|
|
23
23
|
|
|
24
24
|
> **Looking for a GUI?** [batipanel Desktop](https://batipanel.com/download) is available for macOS and Windows — same multi-panel workspace with a native app experience.
|
|
25
25
|
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Why batipanel?
|
|
29
|
+
|
|
30
|
+
AI 시대의 개발 환경은 달라져야 합니다. Claude Code 같은 AI 어시스턴트, Git UI, 시스템 모니터, 파일 브라우저를 **매번 하나씩 열고 배치하는 건 비효율적**입니다. batipanel은 이 모든 것을 **명령어 한 줄**로 해결합니다.
|
|
31
|
+
|
|
32
|
+
### 1. AI-First Multi-Panel Workspace
|
|
33
|
+
|
|
34
|
+
> AI 시대에 최적화된 개발환경을 명령어 한 줄로 구축
|
|
35
|
+
|
|
36
|
+
#### 1-1. AI Interface (Claude Code + Remote Control)
|
|
37
|
+
|
|
38
|
+
- **Claude Code** 패널이 워크스페이스의 중심 — 55% 이상의 화면을 차지하는 넓은 AI 작업 공간
|
|
39
|
+
- **Remote Control** 패널로 별도 터미널에서 Claude에 명령 전달 (다른 작업 중에도 AI 제어 가능)
|
|
40
|
+
- **Dual-Claude** 레이아웃으로 두 개의 Claude 인스턴스를 동시에 운영 (멀티 에이전트)
|
|
41
|
+
|
|
42
|
+
#### 1-2. Multi-Panel Development Tools
|
|
43
|
+
|
|
44
|
+
- **Git UI** (lazygit) — 시각적 Git 관리, 커밋/브랜치/머지를 한눈에
|
|
45
|
+
- **System Monitor** (btop) — CPU, 메모리, 네트워크 실시간 모니터링
|
|
46
|
+
- **File Browser** (yazi) — 트리 구조 파일 탐색, Nerd Font 아이콘 지원
|
|
47
|
+
- **Terminal** — 범용 쉘, 빌드/테스트 명령 실행
|
|
48
|
+
- **Logs** — `tail -f`, `npm run dev` 등 실시간 로그 모니터링
|
|
49
|
+
|
|
50
|
+
#### 1-3. Smart Layout System
|
|
51
|
+
|
|
52
|
+
화면 크기와 워크플로우에 맞는 **8가지 레이아웃** 제공:
|
|
53
|
+
|
|
54
|
+
| Layout | Panels | Best For |
|
|
55
|
+
|--------|--------|----------|
|
|
56
|
+
| `7panel` (default) | 7 | AI 코딩 + 외장 모니터 |
|
|
57
|
+
| `4panel` | 4 | 노트북 (13-14") |
|
|
58
|
+
| `5panel` | 5 | 균형 잡힌 워크스페이스 |
|
|
59
|
+
| `6panel` | 6 | 일반 개발 + 대형 모니터 |
|
|
60
|
+
| `7panel_log` | 7 | 풀 로그 바 + 개발 |
|
|
61
|
+
| `8panel` | 8 | 듀얼 Claude + 모니터링 |
|
|
62
|
+
| `dual-claude` | 7 | 멀티 AI 에이전트 + 울트라와이드 |
|
|
63
|
+
| `devops` | 5 | Docker/K8s 운영 |
|
|
64
|
+
|
|
65
|
+
각 도구가 없어도 **자동 폴백** — btop -> htop -> top, yazi -> eza -> tree -> find
|
|
66
|
+
|
|
67
|
+
### 2. Instant Session Resume
|
|
68
|
+
|
|
69
|
+
> 언제든 떠나고, 언제든 돌아오는 작업 환경
|
|
70
|
+
|
|
71
|
+
tmux 세션 기반으로 **작업 상태가 완벽히 보존**됩니다:
|
|
72
|
+
|
|
73
|
+
- `b myproject` — 세션이 있으면 즉시 복귀, 없으면 새로 생성
|
|
74
|
+
- AI 대화, Git 상태, 로그 출력 등 **모든 패널의 상태가 그대로** 유지
|
|
75
|
+
- SSH 연결이 끊겨도, 터미널을 닫아도 — 다시 `b myproject` 하면 끝
|
|
76
|
+
- 여러 프로젝트를 동시에 운영하고 `b ls`로 관리
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
b myproject # 작업 시작 (또는 이전 세션 복귀)
|
|
80
|
+
# ... 작업 중 터미널 닫기, SSH 끊김 등 ...
|
|
81
|
+
b myproject # 모든 패널이 그대로 — 바로 이어서 작업
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 3. AI Telegram Bot (OpenClaw) — One-Command Deploy
|
|
85
|
+
|
|
86
|
+
> 격리된 Docker 환경에서 개인 AI 봇을 명령어 한 줄로 배포
|
|
87
|
+
|
|
88
|
+
#### 3-1. Zero-Cost AI for Claude Max Users
|
|
89
|
+
|
|
90
|
+
- Claude Max 구독($200/mo)이 있다면 **추가 API 비용 $0**
|
|
91
|
+
- OpenClaw 게이트웨이가 Claude Max 세션을 활용 — 토큰 과금 없음
|
|
92
|
+
- API 키 방식도 지원 (유량 기반 과금)
|
|
93
|
+
|
|
94
|
+
#### 3-2. Secure by Default — Docker Isolation
|
|
95
|
+
|
|
96
|
+
보안 걱정 없는 **5계층 격리**:
|
|
97
|
+
|
|
98
|
+
| Layer | Protection |
|
|
99
|
+
|-------|-----------|
|
|
100
|
+
| **Container** | Read-only filesystem, dropped Linux capabilities |
|
|
101
|
+
| **Sandbox** | Tool execution in separate containers |
|
|
102
|
+
| **Network** | Loopback binding only (not exposed to LAN) |
|
|
103
|
+
| **Access** | Telegram allowlist (only your user ID) |
|
|
104
|
+
| **Credentials** | File permissions 600, gateway token auto-generated |
|
|
105
|
+
|
|
106
|
+
#### 3-3. 5-Minute Setup
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
b server init # 3단계 대화형 설정 (봇 토큰, AI 모델, 사용자 ID)
|
|
110
|
+
b server start # Docker 서버 시작 — 끝!
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
웹 검색, PDF 분석, 코드 실행, 리포트 생성 등 **풀 AI 에이전트 기능**을 Telegram으로 사용.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
26
117
|
## Quick Start
|
|
27
118
|
|
|
28
119
|
```bash
|
|
@@ -148,129 +239,119 @@ Just type `b` (or `batipanel`). The setup wizard will:
|
|
|
148
239
|
4. Register your current directory as a project
|
|
149
240
|
5. Launch immediately
|
|
150
241
|
|
|
151
|
-
|
|
242
|
+
**Wizard layout mapping:**
|
|
243
|
+
|
|
244
|
+
| Screen | AI Coding | General Dev | DevOps |
|
|
245
|
+
|--------|-----------|-------------|--------|
|
|
246
|
+
| Laptop (small) | 4panel | 4panel | devops |
|
|
247
|
+
| Monitor (large) | 7panel | 6panel | devops |
|
|
248
|
+
| Ultrawide | dual-claude | 7panel_log | devops |
|
|
249
|
+
|
|
250
|
+
### Commands
|
|
251
|
+
|
|
252
|
+
#### Session
|
|
152
253
|
|
|
153
254
|
```bash
|
|
154
255
|
b myproject # Start or resume a project
|
|
155
|
-
b myproject --layout 6panel # Start with a specific layout
|
|
156
|
-
b new myproject ~/path/to/project # Register a new project
|
|
256
|
+
b myproject --layout 6panel # Start with a specific layout (-l shorthand)
|
|
157
257
|
b stop myproject # Stop a session
|
|
158
|
-
b
|
|
159
|
-
b
|
|
160
|
-
b
|
|
161
|
-
b doctor # Check system health
|
|
162
|
-
b help # Show all commands
|
|
258
|
+
b stop myproject -f # Stop without confirmation
|
|
259
|
+
b reload myproject # Restart session (stop + start)
|
|
260
|
+
b reload myproject --layout 8panel # Restart with a different layout
|
|
163
261
|
```
|
|
164
262
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
1. `b myproject` checks if a session already exists
|
|
168
|
-
2. If yes -> reattaches (your work is exactly where you left it)
|
|
169
|
-
3. If no -> creates a new multi-panel session with your chosen layout
|
|
170
|
-
4. Each panel auto-launches its assigned tool
|
|
171
|
-
5. Missing tools gracefully fall back to alternatives (e.g., btop -> htop -> top)
|
|
172
|
-
|
|
173
|
-
---
|
|
263
|
+
#### Project
|
|
174
264
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
```
|
|
180
|
-
You (Telegram) --> Batipanel Server (Docker) --> Claude AI
|
|
181
|
-
chat OpenClaw gateway Opus 4.6
|
|
265
|
+
```bash
|
|
266
|
+
b new myproject ~/path/to/project # Register a new project
|
|
267
|
+
b ls # List active sessions & registered projects
|
|
182
268
|
```
|
|
183
269
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- **5-minute setup** — just 3 questions (bot token, AI model, your Telegram ID)
|
|
187
|
-
- **No API costs** — uses Claude Max subscription ($200/mo unlimited)
|
|
188
|
-
- **Secure by default** — Docker isolation, sandbox, allowlist access
|
|
189
|
-
- **Full AI capabilities** — web search, PDF analysis, code execution, reports
|
|
190
|
-
|
|
191
|
-
### Quick Start
|
|
270
|
+
#### Configuration
|
|
192
271
|
|
|
193
272
|
```bash
|
|
194
|
-
|
|
195
|
-
b
|
|
273
|
+
b config layout 7panel_log # Change default layout
|
|
274
|
+
b config layout # View current default layout
|
|
275
|
+
b theme # List available themes
|
|
276
|
+
b theme dracula # Apply a theme
|
|
277
|
+
b config iterm-cc on # Enable iTerm2 native tmux integration
|
|
278
|
+
```
|
|
196
279
|
|
|
197
|
-
|
|
198
|
-
b server start
|
|
280
|
+
#### System
|
|
199
281
|
|
|
200
|
-
|
|
282
|
+
```bash
|
|
283
|
+
b doctor # Check system health
|
|
284
|
+
b layouts # Show available layouts
|
|
285
|
+
b help # Show all commands
|
|
286
|
+
b --version # Show version
|
|
201
287
|
```
|
|
202
288
|
|
|
203
|
-
|
|
289
|
+
#### Server (AI Telegram Bot)
|
|
204
290
|
|
|
291
|
+
```bash
|
|
292
|
+
b server init # Interactive setup wizard
|
|
293
|
+
b server start # Start the Docker server
|
|
294
|
+
b server stop # Stop the server
|
|
295
|
+
b server status # Show status + security report
|
|
296
|
+
b server logs [-f] # View logs (follow with -f)
|
|
297
|
+
b server update # Pull latest image & restart
|
|
298
|
+
b server config # View configuration (secrets masked)
|
|
205
299
|
```
|
|
206
|
-
$ b server init
|
|
207
300
|
|
|
208
|
-
|
|
301
|
+
#### Global Flags
|
|
209
302
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
303
|
+
| Flag | Description |
|
|
304
|
+
|------|-------------|
|
|
305
|
+
| `--version`, `-v` | Show version |
|
|
306
|
+
| `--debug` | Enable debug logging |
|
|
307
|
+
| `--no-color` | Disable colored output (respects [NO_COLOR](https://no-color.org) standard) |
|
|
214
308
|
|
|
215
|
-
|
|
216
|
-
Use Claude Max subscription (no API cost)? [Y/n]: Y
|
|
217
|
-
✓ Claude Max session detected (no API cost)
|
|
309
|
+
### How It Works
|
|
218
310
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
311
|
+
1. `b myproject` checks if a session already exists
|
|
312
|
+
2. If yes -> reattaches (your work is exactly where you left it)
|
|
313
|
+
3. If no -> creates a new multi-panel session with your chosen layout
|
|
314
|
+
4. Each panel auto-launches its assigned tool
|
|
315
|
+
5. Missing tools gracefully fall back to alternatives (e.g., btop -> htop -> top)
|
|
222
316
|
|
|
223
|
-
|
|
224
|
-
Start the server: b server start
|
|
225
|
-
```
|
|
317
|
+
---
|
|
226
318
|
|
|
227
|
-
|
|
319
|
+
## Color Themes
|
|
320
|
+
|
|
321
|
+
batipanel includes **8 built-in color themes** that style the tmux status bar, window tabs, pane borders, and shell prompt.
|
|
228
322
|
|
|
229
323
|
```bash
|
|
230
|
-
b
|
|
231
|
-
b
|
|
232
|
-
b server stop # Stop the server
|
|
233
|
-
b server status # Show status + security report
|
|
234
|
-
b server logs [-f] # View logs (follow with -f)
|
|
235
|
-
b server update # Pull latest image & restart
|
|
236
|
-
b server config # View configuration (secrets masked)
|
|
324
|
+
b theme # List all themes
|
|
325
|
+
b theme dracula # Apply a theme (live reload)
|
|
237
326
|
```
|
|
238
327
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
|
244
|
-
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
| **Credentials** | File permissions 600, gateway token auto-generated |
|
|
250
|
-
|
|
251
|
-
### AI Model Options
|
|
252
|
-
|
|
253
|
-
| Option | Cost | Setup |
|
|
254
|
-
|--------|------|-------|
|
|
255
|
-
| **Claude Max** | $0 extra (included in $200/mo subscription) | Auto-detected from Claude CLI |
|
|
256
|
-
| **API Key** | Usage-based (~$15-75/M tokens) | Enter `sk-ant-...` key |
|
|
328
|
+
| Theme | Style |
|
|
329
|
+
|-------|-------|
|
|
330
|
+
| `default` | Green/blue — clean and balanced |
|
|
331
|
+
| `dracula` | Purple/pink dark theme |
|
|
332
|
+
| `nord` | Arctic blue palette |
|
|
333
|
+
| `gruvbox` | Retro warm colors |
|
|
334
|
+
| `tokyo-night` | Blue/purple night theme |
|
|
335
|
+
| `catppuccin` | Pastel warm dark (Mocha variant) |
|
|
336
|
+
| `rose-pine` | Warm rose, soho vibes |
|
|
337
|
+
| `kanagawa` | Japanese ink painting palette |
|
|
257
338
|
|
|
258
|
-
|
|
339
|
+
**Theme applies to:**
|
|
340
|
+
- tmux status bar with Powerline-style arrow separators
|
|
341
|
+
- Window tabs (active/inactive distinction)
|
|
342
|
+
- Pane borders and titles (each panel labeled: Claude, Git, Shell, Monitor, etc.)
|
|
343
|
+
- Shell prompt (Powerline-style segments: user, directory, git branch)
|
|
344
|
+
- Messages and notifications
|
|
259
345
|
|
|
260
|
-
|
|
346
|
+
Themes persist across sessions. Live-reload if tmux is already running.
|
|
261
347
|
|
|
262
|
-
|
|
263
|
-
- **URL analysis** — "Summarize this article: https://..."
|
|
264
|
-
- **PDF analysis** — Send a PDF file for analysis
|
|
265
|
-
- **Code execution** — "Write a Python script that..."
|
|
266
|
-
- **Reports** — "Create a weekly report on..."
|
|
267
|
-
- **Q&A** — General knowledge, coding help, writing
|
|
348
|
+
### Shell Prompt
|
|
268
349
|
|
|
269
|
-
|
|
350
|
+
The installer sets up a Powerline-style shell prompt themed to match:
|
|
270
351
|
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
352
|
+
- **Zsh**: Oh My Zsh + agnoster theme (hostname hidden)
|
|
353
|
+
- **Bash**: Powerline-style PS1 with git branch (hostname hidden)
|
|
354
|
+
- **Fonts**: Powerline / Nerd Fonts auto-installed (apt/brew/git fallback)
|
|
274
355
|
|
|
275
356
|
---
|
|
276
357
|
|
|
@@ -454,16 +535,48 @@ Best for: Docker/Kubernetes workflows
|
|
|
454
535
|
|
|
455
536
|
---
|
|
456
537
|
|
|
457
|
-
##
|
|
538
|
+
## Customization
|
|
458
539
|
|
|
459
|
-
|
|
540
|
+
### Register a project
|
|
460
541
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
542
|
+
```bash
|
|
543
|
+
b new myproject ~/code/myproject
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Change default layout
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
b config layout 7panel_log
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
### Change color theme
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
b theme dracula
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Enable Nerd Font icons in file tree
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
b config icons on
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
Icons are auto-detected on known Nerd Font terminals (iTerm2, WezTerm, Kitty).
|
|
465
565
|
|
|
466
|
-
|
|
566
|
+
### iTerm2 native integration
|
|
567
|
+
|
|
568
|
+
```bash
|
|
569
|
+
b config iterm-cc on # Use iTerm2 native splits (auto-detected on first run)
|
|
570
|
+
b config iterm-cc off # Use standard tmux UI
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Create a custom layout
|
|
574
|
+
|
|
575
|
+
```bash
|
|
576
|
+
cp ~/.batipanel/layouts/7panel.sh ~/.batipanel/layouts/custom.sh
|
|
577
|
+
# Edit custom.sh to your needs
|
|
578
|
+
b myproject --layout custom
|
|
579
|
+
```
|
|
467
580
|
|
|
468
581
|
---
|
|
469
582
|
|
|
@@ -477,7 +590,7 @@ batipanel works with any terminal that supports tmux:
|
|
|
477
590
|
| **Linux** | GNOME Terminal, Konsole, Alacritty, Kitty, WezTerm, xterm |
|
|
478
591
|
| **Windows** | Windows Terminal + WSL2 |
|
|
479
592
|
|
|
480
|
-
- **iTerm2**: Auto-detected —
|
|
593
|
+
- **iTerm2**: Auto-detected — supports native tmux integration for seamless tabs
|
|
481
594
|
- **Clipboard**: Copy from tmux works automatically on all platforms (macOS, Linux X11, WSL)
|
|
482
595
|
- **True Color**: 24-bit color support enabled by default
|
|
483
596
|
|
|
@@ -488,7 +601,7 @@ batipanel works with any terminal that supports tmux:
|
|
|
488
601
|
| Tool | Required? | Notes |
|
|
489
602
|
|------|-----------|-------|
|
|
490
603
|
| **tmux** | Yes | Auto-installed by the installer |
|
|
491
|
-
| **Claude Code** | Recommended |
|
|
604
|
+
| **Claude Code** | Recommended | AI assistant — `curl -fsSL https://claude.ai/install.sh \| bash` |
|
|
492
605
|
| lazygit | Optional | Git UI — falls back to `git status` |
|
|
493
606
|
| btop | Optional | System monitor — falls back to htop or top |
|
|
494
607
|
| yazi | Optional | File manager — falls back to eza, tree, or find |
|
|
@@ -499,30 +612,6 @@ All optional tools are auto-installed when possible. If any are missing, batipan
|
|
|
499
612
|
|
|
500
613
|
---
|
|
501
614
|
|
|
502
|
-
## Customization
|
|
503
|
-
|
|
504
|
-
### Register a project
|
|
505
|
-
|
|
506
|
-
```bash
|
|
507
|
-
b new myproject ~/code/myproject
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
### Change default layout
|
|
511
|
-
|
|
512
|
-
```bash
|
|
513
|
-
b config layout 7panel_log
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
### Create a custom layout
|
|
517
|
-
|
|
518
|
-
```bash
|
|
519
|
-
cp ~/.batipanel/layouts/7panel.sh ~/.batipanel/layouts/custom.sh
|
|
520
|
-
# Edit custom.sh to your needs
|
|
521
|
-
b myproject --layout custom
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
---
|
|
525
|
-
|
|
526
615
|
## Troubleshooting
|
|
527
616
|
|
|
528
617
|
### "tmux is not installed"
|
|
@@ -601,3 +690,9 @@ Contributions are welcome! Please see our [Contributing Guidelines](CONTRIBUTING
|
|
|
601
690
|
## Author
|
|
602
691
|
|
|
603
692
|
Made by [bati.ai](https://bati.ai)
|
|
693
|
+
|
|
694
|
+
---
|
|
695
|
+
|
|
696
|
+
<p align="center">
|
|
697
|
+
<sub>Sponsored by <a href="https://bati.ai">bati.ai</a></sub>
|
|
698
|
+
</p>
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.4.0
|
package/bin/start.sh
CHANGED
|
@@ -122,6 +122,18 @@ case "${ARGS[0]:-}" in
|
|
|
122
122
|
*)
|
|
123
123
|
if [ -f "$BATIPANEL_HOME/projects/${ARGS[0]}.sh" ]; then
|
|
124
124
|
tmux_start "${ARGS[0]}" "$LAYOUT_ARG"
|
|
125
|
+
elif [[ "${ARGS[0]}" =~ ^[a-zA-Z0-9_-]+$ ]] && [ -t 0 ]; then
|
|
126
|
+
# looks like a project name but not registered — offer to create
|
|
127
|
+
_cwd=$(pwd)
|
|
128
|
+
echo -e "Project '${YELLOW}${ARGS[0]}${NC}' is not registered."
|
|
129
|
+
echo ""
|
|
130
|
+
echo -e " Register ${BLUE}${_cwd}${NC} as '${GREEN}${ARGS[0]}${NC}' and start?"
|
|
131
|
+
printf " [Y/n]: "
|
|
132
|
+
read -r _answer
|
|
133
|
+
if [[ "${_answer:-Y}" != [nN] ]]; then
|
|
134
|
+
tmux_new "${ARGS[0]}" "$_cwd"
|
|
135
|
+
tmux_start "${ARGS[0]}" "$LAYOUT_ARG"
|
|
136
|
+
fi
|
|
125
137
|
else
|
|
126
138
|
echo -e "${RED}Unknown command: ${ARGS[0]}${NC}"
|
|
127
139
|
echo " Run 'b help' for usage"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
version: "3.8"
|
|
2
|
+
|
|
3
|
+
# batipanel server - OpenClaw AI gateway (pre-configured)
|
|
4
|
+
# Managed by: b server init / b server start
|
|
5
|
+
|
|
6
|
+
services:
|
|
7
|
+
openclaw:
|
|
8
|
+
image: ${BATIPANEL_OPENCLAW_IMAGE:-ghcr.io/openclaw/openclaw:latest}
|
|
9
|
+
container_name: batipanel-server
|
|
10
|
+
restart: unless-stopped
|
|
11
|
+
env_file:
|
|
12
|
+
- .env
|
|
13
|
+
environment:
|
|
14
|
+
# security defaults (hardened)
|
|
15
|
+
OPENCLAW_GATEWAY_BIND: "loopback"
|
|
16
|
+
OPENCLAW_SANDBOX: "${BATIPANEL_SANDBOX:-1}"
|
|
17
|
+
volumes:
|
|
18
|
+
- ${BATIPANEL_SERVER_DIR:-~/.batipanel/server}/config:/home/node/.openclaw
|
|
19
|
+
- ${BATIPANEL_SERVER_DIR:-~/.batipanel/server}/workspace:/home/node/workspace
|
|
20
|
+
ports:
|
|
21
|
+
- "${BATIPANEL_GATEWAY_PORT:-18789}:18789"
|
|
22
|
+
security_opt:
|
|
23
|
+
- no-new-privileges:true
|
|
24
|
+
cap_drop:
|
|
25
|
+
- ALL
|
|
26
|
+
cap_add:
|
|
27
|
+
- NET_BIND_SERVICE
|
|
28
|
+
healthcheck:
|
|
29
|
+
test: ["CMD", "curl", "-fsS", "http://localhost:18789/healthz"]
|
|
30
|
+
interval: 30s
|
|
31
|
+
timeout: 5s
|
|
32
|
+
retries: 3
|
|
33
|
+
start_period: 15s
|
|
34
|
+
networks:
|
|
35
|
+
- batipanel-net
|
|
36
|
+
|
|
37
|
+
networks:
|
|
38
|
+
batipanel-net:
|
|
39
|
+
driver: bridge
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# batipanel server healthcheck
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
GATEWAY_PORT="${BATIPANEL_GATEWAY_PORT:-18789}"
|
|
6
|
+
|
|
7
|
+
if curl -fsS "http://localhost:${GATEWAY_PORT}/healthz" >/dev/null 2>&1; then
|
|
8
|
+
echo "healthy"
|
|
9
|
+
exit 0
|
|
10
|
+
else
|
|
11
|
+
echo "unhealthy"
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# batipanel server environment
|
|
2
|
+
# Auto-generated by: b server init
|
|
3
|
+
|
|
4
|
+
# Telegram
|
|
5
|
+
TELEGRAM_BOT_TOKEN=__TELEGRAM_BOT_TOKEN__
|
|
6
|
+
|
|
7
|
+
# AI Model
|
|
8
|
+
# Claude Max: uses session key (no API cost)
|
|
9
|
+
# API Key: per-token billing
|
|
10
|
+
__AI_CONFIG__
|
|
11
|
+
|
|
12
|
+
# Gateway
|
|
13
|
+
OPENCLAW_GATEWAY_TOKEN=__GATEWAY_TOKEN__
|
|
14
|
+
OPENCLAW_GATEWAY_BIND=loopback
|
|
15
|
+
|
|
16
|
+
# Security
|
|
17
|
+
OPENCLAW_SANDBOX=1
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://openclaw.dev/schema/config.json",
|
|
3
|
+
"channels": {
|
|
4
|
+
"telegram": {
|
|
5
|
+
"enabled": true,
|
|
6
|
+
"dmPolicy": "allowlist",
|
|
7
|
+
"allowFrom": [__TELEGRAM_USER_ID__],
|
|
8
|
+
"groups": {}
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"agents": {
|
|
12
|
+
"defaults": {
|
|
13
|
+
"sandbox": {
|
|
14
|
+
"mode": "non-main",
|
|
15
|
+
"scope": "agent",
|
|
16
|
+
"workspaceAccess": "none"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
package/install.sh
CHANGED
|
@@ -302,7 +302,7 @@ echo "Installing scripts..."
|
|
|
302
302
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
303
303
|
|
|
304
304
|
cp "$SCRIPT_DIR/bin/start.sh" "$BATIPANEL_HOME/bin/"
|
|
305
|
-
for mod in common.sh core.sh validate.sh layout.sh session.sh project.sh doctor.sh wizard.sh shell-setup.sh server-docker.sh server.sh server-init.sh themes.sh; do
|
|
305
|
+
for mod in common.sh core.sh logger.sh validate.sh layout.sh session.sh project.sh doctor.sh wizard.sh shell-setup.sh server-docker.sh server.sh server-init.sh themes-data.sh themes-tmux.sh themes-bash.sh themes.sh; do
|
|
306
306
|
cp "$SCRIPT_DIR/lib/$mod" "$BATIPANEL_HOME/lib/"
|
|
307
307
|
done
|
|
308
308
|
cp "$SCRIPT_DIR/VERSION" "$BATIPANEL_HOME/VERSION" 2>/dev/null || true
|
|
@@ -462,14 +462,8 @@ else
|
|
|
462
462
|
fi
|
|
463
463
|
|
|
464
464
|
# === 10. setup shell environment (powerline fonts, prompt theme) ===
|
|
465
|
-
#
|
|
466
|
-
_sed_i() {
|
|
467
|
-
if [ "$OS" = "Darwin" ]; then
|
|
468
|
-
sed -i '' "$@"
|
|
469
|
-
else
|
|
470
|
-
sed -i "$@"
|
|
471
|
-
fi
|
|
472
|
-
}
|
|
465
|
+
# _sed_i is needed by shell-setup.sh (reuse install.sh's sed_i)
|
|
466
|
+
_sed_i() { sed_i "$@"; }
|
|
473
467
|
export -f _sed_i 2>/dev/null || true
|
|
474
468
|
|
|
475
469
|
# source shell-setup and run
|
package/lib/common.sh
CHANGED
|
@@ -10,6 +10,8 @@ _BATIPANEL_LIB="$BATIPANEL_HOME/lib"
|
|
|
10
10
|
|
|
11
11
|
# shellcheck source=lib/core.sh
|
|
12
12
|
source "$_BATIPANEL_LIB/core.sh"
|
|
13
|
+
# shellcheck source=lib/logger.sh
|
|
14
|
+
source "$_BATIPANEL_LIB/logger.sh"
|
|
13
15
|
# shellcheck source=lib/validate.sh
|
|
14
16
|
source "$_BATIPANEL_LIB/validate.sh"
|
|
15
17
|
# shellcheck source=lib/layout.sh
|
|
@@ -28,5 +30,11 @@ source "$_BATIPANEL_LIB/server-docker.sh"
|
|
|
28
30
|
source "$_BATIPANEL_LIB/server.sh"
|
|
29
31
|
# shellcheck source=lib/server-init.sh
|
|
30
32
|
source "$_BATIPANEL_LIB/server-init.sh"
|
|
33
|
+
# shellcheck source=lib/themes-data.sh
|
|
34
|
+
source "$_BATIPANEL_LIB/themes-data.sh"
|
|
35
|
+
# shellcheck source=lib/themes-tmux.sh
|
|
36
|
+
source "$_BATIPANEL_LIB/themes-tmux.sh"
|
|
37
|
+
# shellcheck source=lib/themes-bash.sh
|
|
38
|
+
source "$_BATIPANEL_LIB/themes-bash.sh"
|
|
31
39
|
# shellcheck source=lib/themes.sh
|
|
32
40
|
source "$_BATIPANEL_LIB/themes.sh"
|