branch-nexus 1.0.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 BranchNexus
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,190 @@
1
+ # BranchNexus
2
+
3
+ [![npm version](https://img.shields.io/npm/v/branchnexus.svg)](https://www.npmjs.com/package/branchnexus)
4
+ [![Node.js Version](https://img.shields.io/node/v/branchnexus.svg)](https://nodejs.org)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ **BranchNexus**, birden fazla Git branch'i aynı anda izole worktree'lerde açıp tmux panelleriyle yöneten bir CLI aracıdır.
8
+
9
+ <p align="center">
10
+ <img src="assets/tmux-session.png" alt="BranchNexus tmux session" width="700">
11
+ </p>
12
+
13
+ ## Özellikler
14
+
15
+ - **Multi-branch worktree** - Her branch için izole çalışma alanı
16
+ - **tmux entegrasyonu** - Grid, horizontal, vertical layout desteği
17
+ - **Cross-platform** - Windows (WSL), macOS, Linux
18
+ - **Oturum yönetimi** - Session restore ve cleanup politikaları
19
+ - **İnteraktif panel** - Terminal tabanlı konfigürasyon ve branch seçimi
20
+ - **GitHub entegrasyonu** - Repo tarayıcı ve branch cache desteği
21
+ - **Preset sistemi** - Kayıtlı yapılandırmalar ile hızlı başlatma
22
+ - **Command hook'ları** - Worktree sonrası otomatik komut çalıştırma
23
+ - **Tema desteği** - Kırmızı, yeşil, mavi, sarı, cyan, magenta renk temaları
24
+
25
+ ## Kurulum
26
+
27
+ ```bash
28
+ npm install -g branchnexus
29
+ ```
30
+
31
+ Veya npx ile doğrudan çalıştırın:
32
+
33
+ ```bash
34
+ npx branchnexus init
35
+ ```
36
+
37
+ ## Hızlı Başlangıç
38
+
39
+ ```bash
40
+ # İlk kurulum sihirbazı
41
+ branchnexus init
42
+
43
+ # İnteraktif oturum başlat
44
+ branchnexus
45
+
46
+ # Seçeneklerle çalıştır
47
+ branchnexus --layout grid --panes 4 --cleanup session
48
+ ```
49
+
50
+ ## Kullanım
51
+
52
+ ### 1. Konfigürasyon Paneli
53
+
54
+ `branchnexus` komutunu çalıştırdığınızda interaktif konfigürasyon paneli açılır. Repository URL, layout tipi, pane sayısı, cleanup politikası ve renk temasını ayarlayabilirsiniz.
55
+
56
+ <p align="center">
57
+ <img src="assets/panel.png" alt="BranchNexus configuration panel" width="700">
58
+ </p>
59
+
60
+ | Tuş | İşlev |
61
+ |-----|-------|
62
+ | `↑↓` | Alanlar arası gezinme |
63
+ | `←→` | Değer değiştirme |
64
+ | `Enter` | Düzenleme / Başlat |
65
+ | `P` | Preset yükleme |
66
+ | `G` | GitHub repo tarayıcı |
67
+ | `Esc` | Çıkış |
68
+
69
+ ### 2. Branch Seçimi
70
+
71
+ Her pane için ayrı branch seçimi yapabilir, pane ismi verebilir ve başlangıç komutu tanımlayabilirsiniz.
72
+
73
+ <p align="center">
74
+ <img src="assets/branch-selection.png" alt="BranchNexus branch selection" width="700">
75
+ </p>
76
+
77
+ | Tuş | İşlev |
78
+ |-----|-------|
79
+ | `↑↓` | Pane'ler arası gezinme |
80
+ | `←→` | Branch değiştirme |
81
+ | `N` | Pane ismi düzenleme |
82
+ | `C` | Başlangıç komutu |
83
+ | `Enter` | Onayla |
84
+ | `Esc` | Geri |
85
+
86
+ ### 3. tmux Oturumu
87
+
88
+ Onayladıktan sonra BranchNexus seçilen layout'a göre tmux oturumunu oluşturur. Her pane kendi worktree'sinde ilgili branch'e checkout edilmiş olarak açılır.
89
+
90
+ <p align="center">
91
+ <img src="assets/tmux-session.png" alt="BranchNexus tmux session" width="700">
92
+ </p>
93
+
94
+ ## CLI Komutları
95
+
96
+ ```bash
97
+ branchnexus # İnteraktif oturum başlat
98
+ branchnexus init # İlk kurulum sihirbazı
99
+ branchnexus kill # Aktif session'ı sonlandır
100
+ branchnexus attach # Detach edilmiş session'a bağlan
101
+ branchnexus status # Durum bilgisi
102
+ branchnexus preset list # Kayıtlı preset'leri listele
103
+ branchnexus preset save <isim> # Mevcut ayarlardan preset kaydet
104
+ branchnexus preset load <isim> # Preset yükle
105
+ branchnexus preset delete <isim> # Preset sil
106
+ branchnexus config show # Yapılandırmayı göster
107
+ branchnexus config set <key> <value> # Değer ayarla
108
+ branchnexus config reset # Varsayılana sıfırla
109
+ branchnexus config export # Config'i JSON olarak dışa aktar
110
+ branchnexus config import <dosya> # Config içe aktar
111
+ ```
112
+
113
+ ## Seçenekler
114
+
115
+ | Seçenek | Açıklama | Varsayılan |
116
+ |---------|----------|------------|
117
+ | `--root <path>` | Çalışma dizini | `~/workspace` |
118
+ | `--layout <type>` | `horizontal`, `vertical`, `grid` | `grid` |
119
+ | `--panes <n>` | Panel sayısı (2-6) | `4` |
120
+ | `--cleanup <policy>` | `session` veya `persistent` | `session` |
121
+ | `--session <name>` | Session ismi | `branchnexus` |
122
+ | `--fresh` | Temiz başlangıç (restore atla) | - |
123
+ | `--no-hooks` | Hook'ları atla | - |
124
+ | `--log-level <level>` | `DEBUG`, `INFO`, `WARN`, `ERROR` | `INFO` |
125
+
126
+ ## Yapılandırma
127
+
128
+ Config dosyası: `~/.config/branchnexus/config.json`
129
+
130
+ ```json
131
+ {
132
+ "defaultRoot": "~/workspace",
133
+ "defaultLayout": "grid",
134
+ "defaultPanes": 4,
135
+ "cleanupPolicy": "session",
136
+ "colorTheme": "red",
137
+ "wslDistribution": "Ubuntu-22.04",
138
+ "tmuxAutoInstall": true,
139
+ "sessionRestoreEnabled": true,
140
+ "commandHooks": {
141
+ "post-setup": ["npm install"]
142
+ },
143
+ "presets": {
144
+ "quick": { "layout": "horizontal", "panes": 2, "cleanup": "persistent" }
145
+ }
146
+ }
147
+ ```
148
+
149
+ ## Gereksinimler
150
+
151
+ - **Node.js** >= 18.0.0
152
+ - **tmux** >= 2.0
153
+ - **Git** >= 2.17 (worktree desteği)
154
+ - **WSL** (Windows kullanımı için)
155
+
156
+ ## Geliştirme
157
+
158
+ ```bash
159
+ git clone https://github.com/wkaandemir/branch-nexus.git
160
+ cd branch-nexus
161
+ npm install
162
+
163
+ npm run build # Compile
164
+ npm run dev # Watch mode
165
+ npm run typecheck # Type check
166
+ npm run lint # Lint
167
+ npm run test # Test
168
+ npm run test:coverage # Coverage report
169
+ ```
170
+
171
+ ## Proje Yapısı
172
+
173
+ ```text
174
+ ts-src/
175
+ ├── cli.ts # Entry point
176
+ ├── commands/ # CLI komutları (run, kill, attach, status, preset, config)
177
+ ├── core/ # Orchestrator, config, session, presets
178
+ ├── git/ # Branch, worktree, clone işlemleri
179
+ ├── github/ # GitHub API client
180
+ ├── hooks/ # Command hook runner
181
+ ├── tmux/ # Bootstrap, layouts, session
182
+ ├── runtime/ # Platform detection, WSL, shell
183
+ ├── prompts/ # İnteraktif paneller (panel, branch, GitHub browser)
184
+ ├── types/ # TypeScript tipleri (Zod schemas)
185
+ └── utils/ # Logger, retry, theme, validators
186
+ ```
187
+
188
+ ## Lisans
189
+
190
+ MIT © BranchNexus Team
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node