From 2b35bf419f719b0a5392d08cb5d3e2ee32f505e2 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Wed, 5 Nov 2025 16:51:30 -0500 Subject: [PATCH] chore: release v2.4.6 with improved npm compatibility and fixes - fix color detection for cross-platform TTY compatibility - enhance help command with npm-specific content and npx examples - remove --install/--uninstall flags pending .claude/ integration testing - update version across all files and documentation - preserve implementation code for future release readiness --- CHANGELOG.md | 23 +++++ CLAUDE.md | 5 +- README.md | 31 ------- README.vi.md | 31 ------- VERSION | 2 +- bin/ccs.js | 138 +++++++++++++++++++++++------ bin/helpers.js | 43 ++++++--- docs/en/usage.md | 22 +++-- docs/project-overview-pdr.md | 4 +- docs/system-architecture.md | 2 +- docs/vi/usage.vi.md | 22 ++--- installers/install.ps1 | 2 +- installers/install.sh | 2 +- lib/ccs | 51 +++++++---- lib/ccs.ps1 | 29 +++--- package.json | 2 +- tests/npm/special-commands.test.js | 14 +-- 17 files changed, 258 insertions(+), 165 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ff1ec70..ad262d43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ All notable changes to CCS will be documented here. Format based on [Keep a Changelog](https://keepachangelog.com/). +## [2.4.6] - 2025-11-05 + +### Changed +- Help command shows CCS-specific content with npm adaptations (npx examples first) +- Color detection improved for better cross-platform compatibility +- Both `-v`/`--version` and `-h`/`--help` work identically to native installers + +### Fixed +- **Color Detection**: Fixed TTY detection logic to properly disable colors when output is redirected + +### Technical Details +- **Files Modified**: `bin/helpers.js` (color utilities), `bin/ccs.js` (version/help handlers) +- **New Functions**: `getColors()`, `colored()` with dynamic TTY detection + +### Removed +- **--install flag**: Temporarily removed from user-facing interfaces (WIP: .claude/ integration testing incomplete) +- **--uninstall flag**: Temporarily removed from user-facing interfaces (WIP: testing incomplete) + +### Developer Notes +- Implementation code preserved (commented) for future release +- Test suites marked as skipped pending testing completion +- `.claude/` directory content remains in repository + ## [2.4.5] - 2025-11-05 ### 📊 Performance Analysis diff --git a/CLAUDE.md b/CLAUDE.md index fe993f30..d9300c01 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -220,7 +220,8 @@ Use `./scripts/bump-version.sh` to update all locations atomically. The `ccs` wrapper uses smart detection: - No args OR first arg starts with `-` → use default profile - First arg doesn't start with `-` → treat as profile name -- Special flags handled BEFORE profile detection: `--version`, `-v`, `--help`, `-h`, `--install` +- Special flags handled BEFORE profile detection: `--version`, `-v`, `--help`, `-h` +- WIP: `--install` / `--uninstall` flags disabled pending .claude/ integration testing ### Installation Modes - **Git mode**: Running from cloned repository (symlinks executables) @@ -297,7 +298,7 @@ The `.claude/` folder contains: - `/ccs` command: Meta-command for delegating tasks to different models - `ccs-delegation` skill: Intelligent task delegation patterns -Install with: `ccs --install` (copies to `~/.claude/`) +**WIP**: Installation via `ccs --install` disabled pending .claude/ integration testing ## Error Handling Philosophy diff --git a/README.md b/README.md index e6b0a614..9dc906fd 100644 --- a/README.md +++ b/README.md @@ -191,35 +191,6 @@ graph LR - **Context Preservation**: Your workflow remains uninterrupted - **Seamless Integration**: Works exactly like native Claude CLI -### Task Delegation - -> **🚧 Work in Progress**: This feature is experimental and not fully tested. Use with caution. - -CCS includes intelligent task delegation via the `/ccs` meta-command: - -**Install CCS commands:** -```bash -ccs --install # Install /ccs command to Claude CLI -``` - -**Use task delegation:** -```bash -# After running ccs --install, you can use: -/ccs glm /plan "add user authentication" -/ccs glm /code "implement auth endpoints" -/ccs glm /ask "explain this error" -``` - -**Remove when not needed:** -```bash -ccs --uninstall # Remove /ccs command from Claude CLI -``` - -**Benefits**: -- ✅ Save tokens by delegating simple tasks to cheaper models -- ✅ Use right model for each task automatically -- ✅ Seamless integration with existing workflows -- ✅ Clean installation and removal when needed --- @@ -229,8 +200,6 @@ ccs --uninstall # Remove /ccs command from Claude CLI ccs # Use Claude subscription (default) ccs glm # Use GLM fallback ccs --version # Show CCS version and install location -ccs --install # Install CCS commands and skills to ~/.claude/ -ccs --uninstall # Remove CCS commands and skills from ~/.claude/ ``` --- diff --git a/README.vi.md b/README.vi.md index e29adbe3..cda09f9b 100644 --- a/README.vi.md +++ b/README.vi.md @@ -190,35 +190,6 @@ graph LR - **Bảo Toàn Context**: Workflow của bạn không bị gián đoạn - **Tích Hợp Liền Mạch**: Hoạt động chính xác như Claude CLI native -### Delegation Tác Vụ - -> **🚧 Đang phát triển**: Tính năng này đang trong giai đoạn thử nghiệm và chưa được kiểm tra đầy đủ. Sử dụng với cẩn thận. - -CCS bao gồm delegation tác vụ thông minh qua meta-command `/ccs`: - -**Cài đặt lệnh CCS:** -```bash -ccs --install # Cài đặt lệnh /ccs vào Claude CLI -``` - -**Sử dụng delegation tác vụ:** -```bash -# Sau khi chạy ccs --install, bạn có thể dùng: -/ccs glm /plan "add user authentication" -/ccs glm /code "implement auth endpoints" -/ccs glm /ask "explain this error" -``` - -**Gỡ bỏ khi không cần:** -```bash -ccs --uninstall # Gỡ bỏ lệnh /ccs khỏi Claude CLI -``` - -**Lợi ích**: -- ✅ Tiết kiệm tokens bằng cách delegation tác vụ đơn giản cho model rẻ hơn -- ✅ Dùng đúng model cho từng tác vụ tự động -- ✅ Tích hợp liền mạch với workflows hiện có -- ✅ Cài đặt và gỡ bỏ sạch sẽ khi cần --- @@ -228,8 +199,6 @@ ccs --uninstall # Gỡ bỏ lệnh /ccs khỏi Claude CLI ccs # Dùng Claude subscription (mặc định) ccs glm # Dùng GLM fallback ccs --version # Hiển thị phiên bản CCS và vị trí cài đặt -ccs --install # Cài đặt lệnh và kỹ năng CCS vào ~/.claude/ -ccs --uninstall # Gỡ bỏ lệnh và kỹ năng CCS khỏi ~/.claude/ ``` --- diff --git a/VERSION b/VERSION index 59aa62c1..7bf4b6a8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4.5 +2.4.6 diff --git a/bin/ccs.js b/bin/ccs.js index 07056525..5d5073ea 100755 --- a/bin/ccs.js +++ b/bin/ccs.js @@ -4,9 +4,9 @@ const { spawn } = require('child_process'); const path = require('path'); const fs = require('fs'); -const { error } = require('./helpers'); +const { error, colored } = require('./helpers'); const { detectClaudeCli, showClaudeNotFoundError } = require('./claude-detector'); -const { getSettingsPath } = require('./config-manager'); +const { getSettingsPath, getConfigPath } = require('./config-manager'); // Version (sync with package.json) const CCS_VERSION = require('../package.json').version; @@ -26,42 +26,127 @@ function execClaude(claudeCli, args) { // Special command handlers function handleVersionCommand() { - console.log(`CCS (Claude Code Switch) version ${CCS_VERSION}`); + // Title + console.log(colored(`CCS (Claude Code Switch) v${CCS_VERSION}`, 'bold')); + console.log(''); - // Show install location - const installLocation = process.argv[1]; - if (installLocation) { - console.log(`Installed at: ${installLocation}`); - } + // Installation section + console.log(colored('Installation:', 'cyan')); + + // Location + const installLocation = process.argv[1] || '(not found)'; + console.log(` ${colored('Location:', 'cyan')} ${installLocation}`); + + // Config path + const configPath = getConfigPath(); + console.log(` ${colored('Config:', 'cyan')} ${configPath}`); + console.log(''); + + // Documentation + console.log(`${colored('Documentation:', 'cyan')} https://github.com/kaitranntt/ccs`); + console.log(`${colored('License:', 'cyan')} MIT`); + console.log(''); + + // Help hint + console.log(colored('Run \'ccs --help\' for usage information', 'yellow')); - console.log('https://github.com/kaitranntt/ccs'); process.exit(0); } -function handleHelpCommand(remainingArgs) { - const claudeCli = detectClaudeCli(); - if (!claudeCli) { - showClaudeNotFoundError(); - process.exit(1); - } +function handleHelpCommand() { + // Title + console.log(colored('CCS (Claude Code Switch) - Instant profile switching for Claude CLI', 'bold')); + console.log(''); - execClaude(claudeCli, ['--help', ...remainingArgs]); + // Usage + console.log(colored('Usage:', 'cyan')); + console.log(` ${colored('ccs', 'yellow')} [profile] [claude-args...]`); + console.log(` ${colored('ccs', 'yellow')} [flags]`); + console.log(''); + + // Description + console.log(colored('Description:', 'cyan')); + console.log(' Switch between Claude models instantly. Stop hitting rate limits.'); + console.log(' Maps profile names to Claude settings files via ~/.ccs/config.json'); + console.log(''); + + // Profile Switching + console.log(colored('Profile Switching:', 'cyan')); + console.log(` ${colored('ccs', 'yellow')} Use default profile`); + console.log(` ${colored('ccs glm', 'yellow')} Switch to GLM profile`); + console.log(` ${colored('ccs glm', 'yellow')} "debug this code" Switch to GLM and run command`); + console.log(` ${colored('ccs glm', 'yellow')} --verbose Switch to GLM with Claude flags`); + console.log(''); + + // Flags + console.log(colored('Flags:', 'cyan')); + console.log(` ${colored('-h, --help', 'yellow')} Show this help message`); + console.log(` ${colored('-v, --version', 'yellow')} Show version and installation info`); + console.log(''); + + // Configuration + console.log(colored('Configuration:', 'cyan')); + console.log(' Config File: ~/.ccs/config.json'); + console.log(' Settings: ~/.ccs/*.settings.json'); + console.log(' Environment: CCS_CONFIG (override config path)'); + console.log(''); + + // Examples + console.log(colored('Examples:', 'cyan')); + console.log(' # Try without installing'); + console.log(` ${colored('npx @kaitranntt/ccs glm', 'yellow')} "write tests"`); + console.log(''); + console.log(' # Use default Claude subscription'); + console.log(` ${colored('ccs', 'yellow')} "Review this architecture"`); + console.log(''); + console.log(' # Switch to GLM for cost-effective tasks'); + console.log(` ${colored('ccs glm', 'yellow')} "Write unit tests"`); + console.log(''); + console.log(' # Use GLM with verbose output'); + console.log(` ${colored('ccs glm', 'yellow')} --verbose "Debug error"`); + console.log(''); + + // Uninstall + console.log(colored('Uninstall:', 'yellow')); + console.log(' npm: npm uninstall -g @kaitranntt/ccs'); + console.log(' macOS/Linux: curl -fsSL ccs.kaitran.ca/uninstall | bash'); + console.log(' Windows: irm ccs.kaitran.ca/uninstall | iex'); + console.log(''); + + // Documentation + console.log(colored('Documentation:', 'cyan')); + console.log(` GitHub: ${colored('https://github.com/kaitranntt/ccs', 'cyan')}`); + console.log(' Docs: https://github.com/kaitranntt/ccs/blob/main/README.md'); + console.log(' Issues: https://github.com/kaitranntt/ccs/issues'); + console.log(''); + + // License + console.log(`${colored('License:', 'cyan')} MIT`); + + process.exit(0); } function handleInstallCommand() { - // Implementation for --install (copy commands/skills to ~/.claude) - console.log('[Installing CCS Commands and Skills]'); - console.log('Feature not yet implemented in Node.js standalone'); - console.log('Use traditional installer for now:'); - console.log(' curl -fsSL ccs.kaitran.ca/install | bash'); + console.log(''); + console.log('Feature not available'); + console.log(''); + console.log('The --install flag is currently under development.'); + console.log('.claude/ integration testing is not complete.'); + console.log(''); + console.log('For updates: https://github.com/kaitranntt/ccs/issues'); + console.log(''); process.exit(0); } function handleUninstallCommand() { - // Implementation for --uninstall (remove commands/skills from ~/.claude) - console.log('[Uninstalling CCS Commands and Skills]'); - console.log('Feature not yet implemented in Node.js standalone'); - console.log('Use traditional uninstaller for now'); + console.log(''); + console.log('Feature not available'); + console.log(''); + console.log('The --uninstall flag is currently under development.'); + console.log('.claude/ integration testing is not complete.'); + console.log(''); + console.log('For updates: https://github.com/kaitranntt/ccs/issues'); + console.log(''); process.exit(0); } @@ -88,8 +173,7 @@ function main() { // Special case: help command if (firstArg === '--help' || firstArg === '-h' || firstArg === 'help') { - const remainingArgs = args.slice(1); - handleHelpCommand(remainingArgs); + handleHelpCommand(); return; } diff --git a/bin/helpers.js b/bin/helpers.js index c886b129..283bcd19 100644 --- a/bin/helpers.js +++ b/bin/helpers.js @@ -4,16 +4,38 @@ const fs = require('fs'); const path = require('path'); const os = require('os'); -// Color formatting (TTY-aware) -const useColors = process.stderr.isTTY && !process.env.NO_COLOR; -const colors = useColors ? { - red: '\x1b[0;31m', - yellow: '\x1b[1;33m', - cyan: '\x1b[0;36m', - green: '\x1b[0;32m', - bold: '\x1b[1m', - reset: '\x1b[0m' -} : { red: '', yellow: '', cyan: '', green: '', bold: '', reset: '' }; +// TTY-aware color detection (matches lib/ccs bash logic) +function getColors() { + const forcedColors = process.env.FORCE_COLOR; + const noColor = process.env.NO_COLOR; + const isTTY = process.stdout.isTTY === true; // Must be explicitly true + + const useColors = forcedColors || (isTTY && !noColor); + + if (useColors) { + return { + red: '\x1b[0;31m', + yellow: '\x1b[1;33m', + cyan: '\x1b[0;36m', + green: '\x1b[0;32m', + bold: '\x1b[1m', + reset: '\x1b[0m' + }; + } + + return { red: '', yellow: '', cyan: '', green: '', bold: '', reset: '' }; +} + + +// Colors object (dynamic) +const colors = getColors(); + +// Helper: Apply color to text (returns plain text if colors disabled) +function colored(text, colorName = 'reset') { + const currentColors = getColors(); + const color = currentColors[colorName] || ''; + return color ? `${color}${text}${currentColors.reset}` : text; +} // Simple error formatting function error(message) { @@ -44,6 +66,7 @@ function expandPath(pathStr) { module.exports = { colors, + colored, error, expandPath }; \ No newline at end of file diff --git a/docs/en/usage.md b/docs/en/usage.md index ecc624c6..e029d60a 100644 --- a/docs/en/usage.md +++ b/docs/en/usage.md @@ -80,8 +80,6 @@ ccs glm /code "implement feature" ```bash ccs --version # Show enhanced version info with installation details ccs --help # Show CCS-specific help documentation -ccs --install # Install CCS commands and skills to ~/.claude/ -ccs --uninstall # Remove CCS commands and skills from ~/.claude/ ``` **Example `--version` Output**: @@ -121,19 +119,19 @@ The official uninstaller completely removes CCS including configs and PATH modif - Linux: `~/.local/bin/ccs` - Windows: `%USERPROFILE%\.ccs\ccs.ps1` -### Installing Commands and Skills +### 🚧 Features in Development -To use the task delegation feature, you need to install the CCS commands and skills to your Claude CLI directory: +#### .claude/ Integration -```bash -# Install CCS delegation commands and skills -ccs --install -``` +Task delegation via `--install` / `--uninstall` flags currently under development. -This will: -- Copy `/ccs` command to `~/.claude/commands/ccs.md` -- Copy `ccs-delegation` skill to `~/.claude/skills/ccs-delegation/` -- Skip existing files (won't overwrite your customizations) +**Status**: Testing incomplete, not available in current release + +**Implementation**: Core functionality exists but disabled pending testing + +**Timeline**: No ETA - follow GitHub issues for updates + +**For Now**: Use direct profile switching (`ccs glm`) for model selection **Output Example**: ``` diff --git a/docs/project-overview-pdr.md b/docs/project-overview-pdr.md index 91d01bc8..f5016578 100644 --- a/docs/project-overview-pdr.md +++ b/docs/project-overview-pdr.md @@ -61,8 +61,8 @@ Provide developers with instant, zero-downtime switching between AI models, opti - **Acceptance Criteria**: - `ccs --version` displays version and installation location - `ccs --help` shows usage information - - `ccs --install` integrates with Claude Code commands - - `ccs --uninstall` removes Claude Code integration + - **WIP**: `ccs --install` integrates with Claude Code commands (testing incomplete) + - **WIP**: `ccs --uninstall` removes Claude Code integration (testing incomplete) #### FR-006: Error Handling **Requirement**: System shall provide clear, actionable error messages diff --git a/docs/system-architecture.md b/docs/system-architecture.md index 5bd6c6ab..78f14a73 100644 --- a/docs/system-architecture.md +++ b/docs/system-architecture.md @@ -62,7 +62,7 @@ graph TB **Key Responsibilities**: - Argument parsing and profile detection -- Special command handling (--version, --help, --install, --uninstall) +- Special command handling (--version, --help) [--install/--uninstall WIP] - Unified process execution through `execClaude()` - Error propagation and exit code management diff --git a/docs/vi/usage.vi.md b/docs/vi/usage.vi.md index 79d30b41..7f6f2495 100644 --- a/docs/vi/usage.vi.md +++ b/docs/vi/usage.vi.md @@ -77,8 +77,6 @@ ccs glm /code "implement feature" ```bash ccs --version # Hiển thị thông tin phiên bản nâng cao với chi tiết cài đặt ccs --help # Hiển thị tài liệu trợ giúp riêng của CCS -ccs --install # Cài đặt commands và skills CCS vào ~/.claude/ -ccs --uninstall # Gỡ bỏ commands và skills CCS khỏi ~/.claude/ ``` **Ví Dụ Output `--version`**: @@ -115,17 +113,19 @@ Uninstaller chính thức gỡ bỏ hoàn toàn CCS bao gồm cả cấu hình v ### Cài Đặt Commands và Skills -Để sử dụng tính năng delegation tác vụ, bạn cần cài đặt commands và skills CCS vào thư mục Claude CLI: +### 🚧 Tính Năng Đang Phát Triển -```bash -# Cài đặt commands và skills delegation CCS -ccs --install -``` +#### Tích hợp .claude/ -Điều này sẽ: -- Copy lệnh `/ccs` vào `~/.claude/commands/ccs.md` -- Copy skill `ccs-delegation` vào `~/.claude/skills/ccs-delegation/` -- Bỏ qua file đã tồn tại (không ghi đè customization của bạn) +Delegation tác vụ qua flags `--install` / `--uninstall` đang được phát triển. + +**Trạng Thái**: Testing chưa hoàn tất, không có sẵn trong release hiện tại + +**Implementation**: Chức năng cốt lõi đã có nhưng bị vô hiệu hóa pending testing + +**Timeline**: Chưa có ETA - theo dõi GitHub issues để cập nhật + +**Hiện Tại**: Sử dụng chuyển profile trực tiếp (`ccs glm`) để lựa chọn model **Ví Dụ Output**: ``` diff --git a/installers/install.ps1 b/installers/install.ps1 index 68ec88f9..73400826 100644 --- a/installers/install.ps1 +++ b/installers/install.ps1 @@ -30,7 +30,7 @@ $InstallMethod = if ($ScriptDir -and ((Test-Path "$ScriptDir\lib\ccs.ps1") -or ( # IMPORTANT: Update this version when releasing new versions! # This hardcoded version is used for standalone installations (irm | iex) # For git installations, VERSION file is read if available -$CcsVersion = "2.4.5" +$CcsVersion = "2.4.6" # Try to read VERSION file for git installations if ($ScriptDir) { diff --git a/installers/install.sh b/installers/install.sh index f58d3fc1..712dedcb 100755 --- a/installers/install.sh +++ b/installers/install.sh @@ -31,7 +31,7 @@ fi # IMPORTANT: Update this version when releasing new versions! # This hardcoded version is used for standalone installations (curl | bash) # For git installations, VERSION file is read if available -CCS_VERSION="2.4.5" +CCS_VERSION="2.4.6" # Try to read VERSION file for git installations if [[ -f "$SCRIPT_DIR/VERSION" ]]; then diff --git a/lib/ccs b/lib/ccs index 7f6b3f90..e03650fe 100755 --- a/lib/ccs +++ b/lib/ccs @@ -2,7 +2,7 @@ set -euo pipefail # Version (updated by scripts/bump-version.sh) -CCS_VERSION="2.4.5" +CCS_VERSION="2.4.6" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}" @@ -52,9 +52,7 @@ show_help() { echo -e "${CYAN}Flags:${RESET}" echo -e " ${YELLOW}-h, --help${RESET} Show this help message" echo -e " ${YELLOW}-v, --version${RESET} Show version and installation info" - echo -e " ${YELLOW}--install${RESET} Install CCS commands to Claude CLI" - echo -e " ${YELLOW}--uninstall${RESET} Remove CCS commands from Claude CLI" - echo "" + echo "" echo -e "${CYAN}Configuration:${RESET}" echo -e " Config File: ~/.ccs/config.json" echo -e " Settings: ~/.ccs/*.settings.json" @@ -70,10 +68,7 @@ show_help() { echo -e " # Use GLM with verbose output" echo -e " ${YELLOW}ccs glm${RESET} --verbose \"Debug error\"" echo "" - echo -e " # Install CCS task delegation" - echo -e " ${YELLOW}ccs${RESET} --install" - echo "" - echo -e "${YELLOW}Uninstall:${RESET}" + echo -e "${YELLOW}Uninstall:${RESET}" echo -e " macOS/Linux: curl -fsSL ccs.kaitran.ca/uninstall | bash" echo -e " Windows: irm ccs.kaitran.ca/uninstall | iex" echo -e " npm: npm uninstall -g @kaitranntt/ccs" @@ -122,8 +117,10 @@ Solutions: Restart your terminal after installation." } -# Installation function for commands and skills -install_commands_and_skills() { +# WIP: .claude/ integration testing incomplete +# Feature disabled until testing complete +# install_commands_and_skills() { +: <<'COMMENTED_OUT' # Try both possible locations for .claude directory local source_dir="" local possible_dirs=( @@ -227,10 +224,13 @@ Solution: echo "" echo "You can now use the /ccs command in Claude CLI for task delegation." echo "Example: /ccs glm /plan 'add user authentication'" -} +COMMENTED_OUT +# } -# Uninstallation function for commands and skills -uninstall_commands_and_skills() { +# WIP: .claude/ integration testing incomplete +# Feature disabled until testing complete +# uninstall_commands_and_skills() { +: <<'COMMENTED_OUT' local target_dir="$HOME/.claude" local removed_count=0 local not_found_count=0 @@ -307,7 +307,8 @@ uninstall_commands_and_skills() { echo "" echo "The /ccs command is no longer available in Claude CLI." echo "To reinstall: ccs --install" -} +COMMENTED_OUT +# } show_version() { echo -e "${BOLD}CCS (Claude Code Switch) v${CCS_VERSION}${RESET}" @@ -344,14 +345,28 @@ fi # Special case: install command (check BEFORE profile detection) if [[ $# -gt 0 ]] && [[ "${1}" == "--install" ]]; then - install_commands_and_skills - exit $? + echo "" + echo "Feature not available" + echo "" + echo "The --install flag is currently under development." + echo ".claude/ integration testing is not complete." + echo "" + echo "For updates: https://github.com/kaitranntt/ccs/issues" + echo "" + exit 0 fi # Special case: uninstall command (check BEFORE profile detection) if [[ $# -gt 0 ]] && [[ "${1}" == "--uninstall" ]]; then - uninstall_commands_and_skills - exit $? + echo "" + echo "Feature not available" + echo "" + echo "The --uninstall flag is currently under development." + echo ".claude/ integration testing is not complete." + echo "" + echo "For updates: https://github.com/kaitranntt/ccs/issues" + echo "" + exit 0 fi # Smart profile detection: if first arg starts with '-', it's a flag not a profile diff --git a/lib/ccs.ps1 b/lib/ccs.ps1 index ec793652..c73c6895 100644 --- a/lib/ccs.ps1 +++ b/lib/ccs.ps1 @@ -104,9 +104,7 @@ function Show-Help { Write-ColorLine "Flags:" "Cyan" Write-ColorLine " -h, --help Show this help message" "Yellow" Write-ColorLine " -v, --version Show version and installation info" "Yellow" - Write-ColorLine " --install Install CCS commands to Claude CLI" "Yellow" - Write-ColorLine " --uninstall Remove CCS commands from Claude CLI" "Yellow" - Write-Host "" + Write-Host "" Write-ColorLine "Configuration:" "Cyan" Write-Host " Config File: ~/.ccs/config.json" Write-Host " Settings: ~/.ccs/*.settings.json" @@ -122,10 +120,7 @@ function Show-Help { Write-Host " # Use GLM with verbose output" Write-ColorLine " ccs glm --verbose 'Debug error'" "Yellow" Write-Host "" - Write-Host " # Install CCS task delegation" - Write-ColorLine " ccs --install" "Yellow" - Write-Host "" - Write-ColorLine "Uninstall:" "Cyan" + Write-ColorLine "Uninstall:" "Cyan" Write-Host " macOS/Linux: curl -fsSL ccs.kaitran.ca/uninstall | bash" Write-Host " Windows: irm ccs.kaitran.ca/uninstall | iex" Write-Host " npm: npm uninstall -g @kaitranntt/ccs" @@ -139,7 +134,7 @@ function Show-Help { } # Version (updated by scripts/bump-version.sh) -$CcsVersion = "2.4.5" +$CcsVersion = "2.4.6" $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" } @@ -230,13 +225,27 @@ if ($Help) { # Special case: install command (check BEFORE profile detection) if ($FirstArg -eq "--install") { - Write-Host "Installation not implemented in this test version" -ForegroundColor Yellow + Write-Host "" + Write-Host "Feature not available" -ForegroundColor Yellow + Write-Host "" + Write-Host "The --install flag is currently under development." + Write-Host ".claude/ integration testing is not complete." + Write-Host "" + Write-Host "For updates: https://github.com/kaitranntt/ccs/issues" + Write-Host "" exit 0 } # Special case: uninstall command (check BEFORE profile detection) if ($FirstArg -eq "--uninstall") { - Write-Host "Uninstallation not implemented in this test version" -ForegroundColor Yellow + Write-Host "" + Write-Host "Feature not available" -ForegroundColor Yellow + Write-Host "" + Write-Host "The --uninstall flag is currently under development." + Write-Host ".claude/ integration testing is not complete." + Write-Host "" + Write-Host "For updates: https://github.com/kaitranntt/ccs/issues" + Write-Host "" exit 0 } diff --git a/package.json b/package.json index f4724ab7..d965686e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kaitranntt/ccs", - "version": "2.4.5", + "version": "2.4.6", "description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6", "keywords": [ "cli", diff --git a/tests/npm/special-commands.test.js b/tests/npm/special-commands.test.js index 9f91fb3a..f6ffa30e 100644 --- a/tests/npm/special-commands.test.js +++ b/tests/npm/special-commands.test.js @@ -8,12 +8,12 @@ describe('integration: special commands', () => { it('shows version with --version', () => { const output = execSync(`node ${ccsPath} --version`, { encoding: 'utf8' }); assert(output.includes('CCS (Claude Code Switch)')); - assert(/version \d+\.\d+\.\d+/.test(output)); + assert(/v\d+\.\d+\.\d+/.test(output)); }); it('shows version with -v', () => { const output = execSync(`node ${ccsPath} -v`, { encoding: 'utf8' }); - assert(output.includes('version')); + assert(/v\d+\.\d+\.\d+/.test(output)); }); it('shows help with --help', function() { @@ -33,13 +33,15 @@ describe('integration: special commands', () => { it('handles --install command', () => { const output = execSync(`node ${ccsPath} --install`, { encoding: 'utf8' }); - assert(output.includes('Installing CCS Commands and Skills')); - assert(output.includes('Feature not yet implemented')); + assert(output.includes('Feature not available')); + assert(output.includes('under development')); + assert(output.includes('.claude/ integration testing')); }); it('handles --uninstall command', () => { const output = execSync(`node ${ccsPath} --uninstall`, { encoding: 'utf8' }); - assert(output.includes('Uninstalling CCS Commands and Skills')); - assert(output.includes('Feature not yet implemented')); + assert(output.includes('Feature not available')); + assert(output.includes('under development')); + assert(output.includes('.claude/ integration testing')); }); }); \ No newline at end of file