ironcode-ai 1.8.0 โ 1.9.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/README.md +79 -42
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -22,6 +22,43 @@
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
+
## ๐ What's New
|
|
26
|
+
|
|
27
|
+
### February 2026 - Streaming Optimizations
|
|
28
|
+
|
|
29
|
+
**Massive performance and memory improvements through streaming patterns:**
|
|
30
|
+
|
|
31
|
+
#### File Read Optimization
|
|
32
|
+
|
|
33
|
+
- โก **1.17-1.56x faster** across all file sizes
|
|
34
|
+
- ๐พ **99.7% memory savings** on large files (39MB โ 0.13MB for 100K lines)
|
|
35
|
+
- ๐ 64KB buffer with pre-allocated capacity eliminates reallocation
|
|
36
|
+
- โ
**100% identical results** - zero breaking changes
|
|
37
|
+
|
|
38
|
+
#### Grep Search Optimization
|
|
39
|
+
|
|
40
|
+
- ๐พ **90-99% memory reduction** when searching large files
|
|
41
|
+
- ๐ Stream lines instead of loading entire files
|
|
42
|
+
- โก Early exit after 1000 matches for efficiency
|
|
43
|
+
- ๐ฏ Can search **GB-sized files** without running out of memory
|
|
44
|
+
- โ
**100% identical results** - verified with comprehensive tests
|
|
45
|
+
|
|
46
|
+
**Why streaming matters:**
|
|
47
|
+
|
|
48
|
+
- Search 100 files ร 1MB each: **100MB โ 10MB memory** usage
|
|
49
|
+
- No data loss - regex matches on full line content before display truncation
|
|
50
|
+
- Scales to much larger codebases on memory-constrained systems
|
|
51
|
+
|
|
52
|
+
### Previous Updates
|
|
53
|
+
|
|
54
|
+
- **Memory optimization** - 97.6% faster message processing (254ms โ 6ms) - Feb 2026
|
|
55
|
+
- **Resource monitoring** - Automatic throttling with 300MB default limit - Feb 2026
|
|
56
|
+
- **PTY/Terminal native** - 15.29x speedup, powers Bash tool - Feb 2026
|
|
57
|
+
- **Edit tool optimization** - 2-6x faster with 9 smart strategies
|
|
58
|
+
- **Archive extraction** - 3-5x faster with s-zip native
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
25
62
|
## What is IronCode?
|
|
26
63
|
|
|
27
64
|
IronCode is a **high-performance CLI fork** of [OpenCode](https://github.com/anomalyco/opencode) - an AI coding agent that runs entirely on your machine. This fork focuses on the command-line experience, removes cloud dependencies, and **rewrites performance-critical components in Rust** for dramatically improved speed and efficiency.
|
|
@@ -95,51 +132,55 @@ IronCode rewrites key operations in native Rust with **measured real-world perfo
|
|
|
95
132
|
| **File Listing** | 15.80 ms | 11.50 ms | **1.37x faster** | Native ignore crate |
|
|
96
133
|
| **File Glob (100 files)** | 9.74 ms | 3.55 ms | **2.74x faster** | Zero spawn overhead |
|
|
97
134
|
| **Grep Search** | 34.84 ms | 19.35 ms | **1.80x faster** | Pattern: "function" |
|
|
135
|
+
| **Grep (streaming)** | N/A | Similar | **90-99% memory** | Can search GB files |
|
|
98
136
|
| **VCS Info (git)** | 17.25 ms | 9.43 ms | **1.83x faster** | libgit2, no spawning |
|
|
99
137
|
| **Archive (small, 10)** | 5.48 ms | 1.93 ms | **2.8x faster** | s-zip vs unzip |
|
|
100
138
|
| **Archive (medium, 100)** | 90.43 ms | 18.07 ms | **5.0x faster** | s-zip vs unzip |
|
|
101
139
|
| **Archive (large, 500)** | 740.29 ms | 142.88 ms | **5.2x faster** | s-zip vs unzip |
|
|
102
|
-
| **Read (
|
|
103
|
-
| **Read (
|
|
104
|
-
| **Read (
|
|
105
|
-
| **
|
|
106
|
-
| **
|
|
140
|
+
| **Read (1K lines)** | 0.06 ms | 0.04 ms | **1.50x faster** | 64KB buffer + capacity |
|
|
141
|
+
| **Read (10K lines)** | 0.34 ms | 0.29 ms | **1.17x faster** | Pre-allocation |
|
|
142
|
+
| **Read (50K lines)** | 1.45 ms | 0.97 ms | **1.49x faster** | Streaming optimized |
|
|
143
|
+
| **Read (100K lines)** | 3.71 ms | 2.38 ms | **1.56x faster** | 99.7% memory savings |
|
|
144
|
+
| **Read (500K lines)** | 31.50 ms | 21.55 ms | **1.46x faster** | 30MB file |
|
|
107
145
|
|
|
108
146
|
**Key Insights:**
|
|
109
147
|
|
|
110
148
|
- ๐ฏ **PTY/Terminal**: **15.29x faster** (exceeded 10x target!) - Native ring buffer, zero-copy reads
|
|
149
|
+
- โ
**File Read**: **1.17-1.56x faster** with **99.7% memory savings** (39MB โ 0.13MB for 100K lines) - 64KB buffer + pre-allocation
|
|
150
|
+
- โ
**Grep Search**: **90-99% memory reduction** with streaming - Can search GB-sized files without OOM
|
|
111
151
|
- โ
**Edit Tool**: 2-6x faster across all file sizes with all 9 smart replacement strategies
|
|
112
152
|
- โ
**Bash Parser**: 50-100x faster using native tree-sitter vs WASM (0.020ms per command, no initialization overhead)
|
|
113
153
|
- โ
**Glob/Grep**: 1.8-2.7x faster by eliminating process spawn overhead
|
|
114
154
|
- โ
**VCS Info**: 1.83x faster using libgit2 directly (no process spawning, 45% latency reduction)
|
|
115
155
|
- โ
**Archive Extraction**: 3-5x faster using s-zip vs shell commands (unzip/PowerShell)
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
- ๐ฏ **Lesson**: FFI overhead (~50ยตs) remains; only use Rust when compute > overhead
|
|
119
|
-
- ๐ง **Decision**: We use raw Rust FFI for consistency across native tool suite
|
|
156
|
+
- ๐ **Memory**: Streaming patterns use only 64KB buffer regardless of file size
|
|
157
|
+
- ๐ฏ **Lesson**: Pre-allocation + streaming + larger buffers = faster I/O with dramatically less memory
|
|
120
158
|
|
|
121
159
|
**Native Rust Components:**
|
|
122
160
|
|
|
123
161
|
- โ
**PTY/Terminal**: Full terminal session management with 2MB ring buffer, zero-copy streaming (15.29x faster) - Powers all Bash tool operations
|
|
162
|
+
- โ
**File Reading**: Streaming read with 64KB buffer and pre-allocation (1.2-1.6x faster, 99.7% memory savings)
|
|
163
|
+
- โ
**Grep Search**: Streaming line-by-line search (90-99% memory reduction, scales to GB files)
|
|
124
164
|
- โ
**Edit Tool**: 9 smart replacement strategies with fuzzy matching (complex compute justifies FFI)
|
|
125
165
|
- โ
**File Listing**: Native ignore crate for fast directory traversal (eliminates process spawn)
|
|
126
166
|
- โ
**File Search (Glob)**: Pattern matching with gitignore support (eliminates process spawn)
|
|
127
|
-
- โ
**Code Search (Grep)**: Regex search across large codebases (eliminates process spawn)
|
|
128
167
|
- โ
**Archive Extraction**: ZIP file extraction using s-zip streaming reader (3-5x faster, cross-platform)
|
|
129
168
|
- โ
**Bash Parser**: Native tree-sitter bash command parsing (50-100x faster than WASM, 0.020ms per command)
|
|
130
|
-
- โ
**File I/O**: Native read/write with optimized raw FFI
|
|
131
169
|
- โ
**Directory Listing**: Fast recursive directory traversal
|
|
132
170
|
- โ
**VCS Info**: Lightning-fast git repository information (libgit2 vs subprocess)
|
|
133
171
|
- โ
**System Stats**: CPU and memory monitoring
|
|
134
172
|
|
|
135
173
|
**Benefits:**
|
|
136
174
|
|
|
175
|
+
- ๐ **1.2-1.6x faster** file reading with 64KB buffer and pre-allocation
|
|
176
|
+
- ๐พ **99.7% memory savings** on large files (39MB โ 0.13MB for 100K lines)
|
|
177
|
+
- ๐ **90-99% memory reduction** for grep search - can search GB-sized files
|
|
137
178
|
- ๐ **Up to 6x faster** text editing with 9 smart replacement strategies (Levenshtein, fuzzy matching)
|
|
138
179
|
- ๐ **Up to 5x faster** archive extraction (ZIP files) with cross-platform native code
|
|
139
180
|
- ๐ **83% less time** on large file edits (10K lines: 451ms โ 75ms)
|
|
140
181
|
- โก **1.83x faster** git operations using libgit2 (no process spawning)
|
|
141
182
|
- ๐ฏ **2-3x faster** glob/grep by eliminating process spawn overhead
|
|
142
|
-
- ๐ **Optimized I/O**:
|
|
183
|
+
- ๐ **Optimized I/O**: Streaming patterns with single-allocation for minimal memory footprint
|
|
143
184
|
- ๐ง **Consistent tooling**: Native Rust across all file operations for predictable performance
|
|
144
185
|
- ๐ **Cross-platform**: No external dependencies (unzip/PowerShell) for archive extraction
|
|
145
186
|
|
|
@@ -166,11 +207,12 @@ IronCode rewrites key operations in native Rust with **measured real-world perfo
|
|
|
166
207
|
**Enhanced:**
|
|
167
208
|
|
|
168
209
|
- ๐ **Native Rust performance** for compute-heavy operations (2-6x faster)
|
|
210
|
+
- ๐พ **Streaming file reads** with 99.7% memory savings (1.2-1.6x faster)
|
|
169
211
|
- โก **Eliminated process spawns** for glob/grep (2-3x speedup)
|
|
170
212
|
- ๐๏ธ **Fast archive extraction** with s-zip (3-5x faster, cross-platform native)
|
|
171
213
|
- ๐ **Faster edits** (2-6x improvement, scales with file size)
|
|
172
214
|
- ๐ฅ **Smart edit strategies** with fuzzy matching and Levenshtein similarity
|
|
173
|
-
- ๐ **Optimized I/O**:
|
|
215
|
+
- ๐ **Optimized I/O**: Streaming read with 64KB buffer and pre-allocation
|
|
174
216
|
- ๐ง **Consistent native tooling**: All file operations use Rust for predictable performance
|
|
175
217
|
- ๐ฏ **Memory efficiency**: Automatic resource monitoring with 300MB default limit
|
|
176
218
|
- ๐ฆ **Auto-throttling**: Prevents memory spikes and system crashes
|
|
@@ -194,20 +236,36 @@ npx ironcode-ai
|
|
|
194
236
|
|
|
195
237
|
### Homebrew (macOS/Linux)
|
|
196
238
|
|
|
239
|
+
IronCode is available through a Homebrew tap. The formula automatically installs the appropriate binary for your platform.
|
|
240
|
+
|
|
197
241
|
```bash
|
|
198
242
|
# Add the tap
|
|
199
|
-
brew tap KSD-CO/tap
|
|
243
|
+
brew tap KSD-CO/tap https://github.com/KSD-CO/homebrew-tap
|
|
200
244
|
|
|
201
245
|
# Install IronCode
|
|
202
246
|
brew install ironcode
|
|
203
247
|
|
|
248
|
+
# Verify installation
|
|
249
|
+
ironcode --version
|
|
250
|
+
|
|
204
251
|
# Update to latest version
|
|
205
252
|
brew upgrade ironcode
|
|
206
253
|
```
|
|
207
254
|
|
|
208
|
-
|
|
255
|
+
**Supported Platforms:**
|
|
256
|
+
|
|
257
|
+
- macOS (Intel x64)
|
|
258
|
+
- macOS (Apple Silicon arm64)
|
|
259
|
+
- Linux (x64)
|
|
260
|
+
- Linux (arm64)
|
|
261
|
+
|
|
262
|
+
The Homebrew formula is auto-generated from releases and maintained at [github.com/KSD-CO/homebrew-tap](https://github.com/KSD-CO/homebrew-tap/blob/main/ironcode.rb).
|
|
209
263
|
|
|
210
|
-
|
|
264
|
+
### Direct Download (Standalone Binary)
|
|
265
|
+
|
|
266
|
+
For users who prefer not to use package managers, download the pre-built CLI binary directly from [GitHub Releases](https://github.com/KSD-CO/IronCode/releases).
|
|
267
|
+
|
|
268
|
+
These are **standalone executables** that require no additional installation - just download, extract, and run:
|
|
211
269
|
|
|
212
270
|
**Linux (x64):**
|
|
213
271
|
|
|
@@ -471,6 +529,8 @@ Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) befo
|
|
|
471
529
|
|
|
472
530
|
**Recent Contributions:**
|
|
473
531
|
|
|
532
|
+
- โ
**Streaming read optimization** (1.2-1.6x faster, 99.7% memory savings - Feb 2026)
|
|
533
|
+
- โ
**Grep streaming optimization** (90-99% memory reduction, GB-file capability - Feb 2026)
|
|
474
534
|
- โ
**Memory optimization deployed to production** (97.6% faster message processing - Feb 2026)
|
|
475
535
|
- โ
**Resource monitoring system** (automatic throttling, 300MB default limit - Feb 2026)
|
|
476
536
|
- โ
**Native PTY/Terminal deployed to production** (15.29x speedup, powers Bash tool - Feb 2026)
|
|
@@ -509,6 +569,9 @@ bun ./script/test-integration.ts # Integration tests
|
|
|
509
569
|
# PTY/Terminal benchmark (15.29x speedup)
|
|
510
570
|
bun script/bench-pty.ts
|
|
511
571
|
|
|
572
|
+
# File read benchmark (1.2-1.6x speedup, 99.7% memory savings)
|
|
573
|
+
# See STREAMING-READ-OPTIMIZATION.md for details
|
|
574
|
+
|
|
512
575
|
# Rust micro-benchmarks
|
|
513
576
|
cd packages/ironcode/native/tool
|
|
514
577
|
cargo bench --bench edit_bench
|
|
@@ -553,33 +616,7 @@ _Benchmarked on IronCode repository (dev branch, 100 iterations)_
|
|
|
553
616
|
|
|
554
617
|
---
|
|
555
618
|
|
|
556
|
-
## Upstream Sync
|
|
557
|
-
|
|
558
|
-
This fork periodically syncs with [upstream OpenCode](https://github.com/anomalyco/opencode) to incorporate new features and bug fixes.
|
|
559
|
-
|
|
560
|
-
```bash
|
|
561
|
-
# To sync with upstream
|
|
562
|
-
git remote add upstream https://github.com/anomalyco/opencode.git
|
|
563
|
-
git fetch upstream
|
|
564
|
-
git merge upstream/dev
|
|
565
|
-
```
|
|
566
|
-
|
|
567
|
-
---
|
|
568
|
-
|
|
569
|
-
## License
|
|
570
|
-
|
|
571
|
-
This project maintains the same license as [OpenCode](https://github.com/anomalyco/opencode).
|
|
572
|
-
|
|
573
|
-
---
|
|
574
|
-
|
|
575
619
|
## Acknowledgments
|
|
576
620
|
|
|
577
621
|
- **OpenCode Team**: For creating the original open-source AI coding agent
|
|
578
622
|
- All contributors to this fork
|
|
579
|
-
|
|
580
|
-
---
|
|
581
|
-
|
|
582
|
-
## Links
|
|
583
|
-
|
|
584
|
-
- [Upstream OpenCode](https://github.com/anomalyco/opencode)
|
|
585
|
-
- [IronCode Documentation](https://ironcode.cloud/docs)
|
package/package.json
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.9.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"ironcode-darwin-arm64": "1.
|
|
13
|
-
"ironcode-windows-x64": "1.
|
|
14
|
-
"ironcode-linux-x64": "1.
|
|
12
|
+
"ironcode-darwin-arm64": "1.9.0",
|
|
13
|
+
"ironcode-windows-x64": "1.9.0",
|
|
14
|
+
"ironcode-linux-x64": "1.9.0"
|
|
15
15
|
}
|
|
16
16
|
}
|