@kikkimo/claude-launcher 2.5.0 → 3.1.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 +70 -0
- package/README.md +23 -13
- package/claude-launcher +1244 -432
- package/docs/README-zh.md +23 -13
- package/lib/api-manager.js +629 -70
- 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 +229 -13
- package/lib/i18n/locales/en.js +235 -13
- package/lib/i18n/locales/es.js +229 -13
- package/lib/i18n/locales/fr.js +229 -13
- package/lib/i18n/locales/it.js +229 -13
- package/lib/i18n/locales/ja.js +229 -13
- package/lib/i18n/locales/ko.js +229 -13
- package/lib/i18n/locales/pt.js +229 -13
- package/lib/i18n/locales/ru.js +229 -13
- package/lib/i18n/locales/zh-TW.js +229 -13
- package/lib/i18n/locales/zh.js +235 -13
- package/lib/launcher.js +167 -110
- package/lib/presets/providers.js +143 -39
- package/lib/ui/api-editor.js +668 -0
- package/lib/ui/i18n-labels.js +16 -0
- package/lib/ui/interactive-table.js +216 -99
- package/lib/ui/menu.js +79 -62
- 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 +65 -4
- package/lib/validators.js +102 -1
- package/package.json +2 -2
- package/docs/superpowers/plans/2026-03-31-update-models-and-auto-mode.md +0 -1414
- package/docs/superpowers/specs/2026-03-31-update-models-and-auto-mode-design.md +0 -187
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,76 @@ 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.1.0] - 2026-05-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **6-Step Add API Wizard**: Multi-step wizard (Provider → URL → Token → Model → Name → Confirm) with state machine. Esc/back navigation between steps, pre-create duplicate detection with branch UI, draft editing before persistence, and race-condition handling at persist time.
|
|
12
|
+
- **Draft Layer**: `buildApiDraft()` / `applyDraftEnvChange()` / `deleteDraftCustomEnvVar()` static methods on `ApiManager` for pre-persist config editing without touching disk.
|
|
13
|
+
- **Model Tier Auto-Matching**: Same-generation tier templates for all 9 providers — Anthropic auto-detects Opus/Sonnet/Haiku from model list; DeepSeek maps pro→flash; GLM maps 5.1→5-turbo; Moonshot maps k2.6→k2-thinking-turbo; MiniMax maps M2.x→M2.x-highspeed. Subagent defaults to Haiku tier (per Anthropic recommendation).
|
|
14
|
+
- **Provider Default Values**: All 9 providers now carry runtime env defaults (`API_TIMEOUT_MS`, `CLAUDE_CODE_ATTRIBUTION_HEADER: '0'`, `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1'`, etc.). DeepSeek defaults `CLAUDE_CODE_EFFORT_LEVEL` to `max`. Moonshot/Kimi/MiniMax/GLM default `CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: '1'`.
|
|
15
|
+
- **Comprehensive Hint System**: 12 field-level `_detail` hints across all 11 locales — each shows field description + corresponding env var `[KEY]` + dynamic value source (provider default / manual / built-in default). Both list pages and edit sub-pages covered.
|
|
16
|
+
- **New i18n Sections**: `page`, `action`, `prompt`, `add_api`, `summary`, `confirm`, `config_labels.model/runtime` — ~50 new keys across all 11 languages.
|
|
17
|
+
- **New i18n Keys**: `hints.model.*_detail`, `hints.runtime.*_detail`, `hints.runtime.source_*`, `hints.runtime.effort_values`, `action.cancel_config`, `add_api.confirm_page_prompt`, `errors.api.not_found`, `status.auto`, `config.values.recommended_on`, `navigation.enter_to_edit/select`, `navigation.input_1_to_n_or_q`, `navigation.invalid_selection`.
|
|
18
|
+
- **Menu Component** `navigationKey` param + `_navigationKey` cache passed through all redraws. Non-TTY fallback now renders numbered prefixes (`1.`, `2.`) and i18n prompts. `selectFromList()` prompts i18n'd.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **Runtime Config Display**: "Default" replaced with actual provider values (e.g. `600000`, `0`, `max`). TYPE_A `'1'` shown as "Enabled", `'off'` as "Disabled". Fields without provider default shown as `(not set)` via new `status.auto` key.
|
|
22
|
+
- **Config Label i18n**: `i18nLabel()` helper resolves `config_labels.<section>.<key>` lookup before falling back to English constants. Labels now follow user locale.
|
|
23
|
+
- **Edit API Menu**: 3 env entries merged into single "Model & Runtime Config" entry with summary counts (7→5 items). Sub-pages restructured as 3-section home with per-section hints.
|
|
24
|
+
- **Model/Runtime List Pages**: Dynamic column alignment via `getStringWidth()`/`padStringToWidth()` instead of hardcoded `padEnd(24)`. Labels align correctly in all languages.
|
|
25
|
+
- **Experimental Features Label**: All 11 locales updated from ambiguous "Experimental Features" to "Disable Experimental Features" matching `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` semantics.
|
|
26
|
+
- **noFlicker Default**: Now defaults to `true` (On, recommended) matching telemetry's default pattern. Added `config.values.recommended_on` key.
|
|
27
|
+
- **API Default Name**: Simplified from `"Provider Name model-name"` to `"ProviderShort #N"` with auto-increment counting by short-name prefix (moonshot + kimi_for_coding share "Moonshot AI" prefix).
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- **Confirmation Page Rendering**: Content passed via `versionInfo` parameter to Menu instead of `screen.render()` that was immediately overwritten by `displayMenu()`.
|
|
31
|
+
- **Confirmation Page Back Button**: Changed from "Back" to "Cancel" (`action.cancel_config`) — exits to main menu without saving.
|
|
32
|
+
- **Token Input**: Removed misleading "empty to restore recommended" hint; added minimum 10-character validation.
|
|
33
|
+
- **Exit Handling**: `addNewThirdPartyApi` state machine wrapped in try-catch so `exit` at any step returns to main menu gracefully.
|
|
34
|
+
- **Locale File Structure**: Fixed `nonstreaming` key having `},` on the same line, premature `runtime` section closure causing `source_*` keys to land at wrong nesting level.
|
|
35
|
+
|
|
36
|
+
## [3.0.0] - 2026-04-07
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
- **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.
|
|
40
|
+
- New `lib/ui/screen.js` singleton: `render()`, `write()`, `enter()`, `exit()`, `exitForHandoff()`, `debug()`, `showCursor()`/`hideCursor()`, `setReadlineActive()`, `isActive()`
|
|
41
|
+
- Test mode (`SCREEN_TEST=1`): source-tagged write interception for automated leak detection
|
|
42
|
+
- Degradation: non-TTY passthrough, `SCREEN_NO_ALT=1` manual override
|
|
43
|
+
- **Edit API Feature**: New menu item to modify API name, provider, base URL, and model (API key not editable)
|
|
44
|
+
- Field-by-field editing with per-field validation (reuses Add API validators)
|
|
45
|
+
- Provider selection via preset list (not free text), preserves provider-specific envVars/timeout/upgrade detection
|
|
46
|
+
- Provider/URL mismatch warning in field menu hint area
|
|
47
|
+
- Auto-save per field edit with success/cancel feedback
|
|
48
|
+
- **Unified Password Guard**: Shared `passwordGuard()` function protects delete, edit, import, export operations
|
|
49
|
+
- Mode A (delete/edit): guard at dispatch layer with header display
|
|
50
|
+
- Mode B (export/import): guard inside handler after title page
|
|
51
|
+
- Handles wrong password, empty password, Esc cancel, Ctrl+C delegation distinctly
|
|
52
|
+
- Defense-in-depth: export/import return false when no password set
|
|
53
|
+
- **API Table Pagination**: ←→ page navigation for API selection tables (remove/switch/edit)
|
|
54
|
+
- Dynamic items-per-page based on terminal height
|
|
55
|
+
- Per-page selection memory across page switches
|
|
56
|
+
- 3 pure testable helpers: `calculatePagination()`, `initPaginationState()`, `handlePageKeyPress()`
|
|
57
|
+
- Legacy >99 API defensive guard with display truncation + warning
|
|
58
|
+
- **API Count Limit**: Maximum 99 APIs enforced in `addApi()` and import path
|
|
59
|
+
- **Launch Handoff Lifecycle**: Clean `screen.exitForHandoff()` → normal terminal output → `relinquishConsoleToChild()` → spawn sequence
|
|
60
|
+
- `handleLaunchFailure()` promoted to module-level with `rollbackFn(errorMessage)` callback chain
|
|
61
|
+
- Pre-handoff errors show in alt-screen; post-handoff errors use press-key + 60s timeout + exit
|
|
62
|
+
- **Menu Hint Enhancements**: Password-required hints (🔒) for edit/remove/export/import when password is set
|
|
63
|
+
- **Navigation i18n**: Action words (edit/remove/switch/select) fully localized across 11 locales
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
- **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
|
|
67
|
+
- **Menu Component**: `displayMenu()` and `navigate()` now use `screen.render()` for absolute positioning; `clearScreen` parameter removed from `navigate()` signature
|
|
68
|
+
- **Interactive Table**: Refactored to `screen.render()` with pagination support; action text localized via i18n keys
|
|
69
|
+
- **Signal Ownership**: Global SIGINT handler respects `handleCtrlC()` return value (first Ctrl+C = warning only); SIGTERM/uncaughtException/unhandledRejection handlers call `screen.exit()` before exit
|
|
70
|
+
- **Launcher Lifecycle**: `relinquishConsoleToChild()` moved before `spawn()` for clean handoff; `updateApiModel()` delegates to `updateApiField()` for unified validation
|
|
71
|
+
- **Default Config Language**: Changed from `zh` to `en` in `loadConfig()`/`loadConfigSync()` to match `LanguageManager` default; config file written on first run
|
|
72
|
+
- **Hint Area Spacing**: Extra space after ℹ icon; multi-line hint indentation aligned
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
- **First-run Language Bug**: Deleting config and restarting no longer switches from English to Chinese on second launch
|
|
76
|
+
- **Field Menu CJK Alignment**: Label padding uses `getStringWidth()`/`padStringToWidth()` for correct CJK character width
|
|
77
|
+
|
|
8
78
|
## [2.5.0] - 2026-03-31
|
|
9
79
|
|
|
10
80
|
### Added
|
package/README.md
CHANGED
|
@@ -13,24 +13,32 @@ 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
|
|
29
|
-
-
|
|
31
|
+
- Full support for 9 third-party API providers (Anthropic, DeepSeek, Kimi K2.6, MiniMax M2.7, GLM-5.1/ZhiPu AI, and custom APIs)
|
|
32
|
+
- **6-Step Add API Wizard**: Provider → URL → Token → Model → Name → Config Confirm with pre-create duplicate detection, back navigation between steps, and inline config editing before persist
|
|
33
|
+
- **Env Config Editor**: Edit model config (6 fields: Sonnet/Opus/Haiku/Subagent/Custom), runtime config (6 fields: timeout/attribution/nonessential/effort/experimental/nonstreaming), and custom env vars — with per-field hints, provider default values, and overridden markers
|
|
34
|
+
- **Auto Model Tier Matching**: Same-generation auto-matching for all providers (AnthropicOpus/Sonnet/Haiku, DeepSeek pro/flash, GLM 5.1/turbo, etc.)
|
|
35
|
+
- **Interactive API Editing**: Modify name, provider, base URL, model, and all env configs for existing APIs
|
|
36
|
+
- Dynamic column alignment and comprehensive field hints across all supported languages
|
|
30
37
|
- API usage statistics with success/failure tracking
|
|
31
38
|
- Model upgrade notifications and auto-upgrade support
|
|
32
39
|
- Secure configuration backup and restore
|
|
33
40
|
- Easy API switching, removal, and bulk clear
|
|
41
|
+
- Maximum 99 APIs supported per configuration
|
|
34
42
|
|
|
35
43
|
### 🌍 **Enterprise-grade Features**
|
|
36
44
|
- Global installation - use `claude-launcher` from anywhere
|
|
@@ -88,20 +96,21 @@ node claude-launcher
|
|
|
88
96
|
4. **Launch Claude Code with Third-party API** - Use configured third-party API
|
|
89
97
|
5. **Launch Claude Code with Third-party API (Skip Permissions)** - Combine third-party API with permission skipping
|
|
90
98
|
6. **Third-party API Management** - Full API lifecycle management:
|
|
91
|
-
- Add, switch, and remove APIs
|
|
99
|
+
- Add, edit, switch, and remove APIs
|
|
92
100
|
- View usage statistics with success/failure rates
|
|
93
101
|
- Model upgrade settings (auto/manual upgrade)
|
|
94
|
-
- Import/export configurations
|
|
95
|
-
7. **
|
|
102
|
+
- Import/export configurations (password-protected)
|
|
103
|
+
7. **Configuration Management** - Language, telemetry, launch mode, model upgrade settings
|
|
96
104
|
8. **Version Update Check** - Check for launcher updates
|
|
97
105
|
9. **Exit** - Close the launcher
|
|
98
106
|
|
|
99
107
|
### Interactive Navigation
|
|
100
108
|
|
|
101
|
-
- **Arrow Keys**: Use ↑↓ to navigate, Enter to select
|
|
102
|
-
- **Escape Key**: Press Esc to go back or
|
|
109
|
+
- **Arrow Keys**: Use ↑↓ to navigate, ←→ to switch pages (in paginated tables), Enter to select
|
|
110
|
+
- **Escape Key**: Press Esc to go back or cancel
|
|
111
|
+
- **Ctrl+C**: First press shows warning, second press exits cleanly
|
|
103
112
|
- **Multi-language**: All interface text adapts to your selected language
|
|
104
|
-
- **Smart Tables**:
|
|
113
|
+
- **Smart Tables**: Paginated interactive tables for API management with per-page selection memory
|
|
105
114
|
|
|
106
115
|
### Example Session
|
|
107
116
|
|
|
@@ -120,7 +129,7 @@ $ claude-launcher
|
|
|
120
129
|
Launch Claude Code with Third-party API
|
|
121
130
|
Launch Claude Code with Third-party API (Skip Permissions)
|
|
122
131
|
Third-party API Management
|
|
123
|
-
|
|
132
|
+
Configuration Management
|
|
124
133
|
Version Update Check
|
|
125
134
|
Exit
|
|
126
135
|
```
|
|
@@ -133,12 +142,13 @@ Access comprehensive API management through the dedicated menu:
|
|
|
133
142
|
📋 Third-party API Management
|
|
134
143
|
|
|
135
144
|
→ Add New API
|
|
145
|
+
Edit API → Select API → Edit name/provider/URL/model
|
|
136
146
|
Remove API → Delete Single API / Clear All APIs
|
|
137
147
|
Switch Active API
|
|
138
148
|
View Statistics → View Details / Reset Statistics
|
|
139
149
|
Model Upgrade → Auto Upgrade [ON/OFF] / Manual Upgrade
|
|
140
|
-
Export Configuration
|
|
141
|
-
Import Configuration
|
|
150
|
+
Export Configuration 🔒 (password required)
|
|
151
|
+
Import Configuration 🔒 (password required)
|
|
142
152
|
Change Password
|
|
143
153
|
Back to Main Menu
|
|
144
154
|
```
|
|
@@ -154,7 +164,7 @@ The launcher automatically checks for model upgrades when you start:
|
|
|
154
164
|
|
|
155
165
|
### Modern Configuration System
|
|
156
166
|
|
|
157
|
-
Claude Launcher
|
|
167
|
+
Claude Launcher uses an advanced configuration system:
|
|
158
168
|
|
|
159
169
|
1. **Encrypted JSON Storage**: Configuration stored at `~/.claude-launcher-apis.json`
|
|
160
170
|
2. **Interactive Setup**: First-time wizard guides you through all options
|
|
@@ -173,7 +183,7 @@ Claude Launcher 2.0 uses an advanced configuration system:
|
|
|
173
183
|
|
|
174
184
|
Configure any third-party API provider through the interactive interface:
|
|
175
185
|
|
|
176
|
-
- **Supported Providers**: Anthropic, DeepSeek, Moonshot/Kimi (K2.
|
|
186
|
+
- **Supported Providers**: Anthropic (Opus 4.7/Sonnet 4.6/Haiku 4.5), DeepSeek (V4-Pro/V4-Flash), Moonshot/Kimi (K2.6), MiniMax CN/Global (M2.7), ZhiPu AI/Z.ai (GLM-5.1/5-Turbo), and custom Anthropic-compatible APIs
|
|
177
187
|
- **Secure Storage**: All API tokens encrypted before storage
|
|
178
188
|
- **Validation**: Real-time validation of URLs, tokens, and models
|
|
179
189
|
- **Usage Tracking**: Monitor API usage statistics with success/failure rates
|