Skip to content

Releases

v0.5.3

Choose a tag to compare

@github-actions github-actions released this 27 Nov 23:23
520bd8e

Patch Changes

  • 648de44: Write .sweeprc exclusively with mode 0644 in sweep init (with atomic sibling replacement for --force, clear refusal without suggesting --force for non-regular or other-owner targets, and POSIX fsync on publication), tighten updated .sweeprc permissions to 0644 (preserving stricter modes such as 0600) when saving pattern changes, allow group-writable configs and config directories only when the group matches the user's primary group (supporting umask 002 while still refusing other-group, world-writable, and other-user entries), and align sweep doctor with the same config-file and config_dir trust checks.

  • a5a1c41: Projects view: when a removal fails (a root-owned node_modules from Docker or sudo npm, say), the reason now stays on that item's row ("✗ EACCES: permission denied") after the notice is gone, instead of only the first reason flashing in a notice. The item stays queued, and the receipt line says how many were not attempted when a run stops early.

  • 36037df: Worktrees read as part of their repository. Plans carry two optional fields for an artifact in a linked git worktree: worktreeOf (the canonical repository path it belongs to) and worktreeState (upstream_gone when its remote tracking branch is missing, or merged when the worktree is clean and its own commits are proven merged into a verified default branch). In the projects view a worktree row says app · merged, app · branch missing, or app · worktree instead of app/.worktrees, and the details margin shows the full state (Tracking branch missing · check git for upstream_gone). Only proven merged, clean worktrees nobody has touched for a day are listed first under "Finished worktrees"; a missing tracking branch is evaluated first and is never treated as finished. It is a hint about which build output you are done with; sweep still removes only build output.

  • ed10a51: Harden scan target guardrails and tool-home classification across both the JS and Rust engines:

    • Prefix-block deep OS subtrees (/etc, /sys, /proc, /dev except /dev/shm, /boot, /bin, /sbin, /lib, /lib64, macOS /private/etc, and Windows <Drive>:\Windows) as scan targets while keeping /run, /usr, and /var exact-match so /run/media/..., /run/user/<uid>/gvfs, /var/www, and /usr/local/src stay usable; normalize Windows \\?\ verbatim prefixes before lexical checks; add Windows to SYSTEM_TOOL_DIRS and scope Unix OS roots to non-drive/non-UNC paths so C:\dev\... stays cleanable.
    • Expand HOME_TOOL_DIRS and SYSTEM_TOOL_DIRS to protect additional toolchain, version-manager, conda, editor, agent, package-manager, and app homes (such as ~/.npm-global, ~/.asdf, ~/.mise, ~/go/pkg, ~/scoop, ~/.var/app, ~/snap, ~/miniconda3, ~/anaconda3, ~/.conda, ~/.vscode-insiders, ~/.vscode-oss, ~/.windsurf, ~/.claude, ~/.codex with ~/.codex/worktrees carved out, ~/.t3/userdata, ~/Applications, and /home/linuxbrew/.linuxbrew).
    • Surface a non-blocking cloud-sync reason and scan notice for candidates under cloud-synced folders (~/Dropbox, ~/OneDrive, ~/OneDrive - <Org>, ~/Google Drive, ~/My Drive, and macOS ~/Library/CloudStorage/*) without changing their risk tier or default selection.
    • Restrict .app bundle detection to macOS folders containing Contents/Info.plist so ordinary project directories named *.app are no longer misclassified as tool homes.
  • 40f2bb2: Projects view: the bar under the total now shows where the reclaimable space is, split by what it costs to get back (cache, install, build), at every terminal width and with a key under it. Once something is queued, its share of each part stays solid and the rest recedes, so one bar shows what is there and what is chosen; it follows the keyboard with no easing. The review dialog says how the queue comes back ("install 5.0 GiB (bun install) · build 3.0 GiB (cargo build)"), and the size bars hold 3:1 contrast in both themes.

  • d73ff3f: Projects view: one definition of "reclaimable" everywhere. Rows, section headers and the top line all count safe and caution items; dangerous and blocked bytes are named beside the total ("+8.8 KiB guarded") and never added to it. While a scan runs the total says "X so far", an incomplete scan says so and offers r, and projects sort by what you can reclaim. After a removal the receipt shows the estimate with a "" next to what the disk actually gained, and says when far less came back (hardlinked installs, another volume).

  • 862f3ce: The project panel describes opt-in kinds (.venv, __pycache__, .gradle...) with the catalog's own note ("virtualenv - slow to recreate") instead of "your pattern", which is now said only for a pattern you wrote yourself.

  • f228a2b: Projects view: keys now act only on what is on screen. Tab no longer sends focus to the hidden folder sidebar (it used to make Space queue a row you could not see), Esc closes an opened project before anything else, and a risk tier or folder scope carried over from the full view is named beside the total ("dangerous only · esc clears"). After a trash apply the notice says the bytes are still on disk instead of "freed".

  • dcbcd55: Projects view: ? shows its own short key list (the full-view list listed i twice with two meanings), narrow terminals drop whole parts instead of cutting a size or a word, and an empty scan says which patterns are opt-in.

  • 5da011b: Make npm installs, Node 22.12+ scans, and UI startup safer across Node, Bun, and Windows:

    • Drop end-of-life Node.js 20 and require engines.node >= 22.12.0 for @kitsunekode/sweep (verified with installed-tarball headless smoke across Node 22.12.x, 22.x, 24.x, and 26.x with optional dependencies omitted and raw non-UTF-8 filenames).
    • Move @opentui/core to optionalDependencies. Bun (bun add -g @kitsunekode/sweep, bunx @kitsunekode/sweep ui, including bun install --production) and Yarn 4 install it automatically. pnpm and Yarn 1 skip linking it on Node older than 26.4 (Yarn 1 prints an engine warning), and npm on Node older than 26.4 leaves @opentui/core unmet and may still extract @opentui/core-<platform> unless --omit=optional is passed. In all of these cases, sweep installs and runs CLI commands on Node.js 22.12+.
    • Verify the resolved @opentui/core version (following npm prerelease semver rules) and required exports before sweep ui loads, reporting the offending path, version, and recovery options (reinstall, bunx, or cross-platform standalone binaries) instead of a raw SyntaxError when a shared global tree holds an incompatible copy. sweep doctor runs the static version and export inspection under Node (and full live-export verification under Bun) and no longer warns about OpenTUI in standalone binaries.
    • Make git authoritative for tracked-file protection across both engines: verify each enclosing repository with git rev-parse --show-toplevel, list tracked paths once with sanitized git ls-files -z --cached --full-name (dropping inherited GIT_* overrides and disabling core.fsmonitor), and match candidates locally using the repository's core.ignorecase and core.precomposeunicode (or macOS NFC/NFD) rules while preserving literal backslashes on POSIX. Committed symlinks matching an artifact name are now blocked as git-tracked, and candidates containing a .git entry at or below them are flagged at least dangerous with contains-git-repository (never pre-selected, and refused at apply unless explicitly selected one at a time). When git is unavailable, the native fallback validates regular files without blocking, enforces extensions.objectFormat, and marks unverified or empty-index repository items dangerous (tracked-status-unknown). Apply refuses with exit code 2 and structured refusal codes git_tracked, tracked_status_unknown, and contains_git_repository.
    • Build the published CLI, UI, and standalone binaries with NODE_ENV="production" and the production JSX transform for @opentui/react (smaller sweep-ui.js, working outer ErrorBoundary in standalone builds, no React development mode), and strip workspace devDependencies and monorepo scripts from the published manifest.
    • Search only absolute PATH directories when resolving the Rust engine and helper binaries (node, git, bun, sync), skipping empty, whitespace-only, ., and relative PATH segments on every platform and never spawning a bare executable name on lookup miss. Lookup still preserves literal spaces in absolute directory names, skips non-executable POSIX files and Windows .CMD/.BAT shims ahead of a real .exe, applies shell-free PATHEXT suffixes to extensionless Windows paths, and reports missing explicitly configured paths instead of silent not_installed.
    • Keep the Rust engine probe's failure reason in sweep doctor and emit both a stable enumerated reasonKind and a human-readable reason sentence for warning checks in sweep doctor --json. --engine auto prints a single stderr note when falling back to JS for any reason other than not_installed. When Bun's JS directory reader cannot start node, report a missing-runtime error rather than a scan resource limit.
    • Projects view search now hints older:30d instead of the nonexistent idle:30d key and shows filter advice for malformed queries.
    • Shell completions now scope --allow-dangerous to clean/apply and complete --view and --theme values in bash, zsh, and fish.
  • e114243: In the projects view, resting on an item lights its share of the size bar and
    lets the other shares recede, and the matching entry under the bar turns bold.
    It follows the cursor at once (no easing: it moves with every key). Terminals
    without pixel graphics show the receded shares as a lighter line.

  • 7d1f51e: sweep status [path] says what you could free right now: the total, which
    kinds ho...

Read more

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 27 Oct 19:38
c3cd0bb

Patch Changes

  • 533bde3: The projects view can remove things directly: x on a project reviews just
    that project's removable items (never dangerous ones), and x on an item
    reviews that item; whatever else is queued stays queued. The footer shows a
    to queue everything removable and, once something is queued, c to review
    and u to clear. Review dialogs name what they remove, the help lists the
    keys inside a review (y remove, t trash, esc cancel), and the message after a
    removal says what went and what it freed, leaving out zero counts.

    A first look gets one plain line above the footer (space picks, c shows what
    would go, nothing is deleted until y) until something is queued. The next
    step in the footer is drawn in the accent, and ? keys always fits.

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 27 Oct 18:47
52f1882

Patch Changes

  • 8be9dd6: 0.5.0 cannot be installed from npm, and its native engines were published
    without the execute bit, so they never ran. Install 0.5.1 instead. The package
    is now published from its packed tarball, so the registry's install metadata
    is exactly the manifest that was checked, and engine binaries are made
    executable and checked before they are published.

  • becee24: In terminals with kitty graphics, the full view's size bars, the folder
    sidebar's bars and the removal progress bar are now drawn in pixels, on the
    colour painted behind each row. Other terminals keep the block-character bars.
    The progress bar eases to each new count, and jumps under reduced motion.

    The projects view's details panel opens with a disk map: one bar split by what
    bringing each part back costs (cache, install, build), cheapest first, with
    the size of each under it.

    sweep ui asks the terminal for its background before drawing anything, so it
    no longer flashes the fallback theme before settling on the terminal's own.
    --theme auto|dark|light (or SWEEP_THEME) sets the theme; t still cycles
    it and remembers the choice. While a scan runs, its bar glides instead of
    showing a percentage it cannot know yet; the count beside it is the progress.

  • 4d97a17: The dark and light themes are now Sweep's own solid canvas in every terminal.
    Only auto takes on the terminal's background and transparency; before, a dark
    or light theme on a matching terminal blended into it the same way.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 18:03
c4497a5

The first release since 0.3.0; it carries every change made since then.

Minor Changes

  • fa87aae: sweep ui opens on a calm projects view: one row per project (git work tree or
    manifest folder), grouped into "Idle 30+ days" and "Worked on recently", with a
    single line that says how much you can reclaim and how much is idle. No boxes
    or column headers; detail opens with Enter. i queues idle projects, b
    switches to the full folder view. Plans now carry an optional projectRoot per
    candidate, and idle time is measured for the whole project.

  • 67ab1ec: Sweep now respects git: a folder holding any tracked or staged file is blocked,
    since build output is never committed. Git is asked once per repository with
    the repository's core.fsmonitor disabled, and again just before removal.
    Unattended runs (--yes) refuse dangerous items unless --allow-dangerous is
    passed, and every dangerous path is printed before it is removed.

  • 08a73d6: Sweep now knows when each project was last worked on (git index and reflog,
    plus the project's own files; never its build output) and uses it:

    • --idle 30d (also 2w, 3m, 1y) selects only artifacts in projects
      nobody has touched for that long.
    • The scan report shows each project's idle time, warns when the selection
      includes projects worked on today, suggests clearing idle projects first,
      and shows free disk space before and after.
    • Plans carry an optional projectActiveMs per candidate.
  • cd9b8da: sweep init now looks before it writes: a read-only scan shows the built-in
    artifacts it found and the opt-in names worth a decision, asks about each in a
    terminal, and writes only those answers. It no longer writes placeholder
    patterns. --dry-run prints the file instead of writing it.

  • 8adbbd5: Scan and dry-run output leads with what would be reclaimed, then lists groups
    largest first with paths relative to the folder you scanned. Long groups fold
    into one counted line (--verbose lists everything), and items left behind are
    explained: left for you to decide, or blocked. While scanning, a live line shows
    folders walked and items found instead of going quiet after the first match.

  • 12da012: sweep ui sits on your terminal instead of covering it: in auto theme it asks
    the terminal for its background, takes dark or light from it, keeps the
    terminal's own colour and opacity as the canvas, and mixes every tint from it.
    Project rows show their size as a bar, so where the space is reads before a
    number does. In terminals with kitty graphics (kitty, Ghostty, WezTerm) the bars
    and the meter under the answer line are drawn in pixels; elsewhere they are
    glyphs. An opened project lists its six largest items and folds the rest, and
    the risk column keeps kinds and folders lined up.

    Every key hint in the footer can be clicked. On a wide terminal the projects
    view shows the cursor's project beside the list: where it lives, its branch,
    when it was last worked on, and per kind of artifact what it weighs and what
    brings it back (a cache refills itself, bun install, cargo build). The
    confirm shows the disk before and after removal, and a clean removal is
    answered with what came back. The full view trades its boxes for quiet rules.

    c now reviews the queue in both views, since many terminals and tmux send
    Ctrl+Enter as a plain Enter; it still always opens the confirm first. With an
    open dialog, the calm view's footer names that dialog's keys.

  • c1c2604: Filter by picking, not just typing: press f or click Filter to toggle risk,
    kind, size, last-touched and queue facets, each with its own count and size.
    The filter bar now shows the query with how many artifacts and bytes it
    matches, folders with a single artifact take one row, and colour is reserved
    for meaning (orange only for caution, chartreuse only for what is queued).

  • 30f1fce: The terminal UI can switch folders without restarting: Ctrl+O fuzzy-finds the
    folder above, folders you cleaned before, and projects inside and beside the
    current one, or takes a typed path. Each switch runs the same guardrails and
    .sweeprc lookup as sweep ui <path>, and refusals are shown in place.
    Backspace steps the folder tree up one level, ncdu-style.

  • 73b0bfb: The terminal UI reads project activity: the Age column is now Idle (when
    the owning project was last worked on, not when the artifact was rebuilt), the
    filter's age facets become "Project idle", and the action menu offers "Queue
    safe items in projects idle 30+ days" with its count and size. The folder
    switcher fits narrow terminals and no longer offers protected folders such as
    home. Counts are digit-grouped everywhere.

  • 2fe439d: The terminal UI shows last scan's sizes as soon as each folder is found
    (marked ~), then replaces them with fresh measurements. Sizes come from
    size-cache.json in the configuration directory, are only reused for the same
    folder identity, and are never used by the CLI or by any removal.

  • b39b06b: Triage by age, in the TUI and in the plan format.

    • Scan results now carry modifiedMs, the artifact's own last-modified time (optional in the plan schema, produced by both the JS and Rust engines). The list shows an Age column and a size bar, o cycles size, name and age (stalest first), and the cursor row says how long ago it changed. Anything touched in the last week is tinted as probably in use.
    • The scope sidebar gains a risk breakdown and an "untouched 30d+" total, and its meter now reads "queued of found".
    • Filter operators in /: kind:target, risk:caution, path:crate, >100MB, <1GB, older:30d, newer:7d, is:queued, is:symlink, and ! to negate. Bare words still match as substrings, and every term must match.
    • New keys: v queues a range of rows (never dangerous or blocked ones), y copies the row's path (OSC 52), S saves the queue as a plan file for sweep apply --plan, and t in the confirm dialog switches between deleting and moving to trash.
    • Partly queued groups read "1 of 3 queued". Caution is now amber instead of an olive that was hard to tell from safe, dim text meets 4.5:1 contrast in both themes, the help screen wraps instead of clipping, and the panes no longer waste a row or a column.
  • c90dddc: Live engine switching, scan timing, and streaming progress:

    • E inside sweep ui swaps the scan engine (js ↔ rust) and rescans the same
      tree. The completion notice compares timings once both engines have run
      (rust 273ms vs js 311ms (1.1× faster)); the header chip keeps the active
      engine's last duration. E is global but never fires while a text field owns
      the keyboard, and switching to Rust fails cleanly when no binary resolves.
    • Scan duration is surfaced end to end: the scanning strip shows a live 4Hz
      elapsed readout, scan_completed carries elapsedMs, and non-interactive
      scan headers print the time alongside the engine.
    • scan_progress events now carry currentDir - the TUI shows the folder
      being walked instead of only counts, in both the empty-state panel and the
      scanning strip.
    • Rust scan fast path: with no onEntry/onEntrySized/onProgress hooks the
      engine writes one plan JSON instead of streaming per-candidate NDJSON, and
      du size batches now run with bounded parallelism (matching the JS
      DU_MAX_INFLIGHT) instead of serially - ~860ms → ~270ms on a 13k-dir tree.
    • New bun run bench engine A/B harness: interleaved warm runs, median/min/
      max, and a candidate-path-set hash for parity.
    • Scrollbar drag now follows OpenTUI's SliderRenderable semantics: thumb grabs
      preserve the grab offset, thumb travel maps over height - thumbHeight
      (previously the last rows were unreachable by drag), track presses seek then
      continue as drags, and press preventDefault stops a scrub from starting a
      text selection.
  • bfdcd96: Make deletion byte ceilings opt-in: the default is now null, existing numeric
    caps remain enforced, zero remains a zero-byte cap, and --max-size-gb accepts a
    per-run GiB ceiling or none. Dry-run previews no longer require destructive
    permission flags. Path, identity, mount and resource guards remain enforced.

    Fix final JSON delivery on slow consumers and late broken-pipe failure reporting,
    route deletion progress to stderr, and add retry guidance to JSON errors. Reject
    unknown native plan/options fields, unsafe protocol integers and untrusted config
    shapes. Freeze native deduplication keys and preserve valid deletion receipt owners.

    Use binary size units, clarify cancellation feedback, improve reader diagnostics
    and allow installed-engine fallback after extraction errors. Update fast-uri,
    crossbeam-epoch and anyhow within their compatible ranges for security advisories.

  • d69f485: Rework the pattern catalog around a strict trust boundary and add a real pattern editor to the TUI:

    • Defaults now ship only machine-created, ecosystem-canonical names (node_modules, .next, .nuxt, .svelte-kit, .turbo, .vite, .parcel-cache, .nyc_output, target, *.tsbuildinfo). Generic names that can hold authored files — dist, build, out, coverage, .venv, __pycache__, Pods, .gradle, .dart_tool, cmake-build-*, and more — are still curated in the catalog but ship opt-in. The same catalog is mirrored in the Rust engine's default_patterns().
    • Opt-in and custom matches now land in the dangerous risk tier on both engines: enabling a pattern consents to scanning for it, never to selecting it — they are never pre-selected and never enter bulk selection. Candidate reasons distinguish default-pattern, opt-in-pattern, and custom-pattern.
    • The p pane is a grouped, searchable, windowed pattern editor: / filters the catalog, a adds a custom pattern (validated by the same rules config files use), d removes custo...
Read more