Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

All notable changes to this project will be documented in this file.

## Unreleased
## v0.12.0 (2026-10-13)

- **Static musl release binaries (#21 P10).** Releases now include `x86_64-unknown-linux-musl` and `aarch64-unknown-linux-musl` archives (7 archives plus `SHA256SUMS`), so the binary runs on Alpine and on glibc older than 2.34.

- **Binary files are reported, not dumped; the header no longer leaks absolute paths (#21 P11).** A file with NUL bytes in its first 8 KiB (UTF-16/32 text with a BOM excepted) is listed under `## Skipped` as `binary` instead of a `<Binary file or unsupported encoding>` block in the body (a repo without `.git` produced hundreds of those). The header says `from the `my proj` directory` rather than the absolute path passed with `-d`.
- **`--stats[=N]` per-file token breakdown; real token count after a run (#21 P7).** `--stats` lists the largest files by tokens (20 by default; `--stats=0` lists all) and, with `--max-tokens`, which files fit, which is cut first and what is omitted; it writes no document. The `Estimated tokens` line after a run is now the tokenizer's count of the written document (it was bytes/4, off by −11% to −75% on real code); output piped with `-o -` keeps the `~NK` estimate.
Expand All @@ -11,7 +13,7 @@ All notable changes to this project will be documented in this file.
- **Rust `--signatures` group methods under their `impl`/`trait` (#22 B16).** Methods used to be listed flat after `impl A`, leaving several `pub fn new` ambiguous. Each impl/trait is now one entry: `impl A { pub fn new() -> A … }`. Library: members are part of the impl/trait signature's `full_signature` and no longer separate `Signature`s.
- **Python `--signatures`: no nested functions, overloads keep their return types (#22 B16).** Functions and classes defined inside a function are no longer listed; `@overload def f(...) -> T: ...` used to lose the decorator and `-> T` (the one-line body defeated the slicer) and now keeps both, with decorator lines no longer carrying stray indentation.
- **Go `--signatures` keep return types (#22 B16).** Methods lost their results (`func (c *Command) Context()` for `… context.Context`) because the grammar's `result` field was looked up under the wrong node kind; type aliases printed `type X type`. Now `func (c *Command) Context() context.Context` and `type X flag.ParseErrorsWhitelist`.
- **Installer picks the right libc and verifies what it installed (#21 P10, B23).** `install.sh` uses the static `musl` archive on Alpine and glibc older than 2.34 (`CONTEXT_BUILDER_LIBC=musl|gnu` overrides) and stops with instructions when a release has no musl build (none do yet; the musl release targets need a workflow change that is tracked separately) instead of installing a binary that cannot start. It runs `$INSTALL_DIR/context-builder --version` instead of whatever is first on `PATH`, and warns when the install is shadowed or not on `PATH`. README says `| sh`, matching the script.
- **Installer picks the right libc and verifies what it installed (#21 P10, B23).** `install.sh` uses the static `musl` archive on Alpine and glibc older than 2.34 (`CONTEXT_BUILDER_LIBC=musl|gnu` overrides) and stops with instructions when a release has no musl build (v0.12.0 is the first that has one) instead of installing a binary that cannot start. It runs `$INSTALL_DIR/context-builder --version` instead of whatever is first on `PATH`, and warns when the install is shadowed or not on `PATH`. README says `| sh`, matching the script.
- **Malformed config is an error; unknown keys warn (#21 B19).** A `context-builder.toml` that cannot be parsed (or has a wrong value type) now stops the run with `invalid config '<path>': …` instead of silently using defaults. Unknown keys such as `filters` are reported with a suggestion (`did you mean 'filter'?`) and ignored. Library: new `config::try_load_config`; `load_config_from_path` keeps its old lenient behavior.
- **`keep_last = N` snapshot retention (#20).** With timestamped output, only the newest N generated snapshots are kept.
- **Docs (#21):** bare invocation, `-o -` in help, environment variables, hidden files/symlinks, diff format.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "context-builder"
version = "0.11.0"
version = "0.12.0"
default-run = "context-builder"
edition = "2024"
# std::fs::File advisory locking (used by the cache) stabilized in Rust 1.89.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ Pre-built binaries include full Tree-Sitter AST support. The installer verifies

The checksum-verified manual steps below need no script and pin the exact release. (`install.sh` can also pin with `CONTEXT_BUILDER_VERSION=x.y.z` from the first release after v0.11.0 onward; download it from that release's tag, read it, then run it. Do not run it from `master`.)

Download the archive and `SHA256SUMS` from the [release page](https://github.com/igorls/context-builder/releases/tag/v0.11.0) and verify them yourself:
Download the archive and `SHA256SUMS` from the [release page](https://github.com/igorls/context-builder/releases/tag/v0.12.0) and verify them yourself:

```bash
V=0.11.0; T=x86_64-unknown-linux-gnu # or aarch64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin
V=0.12.0; T=x86_64-unknown-linux-gnu # or aarch64-unknown-linux-gnu, x86_64/aarch64-unknown-linux-musl, x86_64-apple-darwin, aarch64-apple-darwin
curl -fsSLO "https://github.com/igorls/context-builder/releases/download/v$V/context-builder-$T.tar.gz"
curl -fsSLO "https://github.com/igorls/context-builder/releases/download/v$V/SHA256SUMS"
sha256sum --ignore-missing -c SHA256SUMS \
Expand All @@ -108,7 +108,7 @@ sha256sum --ignore-missing -c SHA256SUMS \

> On Alpine and on glibc older than 2.34 the installer needs the static `musl` build. Releases that do not include one make it stop with instructions (`cargo install context-builder --locked`) rather than install a binary that will not start; force a choice with `CONTEXT_BUILDER_LIBC=musl` or `gnu`. It verifies the SHA256 checksum, and warns if another `context-builder` on your `PATH` shadows the one it installed.

> **For agents and automation:** never pipe a remote script into a shell. Use a pinned `cargo install context-builder --version 0.11.0 --locked --features tree-sitter-all`, or the checksum-verified steps above.
> **For agents and automation:** never pipe a remote script into a shell. Use a pinned `cargo install context-builder --version 0.12.0 --locked --features tree-sitter-all`, or the checksum-verified steps above.

### Windows (PowerShell)

Expand All @@ -123,7 +123,7 @@ $env:PATH += ";$env:LOCALAPPDATA\Programs\context-builder"
### From crates.io

```bash
cargo install context-builder --version 0.11.0 --locked --features tree-sitter-all
cargo install context-builder --version 0.12.0 --locked --features tree-sitter-all
```

### From source
Expand Down
10 changes: 5 additions & 5 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
implementation agent). Use when generating project context, preparing Deep Think reviews,
or binding a weaker coding agent to a senior reasoning pass.
homepage: https://github.com/igorls/context-builder
version: 0.11.0
version: 0.12.0
requires:
- context-builder
---
Expand All @@ -21,12 +21,12 @@ Generate a single, structured markdown file from any codebase directory. The out

```bash
# Requires Rust toolchain. Pinned to a version; crates.io verifies the package checksum.
cargo install context-builder --version 0.11.0 --locked --features tree-sitter-all
cargo install context-builder --version 0.12.0 --locked --features tree-sitter-all
```

Pre-built binaries with SHA256 checksums are also available from [GitHub Releases](https://github.com/igorls/context-builder/releases/tag/v0.11.0): download the archive and `SHA256SUMS` for the pinned version and verify before installing. Do not pipe a remote script into a shell.
Pre-built binaries with SHA256 checksums are also available from [GitHub Releases](https://github.com/igorls/context-builder/releases/tag/v0.12.0): download the archive and `SHA256SUMS` for the pinned version and verify before installing. Do not pipe a remote script into a shell.

Verify: `context-builder --version` (expected: `0.11.0`)
Verify: `context-builder --version` (expected: `0.12.0`)


## Security & Path Scoping
Expand Down Expand Up @@ -323,7 +323,7 @@ When `--signatures` is active, file contents are replaced with extracted signatu

## Error Handling

- If `context-builder` is not installed, install with `cargo install context-builder --version 0.11.0 --locked --features tree-sitter-all`
- If `context-builder` is not installed, install with `cargo install context-builder --version 0.12.0 --locked --features tree-sitter-all`
- If `--signatures` shows no output for a file, the language may not be supported or the feature was not enabled at install
- If output exceeds token limits, add `--max-tokens` or narrow with `-f` / `-i`, or use `--signatures`
- If the project has no `.git` directory, auto-ignores still protect against dependency flooding
Expand Down
Loading