- 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
BREAKING CHANGE: Reorganize tests into native/ and npm/ directories
- Move 37 native Unix tests to tests/native/unix/
- Move Windows tests to tests/native/windows/
- Move 39 npm package tests to tests/npm/
- Move shared utilities to tests/shared/
- Add comprehensive test documentation
- Implement master orchestrators for backward compatibility
- Increase test coverage from 41 to 83+ tests (100% increase)
- Add mocha framework for npm tests
- Clean up old test files and directory structure
New test commands:
- npm run test:npm (npm package tests only)
- npm run test:native (native tests only)
- npm run test:unit (unit tests only)
- npm run test:all (all tests)
Backward compatibility maintained:
- npm test (runs all tests)
- bash tests/edge-cases.sh (master orchestrator)
- All existing workflows unchanged
- Update .gitignore to exclude node_modules and include Node.js patterns
- Update package.json with final test scripts and structure
- Complete test restructure: 83 tests across native, npm, and unit suites
- All tests passing with 100% success rate
- Backward compatibility maintained
- Document final test organization with accurate test counts
- Update to reflect integration tests moved to npm/ directory
- Include detailed file listings and test counts
- Clarify backward compatibility and migration benefits
- Final counts: 37 native + 39 npm + 7 unit = 83 total tests
- Move integration/special-commands.test.js to npm/ since it tests bin/ccs.js
- This test was incorrectly categorized as cross-installation integration
- It specifically tests npm package functionality (bin/ccs.js)
- Remove empty integration/ directory and update package.json
- Final test counts: 37 native + 39 npm + 7 unit = 83 total tests
Clean final structure:
- native/ - Native installation tests only
- npm/ - npm package tests (including integration tests)
- shared/ - Shared utilities, fixtures, and unit tests
- Move fixtures/ and unit/ to shared/ directory where they belong
- These test resources are used by both npm and native installations
- Update package.json test scripts to use new paths
- Fix relative import path in helpers.test.js
- All 46 npm-based tests now passing (7 unit + 5 integration + 34 npm)
Final test structure:
- native/ - Native installation tests only
- npm/ - npm package tests only
- shared/ - Shared utilities, fixtures, and unit tests
- integration/- Cross-installation integration tests
- edge-cases.sh/.ps1 - Master orchestrators
- Remove old test files that were moved to native/ subdirectories
- Clean install-test.sh, install-test.ps1, uninstall-test.sh, uninstall-test.ps1, test-custom-claude-path.ps1
- Tests now properly organized: native/, npm/, shared/, unit/, integration/
- Maintains clean root test directory with only orchestrators and docs
- Add comprehensive npm test scripts using mocha framework
- Add test:npm, test:native, test:unit, test:integration scripts
- Update main test script to run all test suites
- Fix npm test issues - all 34 tests now passing
- Use npx to run mocha without global installation
- Convert edge-cases.sh to orchestrator that runs native + npm tests
- Convert edge-cases.ps1 to PowerShell orchestrator
- Maintain backward compatibility - existing commands still work
- Show clear separation of test suites in output
- Copy Unix and Windows tests to native/ directories
- Update Unix tests to source shared helpers
- Remove Section 10 (npm tests) from native tests
- Update final results to use shared helper functions
- Add npm postinstall script to auto-create ~/.ccs/ directory and config files
- Create config.json with default profile mappings (glm, default)
- Create glm.settings.json template with GLM API configuration
- Add comprehensive Vietnamese documentation for installation, development workflow, testing, and version management
- Update CLAUDE.md with Vietnamese language support references
- Enhance installation and troubleshooting documentation
- Ensure idempotent postinstall behavior (safe to run multiple times)
- Fix config-manager.js to handle missing config.json gracefully
Version 2.4.1 was already published to npm before the final Windows fix was complete.
Bumping to 2.4.2 to publish the complete fix.
No code changes - identical to v2.4.1 commit 03dd3cf
CRITICAL fix for Windows npm global installation unable to find Claude CLI in PATH,
particularly affecting SSH sessions. Native installation always worked.
Root Causes Identified:
1. Node.js spawn() doesn't use Windows PATHEXT variable
2. where.exe returns no-extension file first, but spawn() needs actual .cmd wrapper
3. .cmd files require shell: true to execute (batch scripts, not binaries)
Solutions Implemented:
1. Pre-resolve absolute path using where.exe/which before spawning
2. Prefer executables with extensions (.exe, .cmd, .bat) on Windows
3. Auto-detect .cmd/.bat/.ps1 files and use shell: true for execution
Changes:
- bin/claude-detector.js: Added execSync PATH resolution with extension preference
- bin/ccs.js: Added null checks + getSpawnOptions() helper for shell: true
- CHANGELOG.md: Comprehensive documentation of Windows-specific fixes
Security:
- Commands are hardcoded literals (no injection risk)
- 5-second timeout on execSync prevents hangs
- shell: true only used for verified .cmd files
- Documented security considerations
Testing:
- ✅ Linux: All tests pass, no regressions
- ✅ Windows SSH (i9-bootcamp): Verified fix resolves EINVAL and PATH errors
Impact: Windows npm users can now use CCS in SSH sessions with npm-installed Claude CLI
Fixes: #windows-npm-path-detection
BREAKING CHANGE: None - fully backward compatible
Adds comprehensive custom path support for Claude CLI installations:
- CCS_CLAUDE_PATH environment variable for custom locations
- Smart detection: env var → PATH → common locations fallback
- Enhanced error messages with platform-specific solutions
- Security validation preventing command injection
- D drive Windows installation support
- WSL access to Windows installations
- Performance optimized (<15ms overhead)
- Complete documentation and troubleshooting guides
Technical implementation:
- Added detect_claude_cli() / Find-ClaudeCli functions
- Added validate_claude_cli() / Test-ClaudeCli security validation
- Updated both bash (ccs) and PowerShell (ccs.ps1) executables
- Fixed PowerShell multi-line string syntax errors with here-strings
- Updated all installation scripts and documentation
- Bumped version to v2.3.0
Tested across all platforms with 90% test suite pass rate.
Resolves D drive installation issues for Windows users.
- add routes for /install* and /uninstall* paths
- configure worker to intercept specific paths on ccs.kaitran.ca
- pass through other paths to Vercel origin (landing page)
- Add fallback logic to check both development and installed .claude locations
- Update ccs and ccs.ps1 with consistent directory resolution
- Enhanced error messages with clear troubleshooting guidance
- Bump version to 2.2.2
Fixes issue where ccs --install failed when called via symlinks.
- Add complete project overview and architecture
- Document core design principles (YAGNI, KISS, DRY)
- Include development commands and workflows
- Specify code standards for bash and PowerShell
- Add testing requirements and release process
- Document installation modes and edge case handling
- Include Claude Code integration details
- Add installation function for commands and skills
- Implement --install flag in both bash and PowerShell scripts
- Update documentation with installation instructions
- Add comprehensive test suites for installation functionality
- Refactor delegation command to simplify profile handling
- Remove haiku references, focus on GLM delegation model
- Update usage examples and documentation
- Add Vietnamese README (README.vi.md) with complete setup guide
- Add Vietnamese documentation in docs/vi/ directory
- Include configuration and usage guides translated to Vietnamese
- Maintain consistency with English documentation structure
- Reduce README.md from 640 to 48 lines (92% reduction)
- Add 5 new documentation files: installation, configuration, usage, troubleshooting, contributing
- Follow YAGNI/KISS/DRY principles with essential info in README
- Preserve all content in organized docs/ structure
- Improve user experience with quick start focus
Fix broken standalone installation by updating GitHub raw URL from
main/uninstall.sh to main/installers/uninstall.sh following file
reorganization.
Changes:
- installers/install.sh:284: Update curl URL to correct path
- installers/install.ps1:33: Bump version to 2.1.2
- installers/install.sh:34: Bump version to 2.1.2
- VERSION: Bump from 2.1.1 to 2.1.2
Impact: Fixes uninstaller download for standalone installations
Breaking Changes: None
Security: No vulnerabilities introduced
Tests: 68/68 passing
- Add wrangler.toml with compatibility_date to fix CI deployment
- Upgrade Wrangler from v3.90.0 to v4.45.3
- Simplify deploy command to use config file
- Add wrangler.toml to workflow trigger paths
Fixes CloudFlare Worker deployment failure due to missing compatibility_date parameter.
This commit fixes version management and argument parsing issues across
both Windows and Linux/macOS platforms, achieving 100% test coverage.
Changes:
- Add VERSION file installation to both installers (install.sh, install.ps1)
- Fix version/help command detection when using 'powershell -File' syntax
- Rename PowerShell param from $Profile to $ProfileOrFlag for clarity
- Add $FirstArg detection to check both ProfileOrFlag and RemainingArgs
- Create comprehensive edge case test suites for both platforms:
* tests/edge-cases.ps1 - 31 tests for Windows (100% pass)
* tests/edge-cases.sh - 37 tests for Linux/macOS (100% pass)
- Fix multiline regex matching in tests for error messages
- Update test expectations to match platform-specific behavior
- Reorganize project structure:
* Move installers to installers/ directory
* Add scripts/ directory for version management
* Add config/ directory for configuration templates
* Add docs/ directory for documentation
Test Results:
- Windows (PowerShell): 31/31 tests passing (100%)
- Linux/macOS (Bash): 37/37 tests passing (100%)
Breaking Changes: None
- Installers moved but GitHub URLs updated in README files
- All existing functionality preserved
Co-authored-by: Claude Code <claude@anthropic.com>
Windows install now creates ccs-uninstall.ps1 instead of uninstall.ps1,
matching documented command and Linux/macOS naming convention.
Changes:
- Copy/download uninstall.ps1 as ccs-uninstall.ps1 directly
- Use $PSCommandPath for dynamic self-removal (works with any filename)
- Clean up old uninstall.ps1 during upgrades
- Maintain cross-platform consistency
Fixes issue where Windows users couldn't run documented `ccs-uninstall`
command after quick install via irm ccs.kaitran.ca/install.ps1 | iex
- Add version command: ccs --version, ccs version, ccs -v
- Add help forwarding: ccs --help, ccs -h, ccs help → forwards to Claude CLI
- Fix W1 warning: ccs --help no longer treats --help as profile name
- Consistent implementation across bash and PowerShell
- Update README (EN/VI) with utility commands documentation
Features:
- Version constant: CCS_VERSION = "1.1.0"
- Early return pattern for meta-commands (work without config)
- Help commands forward to Claude CLI --help
- Version commands show CCS version + GitHub URL
Testing:
- All 9 tests passed (100%)
- No regressions in existing functionality
- Verified on Windows PowerShell 5.1
Resolves: W1 warning from comprehensive testing
Tested-by: QA Agent
Reviewed-by: Code Review Agent
- use proper .NET enum for environment variable targets
- add try-catch blocks for environment variable operations
- provide user-friendly warnings when operations fail
- fixes PATH operations in install and uninstall scripts
Changes:
- ccs.ps1: When profile is "default", run claude directly without profile lookup
- install.ps1: Remove default profile from config.json
- install.ps1: Remove ~/.claude/settings.json creation
- install.ps1: Update quick start messages
Behavior:
- `ccs` → runs `claude` directly (no profile switching)
- `ccs son` → switches to Sonnet profile
- `ccs glm` → switches to GLM profile
Rationale:
- Windows Claude CLI doesn't use settings.json files
- No need for default profile file that would never be used
- Simpler and cleaner for Windows users
Changes:
- ccs.ps1: Read settings files and apply env vars (supports both direct and {"env": {...}} formats)
- install.ps1: Create separate settings files (glm.settings.json, sonnet.settings.json) instead of embedding in config.json
- README.md: Document Linux-style file structure for Windows
- README.vi.md: Add Vietnamese documentation for Windows configuration
Windows now uses same file structure as Linux:
- config.json contains file paths
- Settings files contain environment variables
- Maintains cross-platform consistency
Windows Claude CLI doesn't support --settings flag or settings.json files.
It uses environment variables instead (ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, etc.)
Changes:
- ccs.ps1: Completely rewritten to set environment variables per profile
- Supports both env var objects (Windows) and file paths (Unix cross-compat)
- Sets env vars before executing claude, restores after
- Shows helpful error if user tries to use file paths on Windows
- install.ps1: Updated to create env var-based config
- config.json now contains env var objects, not file paths
- GLM profile: Full env var config with API key placeholder
- Sonnet/default profiles: Empty {} = use Claude subscription
- README.md: Updated Windows configuration section
- Documents env var approach clearly
- Shows correct Windows config format
- Explains difference from Unix approach
Example Windows config:
{
"profiles": {
"glm": {
"ANTHROPIC_AUTH_TOKEN": "your_key",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic"
},
"son": {}
}
}
Fixes: Windows users can now switch profiles with env vars instead of files
The previous approach using:
& claude $ClaudeArgs
was not properly expanding the array, causing Claude CLI to see:
error: unknown option '--settings C:\Users\kaidu\.ccs\sonnet.settings.json'
Fixed by using direct splatting:
& claude --settings $SettingsPath @RemainingArgs
This ensures proper argument quoting and separation, matching bash behavior:
exec claude --settings "$SETTINGS_PATH" "$@"