Skip to content

Releases

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 20:18
v1.6.0
fde4dc0

Upgrade note

  • Run --sync-ignores --write once after upgrading. It rewrites .contextignore in the new form and adds the private-key patterns.
  • Folder patterns in .contextignore now really block Token Optimizer reads; before, they matched nothing. To keep a folder readable and searchable, add !folder/ to .ignore.

Fixed

  • .contextignore is now written in the form Token Optimizer reads (fnmatch on the full path or the file name, which denies the whole Read):
    • Folder patterns become */dir/*. A bare dir/ never matched anything there.
    • Image and PDF patterns (*.png, *.jpg, *.webp, *.pdf, ...) are no longer written, so agents can open reference images again.
    • ! lines, which Token Optimizer ignores, are not copied.
    • Lines an older sync wrote in the old form are replaced on the next --sync-ignores --write. Lines you added yourself are kept.
  • Keep-list: a !path line in .ignore (e.g. !_work/, !decompiled/) now means "keep this on purpose":
    • It is never suggested as junk, and neither is anything under it.
    • It is left out of .contextignore.
    • --verify stops reporting it.
  • Landmarks (file:Lstart-Lend):
    • Paths are resolved relative to the doc that holds them (nested AGENTS.md / INDEX.md), then to the root, and never outside the root.
    • Paths with spaces work inside a backtick code span.
    • A command written in a code span still checks its path argument.
    • --sync-landmarks --write now prints FAIL and exits 1 when some references need a manual fix (missing file, unknown symbol, out of range) instead of PASS healed 0.
  • --audit:
    • Python virtual environments are found by pyvenv.cfg / conda-meta under any name (.venv_re/, env/), and their library files no longer count as active source.
    • Plain-text files over 1 MB (.txt, .log, .csv, ...) are flagged for review.
    • Subfolders with their own AGENTS.md + .ignore are listed as nested setups instead of being counted again.
    • .exe / .dll / .bin are labelled "binary/media" instead of "media/fonts".
  • Private key files (*.pem, *.key, *.p12, *.pfx, id_rsa*, id_ed25519*) are now in the base ignore set, so search never surfaces them. Re-run --sync-ignores --write to add them.
  • C# outline:
    • Methods with default parameter values (RunAsync(int retries = 3)) are listed.
    • Expression-bodied methods (ToString() => ...) are listed.
  • --outline on a file whose full list exceeds the output cap now hides nested symbols first (the header says how many), so the top-level map is not cut off. A [filter] lists them.

Security

  • Secret redaction now catches four kinds of secret that used to pass through --slice / --outline / --map output unredacted:
    • AWS secret access keys (40-char base64) next to an AWS secret key name (aws_secret_access_key = ..., AWS_SECRET_ACCESS_KEY=, secretAccessKey:), quoted or not. The same 40-char shape elsewhere is left alone.
    • Quoted values of 8+ characters assigned to password, passwd, secret, secret_key, api_key / apiKey or token names, including prefixed names such as DB_PASSWORD or access_token (:, =, := and =>). Only the value is redacted, so the key name stays readable. Code such as const password = getPassword(), token = req.headers.x, text with spaces and ${VAR} placeholders is not redacted.
    • Hugging Face hf_ tokens.
    • Azure AccountKey= and SharedAccessKey= values in connection strings.

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 14:37
v1.5.0
2922f5e

Added

  • --outline / --slice now find more symbols:

    • Go generic functions (func Map[T any, U any](...)).
    • Rust impl<T: Into<String>> Point<T> blocks written without a space before <, and macro_rules! macros.
    • TS/JS class properties that hold arrow functions (static create = <U,>(v: U) => ..., handle = async (e) => {).
    • Top-level object/array constants of 10+ lines (const OL = Object.freeze({, const ROUTES = [, new Set([).

    The TypeScript Compiler AST path applies the same rules. TS lexer accuracy baseline: 90.1% to 90.3% (141 to 145 judged symbols).

Fixed

  • --slice <file> <symbol> no longer silently returns a different symbol when the name is only a partial match. A partial name that fits several symbols is refused with the candidate list (for example OL used to print collectAuditStats); a partial name that fits exactly one symbol still works but prints a note: partial match line. An exact name shared by several symbols (two __init__ methods, for example) still returns the first one, with a note: N symbols named "X" line.
  • Python one-line def/class bodies (def f(self): return 1, class B(A): pass) now end on their own line instead of swallowing the code that follows. Signature scanning also skips :, # and brackets inside string defaults.

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 21:17
v1.4.0
226c7b8

Security

  • All repository writes (--sync-ignores --write, --sync-landmarks --write, --handoff --out) now refuse symlinks and paths that resolve outside the repository root. Previously a repository shipping .ignore as a symlink could make --sync-ignores --write overwrite a file outside the repo.

Fixed

  • --sync-ignores --write no longer deletes patterns that exist only in .contextignore or in the user's own extra_ignore_patterns in .jcodemunch.jsonc; they are merged, as already done for the other tool ignore files.

Changed

  • typescript is no longer an optional dependency: installs are truly zero-dependency (no ~20 MB download on npx). Compiler-AST mode is opt-in via a global typescript install, now also detected in the macOS/Linux global npm directory.
  • CI: macOS added, Node 18/20/22/24 matrix, least-privilege token permissions, superseded PR runs cancelled, Actions bumped to v5, Dependabot for workflow actions.

v1.3.1

Choose a tag to compare

@github-actions github-actions released this 15 Nov 20:49
v1.3.1
db54412

Added

  • Lexer accuracy corpus: 21 unmodified real-world files scored against real parsers (npm run accuracy); CI fails when a language drops below its recorded baseline.

Fixed

  • Lexer (TS): type aliases without braces no longer run on to a later block; class methods indented with tabs or with parameters wrapped across lines are now listed; arrow functions whose expression body starts on the next line get the right end line. Measured TypeScript exact-span accuracy went from 66.0% to 90.1%.

Changed

  • Install instructions, site, demo, and the --check-update upgrade hint now use the npm package (npx antis-optimizer, npm install -g antis-optimizer).
  • Release workflow stages the npm publish for maintainer 2FA approval.

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 20:15
v1.3.0
252ea19

Added

  • Release automation: pushing a vX.Y.Z tag tests, creates the GitHub Release from this file, and publishes to npm with provenance.
  • SECURITY.md, CODE_OF_CONDUCT.md, and this changelog.

Changed

  • --audit slice savings are now measured from each monolith's real symbol spans instead of a fixed 450-token constant; the line is labelled as an estimate and states its basis. Break-even shows two decimals.
  • --help groups commands by purpose, leading with --outline / --slice.
  • README: real output examples, supported-languages table, Safety & Limits section.

v1.2.0

Choose a tag to compare

@4anti 4anti released this 15 Nov 19:47
v1.2.0
edcb024

Added

  • OpenCode first-class support and multi-host / RTK detection in --detect
  • Conditional (anti-bloat) ignore sync: only tool ignore files that already exist are updated
  • Expanded language and config outlines/slices (Java, C# namespaces, YAML list items, JSON arrays) and stack detection
  • AGENTS.md and synced ignore files for this repo; CI now runs --verify on itself

Security

  • Secret redaction now covers Slack, GitHub fine-grained (github_pat_), Stripe, npm and GitLab tokens, PEM private-key blocks, passwords in scheme://user:pass@host URLs, and _authToken= values
  • .npmrc, .netrc, .pypirc, .git-credentials and non-RSA SSH keys are refused
  • TypeScript is no longer resolved from the script's own directory when that directory is inside the scanned root (set ANTIS_TRUST_LOCAL_TS=1 to opt out)

Changed

  • Narrowed over-broad .gitignore globs
  • Site savings figures labelled as modeled
  • Test suite: 59 tests

Full changelog: v1.1.0...v1.2.0

v1.1.0

Choose a tag to compare

@4anti 4anti released this 15 Nov 01:06
v1.1.0
4c0fb0d

What's New in v1.1.0

Highlights

  • Tier-0 / Tier-1 / Tier-2 --audit & --verify parity: Extracted shared collectAuditStats() and classifyRepoTier() helpers so clean repos with many small files do not fall through to Tier 2, Tier-0 0-doc repos pass --verify cleanly, and passing --verify output prints on a single |-delimited line.
  • AST/Lexer --slice & :Lstart-Lend ranges: Added :Lstart[-Lend] range slicing alongside #symbol, resolved code symbols via parseFileOutline() instead of first substring hits, surfaced missing-symbol errors, eliminated false secret blocks on code files like secretManager.ts, and gated raw .json arg refusal on hasTokenOpt.
  • .gitignore ! negation preservation & comment-safe .jcodemunch.jsonc sync: Preserved ! negation ordering across ignore checks/sync targets and inserted missing extra_ignore_patterns without stripping JSONC comments.
  • Read-only --check-update [--critical-only]: On-demand GitHub Releases checker (pinned https://api.github.com, 2.5s timeout, zero auto-writes) that flags intermediate [CRITICAL] / [SECURITY] releases and prints exact manual upgrade steps per install type.

Full Changelog: v1.0.0...v1.1.0

v1.0.0 — Cut AI Context Bloat & Token Waste

Choose a tag to compare

@4anti 4anti released this 14 Nov 18:54
v1.0.0
804f21f

Before vs After comparison: blocking junk files and reading exact line slices saves up to 91% of tokens

What Is antis-optimizer?

AI coding assistants (Claude Code, Cursor, Codex, and Antigravity) quietly waste huge chunks of your context window reading build folders (dist/, node_modules/, lockfiles), giant JSON dumps, and entire 800-line files just to inspect one function.

v1.0.0 gives you a fast, zero-dependency CLI and lightweight repo setup to stop the waste.

What's Inside v1.0.0

  • Find what's eating your tokens (--audit): Scans your repo for junk folders, oversized bundles, and huge files, then recommends the lightest setup that pays off.
  • Sync ignore files in one shot (--sync-ignores --write): Mirrors ignore rules across .ignore, .contextignore, and .jcodemunch.jsonc without wiping your existing comments.
  • Read exact line ranges, not whole files (--outline, --slice): Maps functions, classes, HTML sections, CSS blocks, and JSON keys to file:Lstart-Lend ranges across TS/JS/JSX/TSX, Python, Rust, Go, C/C++, C#, HTML, CSS, and JSON (uses TypeScript's real parser if installed, or its own built-in parser with zero required dependencies).
  • Auto-update shifted line numbers (--sync-landmarks --write & --verify): Keeps AGENTS.md / INDEX.md line numbers accurate after edits, strips secrets automatically, and checks everything in one clean PASS line.

Animated terminal demo of --audit, --outline, and --verify

Quick Start

Try it right away without cloning:

npx github:4anti/antis-optimizer --audit

Or install globally:

npm install -g git+https://github.com/4anti/antis-optimizer.git
antis-optimizer --help
  • Tested: 29/29 automated checks passing on Linux & Windows (Node 18 and Node 22).
  • Attached archive: antis-optimizer-1.0.0.tgz (v1.0.0 npm package bundle).