batipanel 0.3.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 batiai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,603 @@
1
+ # batipanel
2
+
3
+ [![CI](https://github.com/batiai/batipanel/actions/workflows/ci.yml/badge.svg)](https://github.com/batiai/batipanel/actions)
4
+ [![npm](https://img.shields.io/npm/v/batipanel)](https://www.npmjs.com/package/batipanel)
5
+ [![Latest Release](https://img.shields.io/github/v/release/batiai/batipanel)](https://github.com/batiai/batipanel/releases)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
+ [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20WSL-lightgrey)]()
8
+
9
+ AI-powered terminal workspace manager. One command to launch a fully configured multi-panel development environment with Claude Code, git, system monitor, file browser, and more.
10
+
11
+ ```
12
+ ┌────────────────────────────────┬──────────────┐
13
+ │ │ system │
14
+ │ Claude Code (AI assistant) │ monitor │
15
+ │ ├──────────────┤
16
+ │ │ file tree │
17
+ │ ├──────────────┤
18
+ │ │ remote ctrl │
19
+ ├───────────┬────────────────────┴──────────────┤
20
+ │ git │ terminal │ logs │
21
+ └───────────┴────────────────────┴──────────────┘
22
+ ```
23
+
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
+
26
+ ## Quick Start
27
+
28
+ ```bash
29
+ # Install (pick one)
30
+ npx batipanel # npm/npx
31
+ brew install batiai/tap/batipanel # Homebrew
32
+ curl -fsSL https://batipanel.com/install.sh | bash # Shell script
33
+
34
+ # Run — the setup wizard guides you through everything
35
+ batipanel
36
+ ```
37
+
38
+ That's it. The wizard asks 2 questions (screen size + workflow) and sets up your workspace.
39
+
40
+ ---
41
+
42
+ ## Installation
43
+
44
+ ### npm / npx
45
+
46
+ ```bash
47
+ # One-time run (no install needed)
48
+ npx batipanel
49
+
50
+ # Or install globally
51
+ npm install -g batipanel
52
+ ```
53
+
54
+ ### Homebrew (macOS / Linux)
55
+
56
+ ```bash
57
+ brew tap batiai/tap
58
+ brew install batipanel
59
+ ```
60
+
61
+ All dependencies (tmux, lazygit, btop, yazi, eza) are installed automatically.
62
+
63
+ ### Shell script (Linux / WSL / macOS)
64
+
65
+ ```bash
66
+ curl -fsSL https://batipanel.com/install.sh | bash
67
+ ```
68
+
69
+ Or clone and install manually:
70
+
71
+ ```bash
72
+ git clone https://github.com/batiai/batipanel.git
73
+ cd batipanel
74
+ bash install.sh
75
+ ```
76
+
77
+ The installer auto-detects your package manager (apt, dnf, pacman, brew) and installs everything.
78
+
79
+ ### Windows (WSL)
80
+
81
+ batipanel runs on Windows through WSL2 (Windows Subsystem for Linux).
82
+
83
+ **Step 1: Install WSL2** (skip if you already have it)
84
+
85
+ Open PowerShell as Administrator and run:
86
+
87
+ ```powershell
88
+ wsl --install
89
+ ```
90
+
91
+ Restart your computer. Ubuntu will open automatically — create a username and password.
92
+
93
+ **Step 2: Install batipanel**
94
+
95
+ Open **Windows Terminal** > **Ubuntu** tab and run:
96
+
97
+ ```bash
98
+ curl -fsSL https://batipanel.com/install.sh | bash
99
+ ```
100
+
101
+ **Step 3: Start**
102
+
103
+ ```bash
104
+ b
105
+ ```
106
+
107
+ > **Tip**: For the best experience, use [Windows Terminal](https://aka.ms/terminal) (pre-installed on Windows 11, free on Microsoft Store for Windows 10). Maximize the window or go fullscreen (F11) before launching batipanel.
108
+
109
+ ### Upgrading
110
+
111
+ ```bash
112
+ # npm
113
+ npm update -g batipanel
114
+
115
+ # Homebrew
116
+ brew upgrade batipanel
117
+
118
+ # Manual install — just re-run the installer
119
+ cd batipanel && git pull && bash install.sh
120
+ ```
121
+
122
+ Your projects and settings are always preserved.
123
+
124
+ ### Uninstalling
125
+
126
+ ```bash
127
+ # npm
128
+ npm uninstall -g batipanel
129
+
130
+ # Homebrew
131
+ brew uninstall batipanel
132
+
133
+ # Manual
134
+ bash uninstall.sh
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Usage
140
+
141
+ ### First Run
142
+
143
+ Just type `b` (or `batipanel`). The setup wizard will:
144
+
145
+ 1. Ask your **screen size** (laptop / external monitor / ultrawide)
146
+ 2. Ask your **workflow** (AI coding / general dev / DevOps)
147
+ 3. Pick the best layout for you
148
+ 4. Register your current directory as a project
149
+ 5. Launch immediately
150
+
151
+ ### Everyday Commands
152
+
153
+ ```bash
154
+ 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
157
+ b stop myproject # Stop a session
158
+ b ls # List sessions & projects
159
+ b layouts # Show available layouts
160
+ b config layout 7panel_log # Change default layout
161
+ b doctor # Check system health
162
+ b help # Show all commands
163
+ ```
164
+
165
+ ### How It Works
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
+ ---
174
+
175
+ ## Batipanel Server — AI Telegram Bot
176
+
177
+ Run your own AI assistant on Telegram, powered by Claude. Docker-isolated, secure, no coding required.
178
+
179
+ ```
180
+ You (Telegram) --> Batipanel Server (Docker) --> Claude AI
181
+ chat OpenClaw gateway Opus 4.6
182
+ ```
183
+
184
+ ### Why?
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
192
+
193
+ ```bash
194
+ # 1. Setup (interactive, 3 steps)
195
+ b server init
196
+
197
+ # 2. Start
198
+ b server start
199
+
200
+ # 3. Chat with your bot on Telegram!
201
+ ```
202
+
203
+ ### Setup Walkthrough
204
+
205
+ ```
206
+ $ b server init
207
+
208
+ === Batipanel Server Setup ===
209
+
210
+ Step 1/3: Telegram Bot
211
+ Create a bot via @BotFather on Telegram.
212
+ Bot Token: 7234567890:AAF_xxxxx
213
+ ✓ Token format valid
214
+
215
+ Step 2/3: AI Model
216
+ Use Claude Max subscription (no API cost)? [Y/n]: Y
217
+ ✓ Claude Max session detected (no API cost)
218
+
219
+ Step 3/3: Security
220
+ Telegram User ID: 123456789
221
+ ✓ Only user 123456789 can access the bot
222
+
223
+ === Setup Complete ===
224
+ Start the server: b server start
225
+ ```
226
+
227
+ ### Server Commands
228
+
229
+ ```bash
230
+ b server init # Interactive setup wizard
231
+ b server start # Start the Docker server
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)
237
+ ```
238
+
239
+ ### Security
240
+
241
+ Batipanel Server runs with hardened defaults:
242
+
243
+ | Layer | Protection |
244
+ |-------|-----------|
245
+ | **Container** | Read-only filesystem, dropped Linux capabilities |
246
+ | **Sandbox** | Tool execution in separate containers |
247
+ | **Network** | Loopback binding only (not exposed to LAN) |
248
+ | **Access** | Telegram allowlist (only your user ID) |
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 |
257
+
258
+ ### What Can It Do?
259
+
260
+ Chat with your Telegram bot just like ChatGPT, but with full agent capabilities:
261
+
262
+ - **Web search** — "Find the latest AI news"
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
268
+
269
+ ### Requirements
270
+
271
+ - Docker & Docker Compose
272
+ - Telegram account
273
+ - Claude Max subscription (recommended) or Anthropic API key
274
+
275
+ ---
276
+
277
+ ## Layouts
278
+
279
+ Choose the layout that fits your screen and workflow. Change anytime with `b <project> --layout <name>`.
280
+
281
+ ### 7panel (default) — Claude-focused workspace
282
+
283
+ Best for: external monitors, AI-assisted coding
284
+
285
+ ```
286
+ ┌────────────────────────────────┬──────────────┐
287
+ │ │ btop │
288
+ │ claude (main workspace) ├──────────────┤
289
+ │ 55% width, 70% height │ file tree │
290
+ │ ├──────────────┤
291
+ │ │ remote-ctrl │
292
+ ├───────────┬────────────────────┴──────────────┤
293
+ │ lazygit │ terminal │ logs/server │
294
+ └───────────┴──────────────────┴────────────────┘
295
+ ```
296
+
297
+ ### 4panel — Minimal workspace
298
+
299
+ Best for: laptops (13-14"), smaller screens
300
+
301
+ ```
302
+ ┌────────────────────────┬──────────────────┐
303
+ │ │ │
304
+ │ claude (main) │ btop │
305
+ │ │ │
306
+ ├────────────────────────┼──────────────────┤
307
+ │ lazygit │ terminal │
308
+ └────────────────────────┴──────────────────┘
309
+ ```
310
+
311
+ ### 6panel — Balanced grid
312
+
313
+ Best for: general development on a large monitor
314
+
315
+ ```
316
+ ┌──────────────┬───────────────┬────────────────┐
317
+ │ remote-ctrl │ claude │ btop │
318
+ ├──────────────┼───────────────┼────────────────┤
319
+ │ lazygit │ terminal │ file tree │
320
+ └──────────────┴───────────────┴────────────────┘
321
+ ```
322
+
323
+ ### dual-claude — Multi-agent workspace
324
+
325
+ Best for: ultrawide monitors, running two Claude instances
326
+
327
+ ```
328
+ ┌──────────────────┬──────────────────┐
329
+ │ │ │
330
+ │ claude #1 │ claude #2 │
331
+ │ (main) │ (secondary) │
332
+ │ │ │
333
+ ├──────────┬───────┴──────┬───────────┤
334
+ │ lazygit │ terminal │ file mgr │
335
+ └──────────┴──────────────┴───────────┘
336
+ ```
337
+
338
+ ### devops — Infrastructure monitoring
339
+
340
+ Best for: Docker/Kubernetes workflows
341
+
342
+ ```
343
+ ┌──────────────────┬──────────────────┐
344
+ │ │ │
345
+ │ claude │ btop │
346
+ │ │ │
347
+ ├──────────────────┼──────────────────┤
348
+ │ lazydocker │ terminal │
349
+ ├──────────────────┴──────────────────┤
350
+ │ logs — full width (docker logs) │
351
+ └─────────────────────────────────────┘
352
+ ```
353
+
354
+ <details>
355
+ <summary>More layouts: 5panel, 7panel_log, 8panel</summary>
356
+
357
+ ### 5panel — Balanced workspace
358
+
359
+ ```
360
+ ┌──────────────────────────────┬──────────────┐
361
+ │ │ │
362
+ │ claude (main) │ lazygit │
363
+ │ │ │
364
+ ├──────────────┬───────────────┼──────────────┤
365
+ │ remote-ctrl │ terminal │ file tree │
366
+ └──────────────┴───────────────┴──────────────┘
367
+ ```
368
+
369
+ ### 7panel_log — Full-width log bar
370
+
371
+ ```
372
+ ┌───────────────────────┬──────────┬────────────┐
373
+ │ claude (main) │ lazygit │ btop │
374
+ ├──────────┬────────────┤ │ │
375
+ │ remote │ terminal ├──────────┤ │
376
+ │ │ │ file tree│ │
377
+ ├──────────┴────────────┴──────────┴────────────┤
378
+ │ logs — full width (tail -f / npm run dev) │
379
+ └───────────────────────────────────────────────┘
380
+ ```
381
+
382
+ ### 8panel — Dual Claude + monitor
383
+
384
+ ```
385
+ ┌──────────────┬──────────────┬──────────────┐
386
+ │ │ │ │
387
+ │ claude #1 │ claude #2 │ btop │
388
+ │ (main) │ (secondary) │ │
389
+ │ │ ├──────────────┤
390
+ │ │ │ logs │
391
+ ├──────────────┴──────────────┼──────────────┤
392
+ │ lazygit │ file mgr │
393
+ └─────────────────────────────┴──────────────┘
394
+ ```
395
+
396
+ </details>
397
+
398
+ ---
399
+
400
+ ## Keyboard Shortcuts
401
+
402
+ ### Panel Navigation
403
+
404
+ | Shortcut | Action |
405
+ |----------|--------|
406
+ | **Alt + h/j/k/l** | Move between panels (vim-style) |
407
+ | **Alt + Arrow Keys** | Move between panels |
408
+ | **Alt + Space** | Toggle last panel |
409
+ | **Alt + f** | Zoom/focus current panel (toggle) |
410
+ | **Alt + 1-9** | Switch to window by number |
411
+ | **Alt + [ / ]** | Previous / next window |
412
+
413
+ ### Panel Management
414
+
415
+ | Shortcut | Action |
416
+ |----------|--------|
417
+ | **Alt + \\** | Split vertically (new pane right) |
418
+ | **Alt + -** | Split horizontally (new pane below) |
419
+ | **Alt + x** | Close current panel (with confirmation) |
420
+ | **Alt + n** | New window |
421
+
422
+ ### Panel Resizing
423
+
424
+ | Shortcut | Action |
425
+ |----------|--------|
426
+ | **Alt + Shift + Arrow** | Fine resize (1 unit) |
427
+ | **Prefix + Arrow** | Resize (5 units, prefix = Ctrl+B) |
428
+ | **Prefix + =** | Equalize all panel sizes |
429
+ | **Mouse drag** | Drag panel borders to resize |
430
+
431
+ ### Panel Swapping
432
+
433
+ | Shortcut | Action |
434
+ |----------|--------|
435
+ | **Alt + Shift + h/j/k/l** | Swap panel in direction |
436
+
437
+ ### Copy Mode (vi-style)
438
+
439
+ | Shortcut | Action |
440
+ |----------|--------|
441
+ | **Prefix + [** | Enter copy mode |
442
+ | **v** | Begin selection |
443
+ | **Ctrl + v** | Toggle rectangle selection |
444
+ | **y** | Copy to system clipboard |
445
+ | **Escape** | Exit copy mode |
446
+
447
+ ### Session Management
448
+
449
+ | Shortcut | Action |
450
+ |----------|--------|
451
+ | **Prefix + s** | List sessions |
452
+ | **Prefix + S** | New session |
453
+ | **Prefix + r** | Reload tmux config |
454
+
455
+ ---
456
+
457
+ ## Shell Theme
458
+
459
+ The installer sets up a Powerline-style shell prompt:
460
+
461
+ - **Zsh**: Oh My Zsh + agnoster theme (hostname hidden)
462
+ - **Bash**: Powerline-style PS1 with git branch (hostname hidden)
463
+ - **Fonts**: Powerline fonts auto-installed (apt/brew/git fallback)
464
+ - **tmux**: Powerline status bar with arrow separators
465
+
466
+ Each panel shows its tool name in the border (Claude, Git, Shell, Monitor, etc.).
467
+
468
+ ---
469
+
470
+ ## Terminal Compatibility
471
+
472
+ batipanel works with any terminal that supports tmux:
473
+
474
+ | Platform | Supported Terminals |
475
+ |----------|---------------------|
476
+ | **macOS** | Terminal.app, iTerm2, Alacritty, Kitty, WezTerm, Warp |
477
+ | **Linux** | GNOME Terminal, Konsole, Alacritty, Kitty, WezTerm, xterm |
478
+ | **Windows** | Windows Terminal + WSL2 |
479
+
480
+ - **iTerm2**: Auto-detected — uses native tmux integration for seamless tabs
481
+ - **Clipboard**: Copy from tmux works automatically on all platforms (macOS, Linux X11, WSL)
482
+ - **True Color**: 24-bit color support enabled by default
483
+
484
+ ---
485
+
486
+ ## Requirements
487
+
488
+ | Tool | Required? | Notes |
489
+ |------|-----------|-------|
490
+ | **tmux** | Yes | Auto-installed by the installer |
491
+ | **Claude Code** | Recommended | Auto-installed via `curl -fsSL https://claude.ai/install.sh \| bash` |
492
+ | lazygit | Optional | Git UI — falls back to `git status` |
493
+ | btop | Optional | System monitor — falls back to htop or top |
494
+ | yazi | Optional | File manager — falls back to eza, tree, or find |
495
+ | eza | Optional | Modern `ls` — falls back to tree or find |
496
+ | Docker | Optional | Required only for `b server` (Telegram bot) |
497
+
498
+ All optional tools are auto-installed when possible. If any are missing, batipanel still works — each panel gracefully falls back to a simpler alternative.
499
+
500
+ ---
501
+
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
+ ## Troubleshooting
527
+
528
+ ### "tmux is not installed"
529
+
530
+ The installer tries to install tmux automatically. If it fails:
531
+
532
+ ```bash
533
+ # macOS
534
+ brew install tmux
535
+
536
+ # Ubuntu/Debian
537
+ sudo apt install tmux
538
+
539
+ # Fedora
540
+ sudo dnf install tmux
541
+ ```
542
+
543
+ ### Panels look too small or overlap
544
+
545
+ Your terminal window might be too small for the selected layout. Try:
546
+
547
+ ```bash
548
+ b myproject --layout 4panel # simpler layout for smaller screens
549
+ ```
550
+
551
+ Or maximize your terminal window / go fullscreen.
552
+
553
+ ### "claude CLI not installed"
554
+
555
+ Install Claude Code:
556
+
557
+ ```bash
558
+ curl -fsSL https://claude.ai/install.sh | bash
559
+ ```
560
+
561
+ The panel will show a reminder if Claude Code is missing — everything else still works.
562
+
563
+ ### WSL: clipboard not working
564
+
565
+ Install xclip:
566
+
567
+ ```bash
568
+ sudo apt install xclip
569
+ ```
570
+
571
+ ### How do I navigate between panels?
572
+
573
+ - **Alt + h/j/k/l** — switch panels (vim-style)
574
+ - **Alt + Arrow Keys** — switch panels
575
+ - **Alt + f** — zoom/focus a panel (toggle fullscreen)
576
+ - **Prefix + Arrow Keys** — resize panels (prefix = Ctrl+B by default)
577
+ - **Mouse** — click to select a panel, drag borders to resize, scroll to view history
578
+
579
+ ---
580
+
581
+ ## Contributing
582
+
583
+ Contributions are welcome! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
584
+
585
+ 1. Fork the repository
586
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
587
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
588
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
589
+ 5. Open a Pull Request
590
+
591
+ ---
592
+
593
+ ## License
594
+
595
+ [MIT](LICENSE) — Copyright (c) 2026 [bati.ai](https://bati.ai)
596
+
597
+ ## Trademark
598
+
599
+ "batipanel" and the batipanel logo are trademarks of batiai. The MIT license grants rights to the source code only, not to the batipanel name or branding. See [TRADEMARK.md](TRADEMARK.md) for details.
600
+
601
+ ## Author
602
+
603
+ Made by [bati.ai](https://bati.ai)
package/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.3.0
package/bin/cli.sh ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env bash
2
+ # npm/npx entry point — delegates to the installed batipanel or runs installer
3
+ set -euo pipefail
4
+
5
+ BATIPANEL_HOME="${BATIPANEL_HOME:-$HOME/.batipanel}"
6
+
7
+ if [ -f "$BATIPANEL_HOME/bin/start.sh" ]; then
8
+ exec bash "$BATIPANEL_HOME/bin/start.sh" "$@"
9
+ else
10
+ echo "batipanel is not installed yet. Running installer..."
11
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
+ bash "$SCRIPT_DIR/install.sh"
13
+ echo ""
14
+ echo "Run 'batipanel' or 'b' to start."
15
+ fi