@kikkimo/claude-launcher 2.4.0 → 3.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/CHANGELOG.md +71 -0
- package/README.md +32 -17
- package/claude-launcher +638 -393
- package/docs/README-zh.md +32 -17
- package/lib/api-manager.js +136 -11
- package/lib/auth/password-input.js +8 -4
- package/lib/auth/password-validator.js +83 -48
- package/lib/i18n/index.js +4 -3
- package/lib/i18n/language-manager.js +4 -3
- package/lib/i18n/locales/de.js +93 -9
- package/lib/i18n/locales/en.js +93 -9
- package/lib/i18n/locales/es.js +93 -9
- package/lib/i18n/locales/fr.js +93 -9
- package/lib/i18n/locales/it.js +93 -9
- package/lib/i18n/locales/ja.js +93 -9
- package/lib/i18n/locales/ko.js +93 -9
- package/lib/i18n/locales/pt.js +93 -9
- package/lib/i18n/locales/ru.js +93 -9
- package/lib/i18n/locales/zh-TW.js +93 -9
- package/lib/i18n/locales/zh.js +93 -9
- package/lib/launcher.js +131 -93
- package/lib/presets/providers.js +39 -18
- package/lib/ui/api-editor.js +210 -0
- package/lib/ui/interactive-table.js +216 -99
- package/lib/ui/menu.js +78 -55
- package/lib/ui/prompts.js +168 -139
- package/lib/ui/screen.js +125 -0
- package/lib/utils/stdin-manager.js +11 -9
- package/lib/utils/version-checker.js +63 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,77 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.0.0] - 2026-04-07
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **ANSI Screen Rendering Layer**: Full terminal rendering rewrite using alternate screen buffer (`\x1b[?1049h`) and absolute cursor positioning (`\x1b[H\x1b[2J`). Eliminates all position drift across page transitions. Program runs in isolated screen like vim/htop; exit restores original terminal content.
|
|
12
|
+
- New `lib/ui/screen.js` singleton: `render()`, `write()`, `enter()`, `exit()`, `exitForHandoff()`, `debug()`, `showCursor()`/`hideCursor()`, `setReadlineActive()`, `isActive()`
|
|
13
|
+
- Test mode (`SCREEN_TEST=1`): source-tagged write interception for automated leak detection
|
|
14
|
+
- Degradation: non-TTY passthrough, `SCREEN_NO_ALT=1` manual override
|
|
15
|
+
- **Edit API Feature**: New menu item to modify API name, provider, base URL, and model (API key not editable)
|
|
16
|
+
- Field-by-field editing with per-field validation (reuses Add API validators)
|
|
17
|
+
- Provider selection via preset list (not free text), preserves provider-specific envVars/timeout/upgrade detection
|
|
18
|
+
- Provider/URL mismatch warning in field menu hint area
|
|
19
|
+
- Auto-save per field edit with success/cancel feedback
|
|
20
|
+
- **Unified Password Guard**: Shared `passwordGuard()` function protects delete, edit, import, export operations
|
|
21
|
+
- Mode A (delete/edit): guard at dispatch layer with header display
|
|
22
|
+
- Mode B (export/import): guard inside handler after title page
|
|
23
|
+
- Handles wrong password, empty password, Esc cancel, Ctrl+C delegation distinctly
|
|
24
|
+
- Defense-in-depth: export/import return false when no password set
|
|
25
|
+
- **API Table Pagination**: ←→ page navigation for API selection tables (remove/switch/edit)
|
|
26
|
+
- Dynamic items-per-page based on terminal height
|
|
27
|
+
- Per-page selection memory across page switches
|
|
28
|
+
- 3 pure testable helpers: `calculatePagination()`, `initPaginationState()`, `handlePageKeyPress()`
|
|
29
|
+
- Legacy >99 API defensive guard with display truncation + warning
|
|
30
|
+
- **API Count Limit**: Maximum 99 APIs enforced in `addApi()` and import path
|
|
31
|
+
- **Launch Handoff Lifecycle**: Clean `screen.exitForHandoff()` → normal terminal output → `relinquishConsoleToChild()` → spawn sequence
|
|
32
|
+
- `handleLaunchFailure()` promoted to module-level with `rollbackFn(errorMessage)` callback chain
|
|
33
|
+
- Pre-handoff errors show in alt-screen; post-handoff errors use press-key + 60s timeout + exit
|
|
34
|
+
- **Menu Hint Enhancements**: Password-required hints (🔒) for edit/remove/export/import when password is set
|
|
35
|
+
- **Navigation i18n**: Action words (edit/remove/switch/select) fully localized across 11 locales
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- **All Terminal Output**: 462 direct `console.clear/log/error/warn` and `process.stdout.write` calls replaced with `screen.render()`/`screen.write()`/`screen.debug()` across 12 files
|
|
39
|
+
- **Menu Component**: `displayMenu()` and `navigate()` now use `screen.render()` for absolute positioning; `clearScreen` parameter removed from `navigate()` signature
|
|
40
|
+
- **Interactive Table**: Refactored to `screen.render()` with pagination support; action text localized via i18n keys
|
|
41
|
+
- **Signal Ownership**: Global SIGINT handler respects `handleCtrlC()` return value (first Ctrl+C = warning only); SIGTERM/uncaughtException/unhandledRejection handlers call `screen.exit()` before exit
|
|
42
|
+
- **Launcher Lifecycle**: `relinquishConsoleToChild()` moved before `spawn()` for clean handoff; `updateApiModel()` delegates to `updateApiField()` for unified validation
|
|
43
|
+
- **Default Config Language**: Changed from `zh` to `en` in `loadConfig()`/`loadConfigSync()` to match `LanguageManager` default; config file written on first run
|
|
44
|
+
- **Hint Area Spacing**: Extra space after ℹ icon; multi-line hint indentation aligned
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- **First-run Language Bug**: Deleting config and restarting no longer switches from English to Chinese on second launch
|
|
48
|
+
- **Field Menu CJK Alignment**: Label padding uses `getStringWidth()`/`padStringToWidth()` for correct CJK character width
|
|
49
|
+
|
|
50
|
+
## [2.5.0] - 2026-03-31
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
- **Claude Auto Mode Support**: New menu item "Launch Claude Code (Enable Auto Mode)" using `--enable-auto-mode` flag
|
|
54
|
+
- Enables auto mode as a selectable permission mode (switch with Shift+Tab in session)
|
|
55
|
+
- Currently supports Team plan; Enterprise/API plans rolling out
|
|
56
|
+
- **Dynamic Menu Hints**: Context-sensitive hints displayed below the main menu based on selected item
|
|
57
|
+
- Auto Mode item: Shows plan support info and Shift+Tab usage instruction
|
|
58
|
+
- Third-party API items: Shows active API provider/model or prompts to configure
|
|
59
|
+
- Hints auto-hide when selecting other menu items
|
|
60
|
+
- **GLM-5.1 & GLM-5-Turbo Models**: Added latest ZhiPu AI models for both `zhipu` and `zai` providers
|
|
61
|
+
- New models: `glm-5.1` (latest), `glm-5-turbo`
|
|
62
|
+
- Removed deprecated: `glm-4.5`, `glm-4.6`
|
|
63
|
+
- All older models now suggest upgrade to `glm-5.1`
|
|
64
|
+
- **Kimi K2.5 Model**: Added latest Moonshot AI model for `moonshot` provider
|
|
65
|
+
- New model: `kimi-k2.5` (latest, multimodal, 256K context)
|
|
66
|
+
- Removed deprecated: `kimi-k2-0711-preview`, `kimi-k2-0905-preview`, `kimi-k2-turbo-preview`
|
|
67
|
+
- All older models now suggest upgrade to `kimi-k2.5`
|
|
68
|
+
- **MiniMax M2.7 & M2.5 Models**: Added latest MiniMax models for both `minimax_cn` and `minimax_global` providers
|
|
69
|
+
- New models: `MiniMax-M2.7` (latest), `MiniMax-M2.5`
|
|
70
|
+
- Older models now suggest upgrade to `MiniMax-M2.7`
|
|
71
|
+
- **Automated Test Suite**: Added test infrastructure with `npm test` entry point
|
|
72
|
+
- Provider model configuration tests (28 tests)
|
|
73
|
+
- Menu hintCallback rendering tests including navigate() stub tests (8 tests)
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
- **Menu Structure**: Main menu now has 9 items (was 8), with Auto Mode at position 3
|
|
77
|
+
- **i18n**: All 11 locale files updated with 4 new translation keys for Auto Mode and hints
|
|
78
|
+
|
|
8
79
|
## [2.4.0] - 2026-02-12
|
|
9
80
|
|
|
10
81
|
### Added
|
package/README.md
CHANGED
|
@@ -13,24 +13,29 @@ An elegant interactive launcher for Claude Code with a beautiful Claude-style in
|
|
|
13
13
|
|
|
14
14
|
### 🎨 **Beautiful Interface**
|
|
15
15
|
- Claude-style interface with authentic orange/amber color scheme
|
|
16
|
+
- ANSI alternate screen buffer for drift-free rendering (like vim/htop)
|
|
16
17
|
- Arrow key navigation with smooth menu transitions
|
|
18
|
+
- Paginated API tables with ←→ page navigation for large API lists
|
|
17
19
|
- Interactive tables for API selection and management
|
|
18
20
|
- Multi-language support (English, Simplified Chinese, Traditional Chinese, German, French, Spanish, Italian, Portuguese, Japanese, Korean, Russian)
|
|
19
21
|
|
|
20
22
|
### 🔐 **Advanced Security**
|
|
21
23
|
- AES-256-CBC encryption for all sensitive data
|
|
22
24
|
- Machine-specific encryption keys for enhanced security
|
|
25
|
+
- Unified password guard for high-risk operations (edit, delete, import, export)
|
|
23
26
|
- Password-protected configuration import/export
|
|
24
27
|
- Secure API token storage with masked display
|
|
25
28
|
- Strong password requirements and validation
|
|
26
29
|
|
|
27
30
|
### 🚀 **Third-party API Management**
|
|
28
|
-
- Full support for multiple third-party API providers (
|
|
31
|
+
- Full support for multiple third-party API providers (Anthropic, DeepSeek, Kimi K2.5, MiniMax M2.7, GLM-5.1/ZhiPu AI, and custom APIs)
|
|
29
32
|
- Interactive API configuration with validation
|
|
33
|
+
- **Edit API**: Modify name, provider, base URL, and model for existing APIs
|
|
30
34
|
- API usage statistics with success/failure tracking
|
|
31
35
|
- Model upgrade notifications and auto-upgrade support
|
|
32
36
|
- Secure configuration backup and restore
|
|
33
37
|
- Easy API switching, removal, and bulk clear
|
|
38
|
+
- Maximum 99 APIs supported per configuration
|
|
34
39
|
|
|
35
40
|
### 🌍 **Enterprise-grade Features**
|
|
36
41
|
- Global installation - use `claude-launcher` from anywhere
|
|
@@ -84,23 +89,25 @@ node claude-launcher
|
|
|
84
89
|
|
|
85
90
|
1. **Launch Claude Code** - Standard Claude Code launch
|
|
86
91
|
2. **Launch Claude Code (Skip Permissions)** - Launch with `--dangerously-skip-permissions`
|
|
87
|
-
3. **Launch Claude Code
|
|
88
|
-
4. **Launch Claude Code with Third-party API
|
|
89
|
-
5. **Third-party API
|
|
90
|
-
|
|
92
|
+
3. **Launch Claude Code (Enable Auto Mode)** - Launch with `--enable-auto-mode` for classifier-gated auto approvals (Team plan; Shift+Tab to switch)
|
|
93
|
+
4. **Launch Claude Code with Third-party API** - Use configured third-party API
|
|
94
|
+
5. **Launch Claude Code with Third-party API (Skip Permissions)** - Combine third-party API with permission skipping
|
|
95
|
+
6. **Third-party API Management** - Full API lifecycle management:
|
|
96
|
+
- Add, edit, switch, and remove APIs
|
|
91
97
|
- View usage statistics with success/failure rates
|
|
92
98
|
- Model upgrade settings (auto/manual upgrade)
|
|
93
|
-
- Import/export configurations
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
- Import/export configurations (password-protected)
|
|
100
|
+
7. **Configuration Management** - Language, telemetry, launch mode, model upgrade settings
|
|
101
|
+
8. **Version Update Check** - Check for launcher updates
|
|
102
|
+
9. **Exit** - Close the launcher
|
|
97
103
|
|
|
98
104
|
### Interactive Navigation
|
|
99
105
|
|
|
100
|
-
- **Arrow Keys**: Use ↑↓ to navigate, Enter to select
|
|
101
|
-
- **Escape Key**: Press Esc to go back or
|
|
106
|
+
- **Arrow Keys**: Use ↑↓ to navigate, ←→ to switch pages (in paginated tables), Enter to select
|
|
107
|
+
- **Escape Key**: Press Esc to go back or cancel
|
|
108
|
+
- **Ctrl+C**: First press shows warning, second press exits cleanly
|
|
102
109
|
- **Multi-language**: All interface text adapts to your selected language
|
|
103
|
-
- **Smart Tables**:
|
|
110
|
+
- **Smart Tables**: Paginated interactive tables for API management with per-page selection memory
|
|
104
111
|
|
|
105
112
|
### Example Session
|
|
106
113
|
|
|
@@ -115,10 +122,11 @@ $ claude-launcher
|
|
|
115
122
|
|
|
116
123
|
→ Launch Claude Code
|
|
117
124
|
Launch Claude Code (Skip Permissions)
|
|
125
|
+
Launch Claude Code (Enable Auto Mode)
|
|
118
126
|
Launch Claude Code with Third-party API
|
|
119
127
|
Launch Claude Code with Third-party API (Skip Permissions)
|
|
120
128
|
Third-party API Management
|
|
121
|
-
|
|
129
|
+
Configuration Management
|
|
122
130
|
Version Update Check
|
|
123
131
|
Exit
|
|
124
132
|
```
|
|
@@ -131,12 +139,13 @@ Access comprehensive API management through the dedicated menu:
|
|
|
131
139
|
📋 Third-party API Management
|
|
132
140
|
|
|
133
141
|
→ Add New API
|
|
142
|
+
Edit API → Select API → Edit name/provider/URL/model
|
|
134
143
|
Remove API → Delete Single API / Clear All APIs
|
|
135
144
|
Switch Active API
|
|
136
145
|
View Statistics → View Details / Reset Statistics
|
|
137
146
|
Model Upgrade → Auto Upgrade [ON/OFF] / Manual Upgrade
|
|
138
|
-
Export Configuration
|
|
139
|
-
Import Configuration
|
|
147
|
+
Export Configuration 🔒 (password required)
|
|
148
|
+
Import Configuration 🔒 (password required)
|
|
140
149
|
Change Password
|
|
141
150
|
Back to Main Menu
|
|
142
151
|
```
|
|
@@ -152,7 +161,7 @@ The launcher automatically checks for model upgrades when you start:
|
|
|
152
161
|
|
|
153
162
|
### Modern Configuration System
|
|
154
163
|
|
|
155
|
-
Claude Launcher
|
|
164
|
+
Claude Launcher uses an advanced configuration system:
|
|
156
165
|
|
|
157
166
|
1. **Encrypted JSON Storage**: Configuration stored at `~/.claude-launcher-apis.json`
|
|
158
167
|
2. **Interactive Setup**: First-time wizard guides you through all options
|
|
@@ -171,7 +180,7 @@ Claude Launcher 2.0 uses an advanced configuration system:
|
|
|
171
180
|
|
|
172
181
|
Configure any third-party API provider through the interactive interface:
|
|
173
182
|
|
|
174
|
-
- **Supported Providers**: Anthropic,
|
|
183
|
+
- **Supported Providers**: Anthropic, DeepSeek, Moonshot/Kimi (K2.5), MiniMax (CN/Global, M2.7), GLM/ZhiPu AI (GLM-5.1), and custom Anthropic-compatible APIs
|
|
175
184
|
- **Secure Storage**: All API tokens encrypted before storage
|
|
176
185
|
- **Validation**: Real-time validation of URLs, tokens, and models
|
|
177
186
|
- **Usage Tracking**: Monitor API usage statistics with success/failure rates
|
|
@@ -212,6 +221,12 @@ cd claude-launcher
|
|
|
212
221
|
npm install
|
|
213
222
|
```
|
|
214
223
|
|
|
224
|
+
### Running Tests
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
npm test
|
|
228
|
+
```
|
|
229
|
+
|
|
215
230
|
### Testing Locally
|
|
216
231
|
|
|
217
232
|
```bash
|