- 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" "$@"
PowerShell may not render Unicode symbols (✓ ✗ ⚠️ℹ️✅ │) correctly depending on
console font and encoding. Replaced with ASCII alternatives:
- ✓/✅ → [OK] or [SUCCESS]
- ✗ → [X]
- ⚠️ → [!]
- ℹ️ → [i]
- │ → |
This ensures consistent display across all PowerShell versions and consoles.
Line 166 was calling Test-Path with null ScriptDir when running via irm | iex,
causing 'Cannot bind argument to parameter Path because it is null' error.
Added null check: if ($ScriptDir -and (Test-Path ...)) to safely skip to
standalone mode when ScriptDir is null.
When running via 'irm ccs.kaitran.ca/install.ps1 | iex', the script executes
in-memory without a file path, causing $MyInvocation.MyCommand.Path to be null.
This fix checks for null before calling Split-Path to avoid the error:
'Cannot bind argument to parameter Path because it is null'
Resolves standalone installation method detection for piped execution.
- add smart filtering to remove GLM vars but keep Claude models
- remove ANTHROPIC_DEFAULT_* only if value is GLM (e.g. 'glm-4.6')
- preserve ANTHROPIC_DEFAULT_* if value contains 'claude' (user preference)
- add null safety with tostring? // ""
- add case-insensitive matching with ascii_downcase
- add explanatory comments for filter logic
Fixes bug where sonnet.settings.json incorrectly had GLM model overrides
- add complete Vietnamese version of README
- add language selector to both English and Vietnamese versions
- maintain same structure and content as English version
- add kaitran.ca/ccs/install and kaitran.ca/ccs/uninstall
- keep original GitHub URLs as alternatives
- update Quick Start, Upgrade, and Uninstall sections
- add conditional check before shift command
- prevent failure when calling 'ccs' without arguments
- named profiles (ccs son, ccs glm) still work correctly