@@ -19,31 +19,31 @@ It's a command-line utility that recursively processes directories and creates c
1919## Core Features
2020
2121
22- - ⚡ ** Blazing Fast & Parallel by Default:**
22+ - ⚡ ** Blazing Fast & Parallel by Default:**
2323 Processes thousands of files in seconds by leveraging all available CPU cores.
2424
25- - 🧠 ** Smart & Efficient File Discovery:**
25+ - 🧠 ** Smart & Efficient File Discovery:**
2626 Respects ` .gitignore ` and custom ignore patterns out-of-the-box using optimized, parallel directory traversal.
2727
28- - 💾 ** Memory-Efficient Streaming:**
28+ - 💾 ** Memory-Efficient Streaming:**
2929 Handles massive files with ease by reading and writing line-by-line, keeping memory usage low.
3030
31- - 🌳 ** Clear File Tree Visualization:**
31+ - 🌳 ** Clear File Tree Visualization:**
3232 Generates an easy-to-read directory structure at the top of the output file.
3333
34- - 🔍 ** Powerful Filtering & Preview:**
34+ - 🔍 ** Powerful Filtering & Preview:**
3535 Easily include only the file extensions you need and use the instant ` --preview ` mode to see what will be processed.
3636
37- - ⚙️ ** Configuration-First:**
37+ - ⚙️ ** Configuration-First:**
3838 Use a ` .context-builder.toml ` file to store your preferences for consistent, repeatable outputs.
3939
40- - 🔁 ** Automatic Per-File Diffs:**
40+ - 🔁 ** Automatic Per-File Diffs:**
4141 When enabled, automatically generates a clean, noise-reduced diff showing what changed between snapshots.
4242
43- - ✂️ ** Diff-Only Mode:**
43+ - ✂️ ** Diff-Only Mode:**
4444 Output only the change summary and modified file diffs—no full file bodies—to minimize token usage.
4545
46- - 🧪 ** Accurate Token Counting:**
46+ - 🧪 ** Accurate Token Counting:**
4747 Get real tokenizer–based estimates with ` --token-count ` to plan your prompt budgets.
4848
4949
@@ -57,6 +57,41 @@ It's a command-line utility that recursively processes directories and creates c
5757cargo install context-builder
5858```
5959
60+
61+ ### If you don't have Rust installed
62+
63+ Context Builder is distributed via crates.io. We do not ship pre-built binaries yet, so you need a Rust toolchain.
64+
65+
66+ #### Quick install (Linux/macOS):
67+
68+ ``` bash
69+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
70+ ```
71+ Follow the prompt, then restart your shell
72+
73+ #### Windows (PowerShell):
74+
75+ ``` powershell
76+ irm https://sh.rustup.rs -UseBasicParsing | Invoke-Expression
77+ ```
78+
79+ After installation, ensure Cargo is on your PATH:
80+
81+ ``` bash
82+ cargo --version
83+ ```
84+
85+ Then install Context Builder:
86+ ``` bash
87+ cargo install context-builder
88+ ```
89+
90+ Update later with:
91+ ``` bash
92+ cargo install context-builder --force
93+ ```
94+
6095### From source
6196
6297``` bash
@@ -100,6 +135,15 @@ context-builder --token-count
100135# Add line numbers to all code blocks
101136context-builder --line-numbers
102137
138+ # Skip all confirmation prompts (auto-answer yes)
139+ context-builder --yes
140+
141+ # Output only diffs (requires auto-diff & timestamped output)
142+ context-builder --diff-only
143+
144+ # Clear cached project state (resets auto-diff baseline & removes stored state)
145+ context-builder --clear-cache
146+
103147# Combine multiple options for a powerful workflow
104148context-builder -d ./src -f rs -f toml -i tests --line-numbers -o rust_context.md
105149```
@@ -129,6 +173,9 @@ auto_diff = true
129173# Set to true to greatly reduce token usage when you just need what's changed.
130174diff_only = false
131175
176+ # Number of context lines to show around changes in diffs (default: 3)
177+ diff_context_lines = 5
178+
132179# File extensions to include
133180filter = [" rs" , " toml" , " md" ]
134181
@@ -137,6 +184,19 @@ ignore = ["target", "node_modules", ".git"]
137184
138185# Add line numbers to code blocks
139186line_numbers = true
187+
188+ # Preview mode: only show file tree without generating output
189+ preview = false
190+
191+ # Token counting mode
192+ token_count = false
193+
194+ # Automatically answer yes to all prompts
195+ yes = false
196+
197+ # Encoding handling strategy for non-UTF-8 files
198+ # Options: "detect" (default), "strict", "skip"
199+ encoding_strategy = " detect"
140200```
141201
142202---
@@ -161,10 +221,11 @@ If you also set `diff_only = true` (or pass `--diff-only`), the full “## Files
161221- ` --preview ` - Preview mode: only show the file tree, don't generate output.
162222- ` --token-count ` - Token count mode: accurately count the total token count of the final document using a real tokenizer.
163223- ` --line-numbers ` - Add line numbers to code blocks in the output.
164- - ` --diff-only ` - With ` --auto-diff ` + ` --timestamped-output ` , output only change summary + modified file diffs (omit full file bodies).
224+ - ` -y, --yes ` - Automatically answer yes to all prompts (skip confirmation dialogs).
225+ - ` --diff-only ` - With auto-diff + timestamped output, output only change summary + modified file diffs (omit full file bodies).
226+ - ` --clear-cache ` - Remove stored state used for auto-diff; next run becomes a fresh baseline.
165227- ` -h, --help ` - Show help information.
166228- ` -V, --version ` - Show version information.
167-
168229---
169230
170231## Token Counting
@@ -189,4 +250,4 @@ See **[CHANGELOG.md](CHANGELOG.md)** for a complete history of releases and chan
189250
190251## License
191252
192- This project is licensed under the MIT License. See the ** [ LICENSE] ( LICENSE ) ** file for details.
253+ This project is licensed under the MIT License. See the ** [ LICENSE] ( LICENSE ) ** file for details.
0 commit comments