@chongdashu/cc-statusline 1.3.2 → 1.4.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 CHANGED
@@ -1,158 +1,185 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.3.2] - 2025-08-28
9
-
10
- ### Fixed
11
- - 🪟 **Windows Bash Compatibility** - Fixed JSON extraction in bash fallback mode for Windows Git Bash/MinGW
12
- - Improved nested JSON field extraction for `workspace.current_dir` and `model.display_name`
13
- - Added Windows path conversion from backslashes to forward slashes
14
- - Fixed cost data extraction without jq
15
- - Generator now uses `bash .claude/statusline.sh` command in settings.json for Windows
16
-
17
- ## [1.3.1] - 2025-08-28
18
-
19
- ### Fixed
20
- - 🐛 **Critical: Bash JSON Fallback Parser** - Fixed syntax error in fallback JSON parser for systems without jq
21
- - Fixed malformed grep patterns with incorrect quote escaping in `bash-generator.ts`
22
- - Statusline now works correctly on systems without jq installed
23
- - Properly escapes quotes in generated bash script (`\"${field}\"` instead of `"${field}"`)
24
-
25
- ### Added
26
- - **jq Detection and Installation Guide** - Added automatic jq detection during init
27
- - Checks if jq is installed and warns about limited functionality without it
28
- - Provides platform-specific installation instructions (macOS, Linux, Windows)
29
- - Asks users if they want to continue without jq
30
- - Clear documentation in README about which features require jq
31
-
32
- ### Changed
33
- - 📚 **Enhanced Windows Documentation** - Clarified jq installation for Windows users
34
- - Specific file names for download (`jq-windows-amd64.exe` for 64-bit)
35
- - Step-by-step PATH configuration instructions
36
- - Clear options between package managers and manual installation
37
-
38
- ## [1.3.0] - 2025-08-28
39
-
40
- ### Changed
41
- - 🔥 **Cost Burn Rate Calculation** - Now calculates burn rate ($/hour) directly from Claude Code's cost and duration data
42
- - No longer relies on ccusage for burn rate calculation
43
- - Uses `cost.total_cost_usd` and `cost.total_duration_ms` from Claude Code's input
44
- - More accurate and reliable burn rate display
45
- - 📁 **Project-Relative Logging** - Statusline logs are now created relative to where the statusline script is installed
46
- - Logs go to `.claude/statusline.log` in the project directory when installed locally
47
- - Previously always logged to `~/.claude/statusline.log` regardless of installation location
48
- ### Fixed
49
- - 🐛 Fixed version drift between CLI and package.json
50
- - 🐛 Fixed logging directory to respect project-level installations
51
-
52
- ### Added
53
- - ✨ Version number now included in generated statusline headers (e.g., `# Generated by cc-statusline v1.3.0`)
54
-
55
- ## [1.2.7] - 2025-08-28
56
-
57
- ### Fixed
58
- - 🐛 **ccusage Integration Fix** - Fixed ccusage stats not displaying in statusline
59
- - Moved `input=$(cat)` before logging to ensure proper input capture
60
- - Simplified ccusage execution by removing complex locking mechanism
61
- - Now properly calls `ccusage blocks --json` directly with internal caching
62
- - Fixed cost display, burn rate, token stats, and session time display
63
-
64
- ## [1.2.6] - 2025-08-27
65
-
66
- ### Fixed
67
- - 🐛 **Installation Prompt Fix** - Fixed spinner blocking the overwrite confirmation prompt during installation
68
- - Removed ora spinner during installation phase to ensure prompts are visible
69
- - Replaced spinner with simple console messages for better UX
70
- - Users can now properly see and respond to overwrite confirmations
71
-
72
- ## [1.2.5] - 2025-08-27
73
-
74
- ### Fixed
75
- - 🐛 **Cost Display Fix** - Fixed incorrect cost values (e.g., $48.00) caused by improper quoting in printf statements
76
- - Removed unnecessary escaped quotes around `$cost_usd` in bash generator
77
- - Cost values now display correctly with proper decimal formatting
78
-
79
- ## [1.2.4] - 2025-08-26
80
-
81
- ### Added
82
- - 🆕 **Installation Location Choice** - Choose between global (`~/.claude`) or project-level (`./.claude`) installation
83
- - 🔒 **Safe Installation** - Confirmation prompts before overwriting existing statusline.sh files
84
- - 🛡️ **Settings Protection** - Smart settings.json updates that preserve existing configurations
85
- - ⚠️ **Conflict Detection** - Warns when other statuslines are already configured
86
- - **Better Error Handling** - Clear messages for cancelled installations and conflicts
87
-
88
- ### Changed
89
- - Installation prompt now includes location selection (global vs project)
90
- - Default installation is project-level for safety
91
- - Improved settings.json update logic to prevent accidental overwrites
92
-
93
- ## [1.2.3] - 2025-08-20
94
-
95
- ### Fixed
96
- - 🔒 **Critical Process Spawning Fix** - Added file-based locking mechanism to prevent infinite ccusage process spawning
97
- - **Performance** - Implemented 3-second timeout for ccusage calls to prevent hanging
98
- - 🛡️ **Stability** - Added PID tracking for stale lock detection and cleanup
99
- - 🔧 **Cross-platform** - Multiple timeout strategies for Linux, macOS, and BSD compatibility
100
-
101
- ### Contributors
102
- - 🙏 **Special thanks to [Jonathan Borgwing (@DevVig)](https://github.com/DevVig)** for identifying and implementing the critical process spawning fix ([#4](https://github.com/chongdashu/cc-statusline/pull/4))
103
-
104
- ### Technical Details
105
- - **File-based locking**: Uses `/tmp/ccusage_statusline.lock` directory as a mutex to ensure single execution
106
- - **PID tracking**: Stores process ID in `/tmp/ccusage_statusline.pid` for stale lock detection
107
- - **Graceful degradation**: Skips execution when locked instead of queuing (prevents pile-up)
108
- - **Automatic cleanup**: Detects and removes stale locks from crashed processes using `kill -0`
109
- - **Cross-platform timeouts**: Multiple timeout strategies (timeout/gtimeout/fallback) for all systems
110
- - **Testing included**: Comprehensive test suite in `test/` directory to verify locking behavior
111
-
112
- ## [1.0.1] - 2025-08-13
113
-
114
- ### Added
115
- - CONTRIBUTING.md with comprehensive contribution guidelines
116
- - Development workflow documentation
117
- - Code standards and testing guidelines
118
-
119
- ### Changed
120
- - Updated package name to unscoped `cc-statusline`
121
- - Enhanced README contributing section with better guidance
122
-
123
- ## [1.0.0] - 2025-08-13
124
-
125
- ### Added
126
- - Initial release of cc-statusline
127
- - Interactive configuration wizard with 2 simple prompts
128
- - Bash script generation with optimized performance
129
- - Real-time ccusage integration for usage statistics
130
- - Preview mode for testing statusline scripts with mock data
131
- - Auto-installation with settings.json configuration
132
- - Support for directory, git, model, usage, session, token, and burn rate features
133
- - TTY-aware color support with NO_COLOR environment variable respect
134
- - Manual configuration instructions when auto-update fails
135
- - Comprehensive documentation and examples
136
- - Performance analysis and validation in preview mode
137
- - Timestamp and npm URL in generated script headers
138
-
139
- ### Features
140
- - 📁 Working Directory display with `~` abbreviation
141
- - 🌿 Git Branch integration
142
- - 🤖 Model Name & Version display
143
- - 💵 Real-time Usage & Cost tracking
144
- - Session Time Remaining with progress bars
145
- - 📊 Token Statistics (optional)
146
- - ⚡ Burn Rate monitoring (optional)
147
-
148
- ### Technical
149
- - TypeScript with strict type checking
150
- - ESM module support
151
- - Commander.js for CLI interface
152
- - Inquirer.js for interactive prompts
153
- - Chalk for colorized output
154
- - Ora for loading spinners
155
- - Comprehensive error handling and validation
156
- - Modular architecture for easy maintenance
157
-
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.4.0] - 2025-12-24
9
+
10
+ ### Changed
11
+ - 🚀 **Native Token Statistics** - Token counts and TPM now use Claude Code's native `context_window` data
12
+ - No longer relies on ccusage for token statistics
13
+ - Uses `context_window.total_input_tokens` and `total_output_tokens` from Claude Code's JSON input
14
+ - TPM (tokens per minute) calculated from native token counts and session duration
15
+ - More reliable and faster - no external tool calls needed for token data
16
+
17
+ - ⚠️ **Session Reset Time Now Optional** - Session reset time feature is now **off by default**
18
+ - Clearly marked as "(requires ccusage)" in feature selection
19
+ - Only feature that still requires the external ccusage tool
20
+ - ccusage integration only enabled when session feature is selected
21
+
22
+ ### Removed
23
+ - 🗑️ **Reduced ccusage Dependency** - ccusage is no longer needed for most features
24
+ - Token statistics: Now native
25
+ - Tokens per minute: Now native
26
+ - Cost and burn rate: Already native since v1.3.0
27
+ - Only session reset time still requires ccusage
28
+
29
+ ### Technical
30
+ - Refactored `src/features/usage.ts` to extract tokens from `context_window` object
31
+ - Updated mock test data in `src/utils/tester.ts` to match Claude Code's full JSON structure
32
+ - Config summary now warns when ccusage is required (only for session feature)
33
+ - Cleaner generated bash scripts when session feature is disabled
34
+
35
+ ## [1.3.2] - 2025-08-28
36
+
37
+ ### Fixed
38
+ - 🪟 **Windows Bash Compatibility** - Fixed JSON extraction in bash fallback mode for Windows Git Bash/MinGW
39
+ - Improved nested JSON field extraction for `workspace.current_dir` and `model.display_name`
40
+ - Added Windows path conversion from backslashes to forward slashes
41
+ - Fixed cost data extraction without jq
42
+ - Generator now uses `bash .claude/statusline.sh` command in settings.json for Windows
43
+
44
+ ## [1.3.1] - 2025-08-28
45
+
46
+ ### Fixed
47
+ - 🐛 **Critical: Bash JSON Fallback Parser** - Fixed syntax error in fallback JSON parser for systems without jq
48
+ - Fixed malformed grep patterns with incorrect quote escaping in `bash-generator.ts`
49
+ - Statusline now works correctly on systems without jq installed
50
+ - Properly escapes quotes in generated bash script (`\"${field}\"` instead of `"${field}"`)
51
+
52
+ ### Added
53
+ - ✨ **jq Detection and Installation Guide** - Added automatic jq detection during init
54
+ - Checks if jq is installed and warns about limited functionality without it
55
+ - Provides platform-specific installation instructions (macOS, Linux, Windows)
56
+ - Asks users if they want to continue without jq
57
+ - Clear documentation in README about which features require jq
58
+
59
+ ### Changed
60
+ - 📚 **Enhanced Windows Documentation** - Clarified jq installation for Windows users
61
+ - Specific file names for download (`jq-windows-amd64.exe` for 64-bit)
62
+ - Step-by-step PATH configuration instructions
63
+ - Clear options between package managers and manual installation
64
+
65
+ ## [1.3.0] - 2025-08-28
66
+
67
+ ### Changed
68
+ - 🔥 **Cost Burn Rate Calculation** - Now calculates burn rate ($/hour) directly from Claude Code's cost and duration data
69
+ - No longer relies on ccusage for burn rate calculation
70
+ - Uses `cost.total_cost_usd` and `cost.total_duration_ms` from Claude Code's input
71
+ - More accurate and reliable burn rate display
72
+ - 📁 **Project-Relative Logging** - Statusline logs are now created relative to where the statusline script is installed
73
+ - Logs go to `.claude/statusline.log` in the project directory when installed locally
74
+ - Previously always logged to `~/.claude/statusline.log` regardless of installation location
75
+ ### Fixed
76
+ - 🐛 Fixed version drift between CLI and package.json
77
+ - 🐛 Fixed logging directory to respect project-level installations
78
+
79
+ ### Added
80
+ - ✨ Version number now included in generated statusline headers (e.g., `# Generated by cc-statusline v1.3.0`)
81
+
82
+ ## [1.2.7] - 2025-08-28
83
+
84
+ ### Fixed
85
+ - 🐛 **ccusage Integration Fix** - Fixed ccusage stats not displaying in statusline
86
+ - Moved `input=$(cat)` before logging to ensure proper input capture
87
+ - Simplified ccusage execution by removing complex locking mechanism
88
+ - Now properly calls `ccusage blocks --json` directly with internal caching
89
+ - Fixed cost display, burn rate, token stats, and session time display
90
+
91
+ ## [1.2.6] - 2025-08-27
92
+
93
+ ### Fixed
94
+ - 🐛 **Installation Prompt Fix** - Fixed spinner blocking the overwrite confirmation prompt during installation
95
+ - Removed ora spinner during installation phase to ensure prompts are visible
96
+ - Replaced spinner with simple console messages for better UX
97
+ - Users can now properly see and respond to overwrite confirmations
98
+
99
+ ## [1.2.5] - 2025-08-27
100
+
101
+ ### Fixed
102
+ - 🐛 **Cost Display Fix** - Fixed incorrect cost values (e.g., $48.00) caused by improper quoting in printf statements
103
+ - Removed unnecessary escaped quotes around `$cost_usd` in bash generator
104
+ - Cost values now display correctly with proper decimal formatting
105
+
106
+ ## [1.2.4] - 2025-08-26
107
+
108
+ ### Added
109
+ - 🆕 **Installation Location Choice** - Choose between global (`~/.claude`) or project-level (`./.claude`) installation
110
+ - 🔒 **Safe Installation** - Confirmation prompts before overwriting existing statusline.sh files
111
+ - 🛡️ **Settings Protection** - Smart settings.json updates that preserve existing configurations
112
+ - ⚠️ **Conflict Detection** - Warns when other statuslines are already configured
113
+ - ✅ **Better Error Handling** - Clear messages for cancelled installations and conflicts
114
+
115
+ ### Changed
116
+ - Installation prompt now includes location selection (global vs project)
117
+ - Default installation is project-level for safety
118
+ - Improved settings.json update logic to prevent accidental overwrites
119
+
120
+ ## [1.2.3] - 2025-08-20
121
+
122
+ ### Fixed
123
+ - 🔒 **Critical Process Spawning Fix** - Added file-based locking mechanism to prevent infinite ccusage process spawning
124
+ - ⚡ **Performance** - Implemented 3-second timeout for ccusage calls to prevent hanging
125
+ - 🛡️ **Stability** - Added PID tracking for stale lock detection and cleanup
126
+ - 🔧 **Cross-platform** - Multiple timeout strategies for Linux, macOS, and BSD compatibility
127
+
128
+ ### Contributors
129
+ - 🙏 **Special thanks to [Jonathan Borgwing (@DevVig)](https://github.com/DevVig)** for identifying and implementing the critical process spawning fix ([#4](https://github.com/chongdashu/cc-statusline/pull/4))
130
+
131
+ ### Technical Details
132
+ - **File-based locking**: Uses `/tmp/ccusage_statusline.lock` directory as a mutex to ensure single execution
133
+ - **PID tracking**: Stores process ID in `/tmp/ccusage_statusline.pid` for stale lock detection
134
+ - **Graceful degradation**: Skips execution when locked instead of queuing (prevents pile-up)
135
+ - **Automatic cleanup**: Detects and removes stale locks from crashed processes using `kill -0`
136
+ - **Cross-platform timeouts**: Multiple timeout strategies (timeout/gtimeout/fallback) for all systems
137
+ - **Testing included**: Comprehensive test suite in `test/` directory to verify locking behavior
138
+
139
+ ## [1.0.1] - 2025-08-13
140
+
141
+ ### Added
142
+ - CONTRIBUTING.md with comprehensive contribution guidelines
143
+ - Development workflow documentation
144
+ - Code standards and testing guidelines
145
+
146
+ ### Changed
147
+ - Updated package name to unscoped `cc-statusline`
148
+ - Enhanced README contributing section with better guidance
149
+
150
+ ## [1.0.0] - 2025-08-13
151
+
152
+ ### Added
153
+ - Initial release of cc-statusline
154
+ - Interactive configuration wizard with 2 simple prompts
155
+ - Bash script generation with optimized performance
156
+ - Real-time ccusage integration for usage statistics
157
+ - Preview mode for testing statusline scripts with mock data
158
+ - Auto-installation with settings.json configuration
159
+ - Support for directory, git, model, usage, session, token, and burn rate features
160
+ - TTY-aware color support with NO_COLOR environment variable respect
161
+ - Manual configuration instructions when auto-update fails
162
+ - Comprehensive documentation and examples
163
+ - Performance analysis and validation in preview mode
164
+ - Timestamp and npm URL in generated script headers
165
+
166
+ ### Features
167
+ - 📁 Working Directory display with `~` abbreviation
168
+ - 🌿 Git Branch integration
169
+ - 🤖 Model Name & Version display
170
+ - 💵 Real-time Usage & Cost tracking
171
+ - ⌛ Session Time Remaining with progress bars
172
+ - 📊 Token Statistics (optional)
173
+ - ⚡ Burn Rate monitoring (optional)
174
+
175
+ ### Technical
176
+ - TypeScript with strict type checking
177
+ - ESM module support
178
+ - Commander.js for CLI interface
179
+ - Inquirer.js for interactive prompts
180
+ - Chalk for colorized output
181
+ - Ora for loading spinners
182
+ - Comprehensive error handling and validation
183
+ - Modular architecture for easy maintenance
184
+
158
185
  [1.0.0]: https://github.com/chongdashu/cc-statusline/releases/tag/v1.0.0
package/CLAUDE.md CHANGED
@@ -1,77 +1,77 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- ## Project Overview
6
-
7
- cc-statusline is a TypeScript CLI tool that generates custom statuslines for Claude Code. It creates optimized bash scripts that display directory, git info, model name, usage costs, and session time in the terminal.
8
-
9
- ## Development Commands
10
-
11
- ```bash
12
- # Install dependencies
13
- npm install
14
-
15
- # Build the project (required before testing)
16
- npm run build
17
-
18
- # Watch mode for development
19
- npm run dev
20
-
21
- # Test the CLI locally
22
- ./dist/index.js init --no-install
23
- ./dist/index.js preview ./test-statusline.sh
24
-
25
- # Test as if installed globally
26
- npx . init
27
-
28
- # Test the generated statusline with mock data
29
- ./test_debug.sh
30
-
31
- # Run installation tests
32
- ./test/test-installation.sh
33
- ```
34
-
35
- ## Architecture
36
-
37
- The codebase follows a modular ESM TypeScript architecture:
38
-
39
- - **CLI Layer** (`src/cli/`): Commander.js-based CLI with interactive prompts using Inquirer
40
- - **Generator Layer** (`src/generators/`): Creates optimized bash scripts based on user configuration
41
- - **Feature Modules** (`src/features/`): Isolated implementations for git, usage tracking, and colors
42
- - **Utility Layer** (`src/utils/`): Installation, validation, and testing utilities
43
-
44
- Key design patterns:
45
- - Feature flags determine which bash code blocks are included in generated scripts
46
- - All bash generation is template-based with conditional sections
47
- - Mock testing simulates Claude Code's JSON input for preview functionality
48
-
49
- ## Key Implementation Details
50
-
51
- **Build System**: Uses tsup for ESM bundling with Node 16+ target. The `#!/usr/bin/env node` shebang is automatically added during build.
52
-
53
- **Generated Scripts**: The bash statuslines are self-contained with graceful fallbacks when dependencies (jq, git, ccusage) are missing. Scripts execute in <100ms with minimal resource usage.
54
-
55
- **Installation Flow**:
56
- 1. Collects user preferences via inquirer prompts
57
- 2. Generates optimized bash script with only selected features
58
- 3. Writes to `.claude/statusline.sh` with execute permissions
59
- 4. Updates `.claude/settings.json` to register the statusline command
60
-
61
- **Testing Approach**: Preview command uses mock Claude Code JSON data to test statuslines before installation. Real testing requires manual verification with Claude Code running.
62
-
63
- ## Critical Bug-Prone Areas
64
-
65
- **JSON Parsing in Bash**: The `bash-generator.ts` file contains a fallback JSON parser for systems without `jq`. This uses complex grep/sed patterns with careful quote escaping. The quotes in the grep patterns must be escaped as `\\"` in the TypeScript template strings to generate valid bash code.
66
-
67
- **Quote Escaping in bash-generator.ts**: Lines 100-105 contain grep patterns that require double escaping:
68
- - TypeScript template literal needs `\\` for a single backslash
69
- - Bash needs `\"` for escaped quotes
70
- - Combined: `\\"\\${field}\\"` to produce `"${field}"` in the final bash script
71
-
72
- ## Important Conventions
73
-
74
- - Use ESM imports with `.js` extensions (even for `.ts` files)
75
- - Maintain 2-space indentation without semicolons
76
- - Follow conventional commits format for commit messages
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ cc-statusline is a TypeScript CLI tool that generates custom statuslines for Claude Code. It creates optimized bash scripts that display directory, git info, model name, usage costs, and session time in the terminal.
8
+
9
+ ## Development Commands
10
+
11
+ ```bash
12
+ # Install dependencies
13
+ npm install
14
+
15
+ # Build the project (required before testing)
16
+ npm run build
17
+
18
+ # Watch mode for development
19
+ npm run dev
20
+
21
+ # Test the CLI locally
22
+ ./dist/index.js init --no-install
23
+ ./dist/index.js preview ./test-statusline.sh
24
+
25
+ # Test as if installed globally
26
+ npx . init
27
+
28
+ # Test the generated statusline with mock data
29
+ ./test_debug.sh
30
+
31
+ # Run installation tests
32
+ ./test/test-installation.sh
33
+ ```
34
+
35
+ ## Architecture
36
+
37
+ The codebase follows a modular ESM TypeScript architecture:
38
+
39
+ - **CLI Layer** (`src/cli/`): Commander.js-based CLI with interactive prompts using Inquirer
40
+ - **Generator Layer** (`src/generators/`): Creates optimized bash scripts based on user configuration
41
+ - **Feature Modules** (`src/features/`): Isolated implementations for git, usage tracking, and colors
42
+ - **Utility Layer** (`src/utils/`): Installation, validation, and testing utilities
43
+
44
+ Key design patterns:
45
+ - Feature flags determine which bash code blocks are included in generated scripts
46
+ - All bash generation is template-based with conditional sections
47
+ - Mock testing simulates Claude Code's JSON input for preview functionality
48
+
49
+ ## Key Implementation Details
50
+
51
+ **Build System**: Uses tsup for ESM bundling with Node 16+ target. The `#!/usr/bin/env node` shebang is automatically added during build.
52
+
53
+ **Generated Scripts**: The bash statuslines are self-contained with graceful fallbacks when dependencies (jq, git, ccusage) are missing. Scripts execute in <100ms with minimal resource usage.
54
+
55
+ **Installation Flow**:
56
+ 1. Collects user preferences via inquirer prompts
57
+ 2. Generates optimized bash script with only selected features
58
+ 3. Writes to `.claude/statusline.sh` with execute permissions
59
+ 4. Updates `.claude/settings.json` to register the statusline command
60
+
61
+ **Testing Approach**: Preview command uses mock Claude Code JSON data to test statuslines before installation. Real testing requires manual verification with Claude Code running.
62
+
63
+ ## Critical Bug-Prone Areas
64
+
65
+ **JSON Parsing in Bash**: The `bash-generator.ts` file contains a fallback JSON parser for systems without `jq`. This uses complex grep/sed patterns with careful quote escaping. The quotes in the grep patterns must be escaped as `\\"` in the TypeScript template strings to generate valid bash code.
66
+
67
+ **Quote Escaping in bash-generator.ts**: Lines 100-105 contain grep patterns that require double escaping:
68
+ - TypeScript template literal needs `\\` for a single backslash
69
+ - Bash needs `\"` for escaped quotes
70
+ - Combined: `\\"\\${field}\\"` to produce `"${field}"` in the final bash script
71
+
72
+ ## Important Conventions
73
+
74
+ - Use ESM imports with `.js` extensions (even for `.ts` files)
75
+ - Maintain 2-space indentation without semicolons
76
+ - Follow conventional commits format for commit messages
77
77
  - Generated bash scripts must be POSIX-compliant with fallbacks