{"id":36236383,"url":"https://github.com/yashb404/bin-expire","last_synced_at":"2026-01-11T06:00:43.678Z","repository":{"id":331262823,"uuid":"1125949186","full_name":"Yashb404/bin-expire","owner":"Yashb404","description":"bin-expire is a CLI tool that helps you find stale binaries in common bin folders and safely archive/restore them. ","archived":false,"fork":false,"pushed_at":"2026-01-01T20:58:04.000Z","size":105,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-05T04:18:26.212Z","etag":null,"topics":["cleanup-tool","cli","optimization","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bin-expire","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yashb404.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T17:54:38.000Z","updated_at":"2026-01-03T17:39:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Yashb404/bin-expire","commit_stats":null,"previous_names":["yashb404/bin-expire"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Yashb404/bin-expire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yashb404%2Fbin-expire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yashb404%2Fbin-expire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yashb404%2Fbin-expire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yashb404%2Fbin-expire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yashb404","download_url":"https://codeload.github.com/Yashb404/bin-expire/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yashb404%2Fbin-expire/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28293188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleanup-tool","cli","optimization","rust"],"created_at":"2026-01-11T06:00:25.097Z","updated_at":"2026-01-11T06:00:43.663Z","avatar_url":"https://github.com/Yashb404.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bin-expire\n![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg) \n![Language: Rust](https://img.shields.io/badge/Language-Rust-orange) \n![Platform: Linux | macOS | Windows](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey)\n\nbin-expire scans common \"bin\" folders, identifies stale binaries, and can archive/restore them safely.\n\nBy default it scans:\n\n- `~/.cargo/bin`\n- `~/go/bin`\n\nIt also detects Windows “App Execution Alias stubs” (0-byte `.exe` placeholder files) and treats them specially so you don’t accidentally archive them.\n\n## Install\n### Option A: Install as a cargo crate\n1. Install Rust (from rustup)\n2. Run\n   \n   ```\n   cargo install bin-expire\n   ```\n\n### Option B: Download from GitHub Releases\n\n1. Download the asset for your OS from the GitHub Releases page.\n2. Put the binary in a permanent folder (example):\n\n  - Windows: `C:\\Users\\\u003cyou\u003e\\AppData\\Local\\rust-apps\\bin-expire.exe`\n\n3. Add that folder (not the `.exe`) to your `PATH`.\n4. Verify:\n\n```bat\nwhere bin-expire\nbin-expire --help\n```\n\n### Option C: Build from source\n\nBuild an optimized binary:\n\n```bash\ncargo build --release\n```\n\nRun it:\n\n```bash\n./target/release/bin-expire scan --days 30\n```\n\nOr install it into your Cargo bin directory:\n\n```bash\ncargo install --path .\n```\n\n## Quick start\n\n```bash\n# Scan default locations (~/.cargo/bin and ~/go/bin)\nbin-expire scan\n\n# Scan a specific directory\nbin-expire scan -p ~/.cargo/bin --days 30\n\n# Archive stale binaries (moves them into your configured archive_path)\nbin-expire archive --days 30\n\n# Restore a previously archived binary by name\nbin-expire restore old_tool.exe\n```\n\n## Commands\n\n### scan\n\n- Default output shows only:\n \\- STALE rows (`✗`)\n  - stub rows (`·`) (Windows App Execution Alias stubs)\n- `--verbose` also shows OK rows (`✓`) and adds:\n  - `PATH` column\n  - `SRC` column indicating where `last_used` came from: `A`=atime, `M`=mtime, `?`=unknown\n\nUseful filters:\n\n- `--only-stale` (hides OK + stubs)\n- `--hide-ok` (mainly useful with `--verbose`)\n- `--hide-stub` (hides stub rows)\n\n### archive\n\nMoves stale binaries into `archive_path` and records each move in a manifest so it can be restored later.\n\nNotes:\n\n- App Execution Alias stubs (0-byte `.exe`) are never archived.\n- Archiving avoids overwriting by choosing a non-colliding filename in the archive directory.\n- If a direct rename/move fails, it falls back to copy + remove.\n\n### restore\n\nRestores the most recent archived entry for the given name (from the manifest).\n\nSafety behavior:\n\n- Fails if the archived file is missing.\n- Fails if the destination already exists (it will not overwrite your existing file).\n\n## Configuration\n\nOn first run, bin-expire creates a config file under your platform config directory:\n\n- Windows: `%APPDATA%\\bin-expire\\config.toml`\n- Linux: `~/.config/bin-expire/config.toml`\n- macOS: `~/Library/Application Support/bin-expire/config.toml`\n\nYou can override the config root with an environment variable:\n\n- `BIN_EXPIRE_CONFIG_DIR=/some/path`\n\nWhen set, bin-expire reads/writes:\n\n- `BIN_EXPIRE_CONFIG_DIR/bin-expire/config.toml`\n- `BIN_EXPIRE_CONFIG_DIR/bin-expire/archive.json`\n\nExample `config.toml`:\n\n```toml\nignored_bins = [\"cargo\", \"rustc\"]\ndefault_threshold_days = 90\narchive_path = \"C:/Users/me/.bin-expire/archive\"\nwindows_use_access_time = true\n```\n\nConfig keys:\n\n- `ignored_bins`: file names to ignore during scan/archive\n- `default_threshold_days`: used when `--days` is not provided\n- `archive_path`: where archived binaries are moved\n- `windows_use_access_time`: Windows-only preference for selecting `last_used`\n\n## Windows note (atime)\n\nOn Windows, access times (atime) are best-effort and can be disabled, delayed, or updated by scanning/listing.\n\n- If results look suspicious, set `windows_use_access_time=false` to use modified time (mtime).\n- bin-expire may also detect atime “contamination” during a scan and fall back to mtime.\n\n## Development\n\n```bash\ncargo fmt --all\ncargo clippy --all-targets -- -D warnings\ncargo test\ncargo test --release --all-targets\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashb404%2Fbin-expire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashb404%2Fbin-expire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashb404%2Fbin-expire/lists"}