{"id":50343862,"url":"https://github.com/backrunner/rucycle","last_synced_at":"2026-05-29T19:00:42.035Z","repository":{"id":361224226,"uuid":"1248191844","full_name":"backrunner/rucycle","owner":"backrunner","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-29T17:31:09.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T18:21:47.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/backrunner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2026-05-24T10:05:45.000Z","updated_at":"2026-05-29T17:31:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/backrunner/rucycle","commit_stats":null,"previous_names":["backrunner/rucycle"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/backrunner/rucycle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Frucycle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Frucycle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Frucycle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Frucycle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backrunner","download_url":"https://codeload.github.com/backrunner/rucycle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Frucycle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33666290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-05-29T19:00:22.469Z","updated_at":"2026-05-29T19:00:42.023Z","avatar_url":"https://github.com/backrunner.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rucycle\n\n`rucycle` is a fast Rust CLI/TUI for finding Rust projects under a directory and cleaning their Cargo build artifacts in bulk. It is built for the common \"my workspace folder is full of old `target/` directories\" problem.\n\n## Features\n\n- Recursively scans a directory for valid Rust `Cargo.toml` manifests.\n- Shows each project in a terminal UI with:\n  - reclaimable `target/` size\n  - total project size\n  - latest modified time across the whole project folder\n- Selects every project by default.\n- Supports keyboard navigation, pagination, select all/none, and sorting.\n- Runs `cargo clean --manifest-path \u003cCargo.toml\u003e` for selected projects.\n- Reports and skips any project tree that already has an active `cargo` process.\n- Provides non-interactive modes for scripts and CI.\n- Ships as a native Rust binary, with npm wrapper support for `npx rucycle`.\n\n## Install\n\nUse it immediately with npm:\n\n```sh\nnpx rucycle\n```\n\nOr install globally:\n\n```sh\nnpm install -g rucycle\nrucycle\n```\n\nFrom source:\n\n```sh\ncargo install --path .\n```\n\n## Usage\n\nScan the current directory and open the TUI:\n\n```sh\nrucycle\n```\n\nScan another directory:\n\n```sh\nrucycle ~/Projects\n```\n\nPreview detected projects without opening the TUI:\n\n```sh\nrucycle ~/Projects --dry-run\n```\n\nClean every detected project without prompting:\n\n```sh\nrucycle ~/Projects --yes\n```\n\nStart with projects sorted by last modification time:\n\n```sh\nrucycle ~/Projects --sort modified\n```\n\n## TUI Controls\n\n| Key | Action |\n| --- | --- |\n| `Up` / `Down`, `j` / `k` | Move selection |\n| `PageUp` / `PageDown` | Change page |\n| `Home` / `End` | Jump to first or last project |\n| `Space` | Toggle current project |\n| `a` | Select all or none |\n| `s` | Toggle sorting by target size or modified time |\n| `c` | Clean selected projects |\n| `q`, `Esc` | Quit |\n\n## How Scanning Works\n\n`rucycle` looks for files named `Cargo.toml`, parses them as TOML, and treats manifests with a `[package]` or `[workspace]` table as Rust projects. It skips expensive discovery inside `target/`, `node_modules/`, and VCS directories, then computes project sizes in parallel.\n\nThe \"modified\" sort key is the newest modification time of any file under the project folder. The \"target\" size is the size of files under that project's `target/` directory.\n\n## npm Distribution\n\nThe `rucycle` npm package is a small JavaScript launcher. During npm install, it downloads the matching native binary from the GitHub Release for the package version and stores it in `npm/bin/`.\n\nRelease channels are represented by npm dist-tags and semver prerelease versions:\n\n- `npx rucycle` or `npx rucycle@latest` installs the stable package and downloads assets from `v\u003cversion\u003e`.\n- `npx rucycle@beta` installs the package published with the `beta` dist-tag, such as `0.1.0-beta.1`, and downloads assets from `v0.1.0-beta.1`.\n- `npx rucycle@alpha` installs the package published with the `alpha` dist-tag, such as `0.1.0-alpha.1`, and downloads assets from `v0.1.0-alpha.1`.\n\nSupported release assets:\n\n- `rucycle-darwin-arm64`\n- `rucycle-darwin-x64`\n- `rucycle-linux-arm64`\n- `rucycle-linux-x64`\n- `rucycle-win32-x64.exe`\n\nOn macOS and Linux, the installer sets executable permissions on the downloaded binary so `npx rucycle` can run it directly.\n\n## Development\n\n```sh\ncargo fmt --check\ncargo clippy --all-targets -- -D warnings\ncargo test\ncargo build --release\nnpm run test:installer\nnpm run test:install\nnpm test\n```\n\nDuring local development, the npm launcher falls back to `target/release/rucycle` and `target/debug/rucycle`, so `npm test` works after a Cargo build.\n\n`npm run test:install` copies a locally built binary into `npm/bin/` and verifies the same executable path used by `npx rucycle`.\n\n## Release\n\nGitHub Actions includes:\n\n- `CI`: formatting, clippy, tests, release build, local npm install smoke test, and npm launcher smoke test.\n- `Release`: builds native binaries for Linux, macOS, and Windows, uploads them to GitHub Releases, then publishes the npm package.\n\nTo publish, configure npm Trusted Publishing for this GitHub Actions workflow, then push a semver tag:\n\n```sh\ngit tag v0.1.0\ngit push origin v0.1.0\n```\n\nPrerelease tags are published to their matching npm dist-tag and marked as GitHub prereleases:\n\n```sh\ngit tag v0.1.0-beta.1\ngit push origin v0.1.0-beta.1\n```\n\nIf npm Trusted Publishing is not available, publish the npm package locally after the GitHub release assets exist:\n\n```sh\nnpm run publish:npm -- --channel beta --version 0.1.0-beta.1 --dry-run\nnpm run publish:npm -- --channel beta --version 0.1.0-beta.1\n```\n\nThe local publish script builds a temporary npm package with matching `rucycle.releaseChannel` and `rucycle.releaseTag` metadata, then publishes it with the corresponding npm dist-tag. Use `--channel alpha` for alpha releases and `--channel stable --version 0.1.0` for `latest`. Local publishing uses your npm login session or `NODE_AUTH_TOKEN`.\n\nNo long-lived `NPM_TOKEN` secret is needed for the CI Trusted Publishing path.\n\n## Safety Notes\n\n`rucycle` only invokes `cargo clean`; it does not remove arbitrary directories itself. Before cleaning each project, it checks for an active `cargo` process in the same project tree, reports that project as skipped if one is found, and continues with the rest. In interactive mode you can inspect and change the selected projects before any clean command runs. For non-interactive cleanup, use `--dry-run` first when scanning a large or unfamiliar directory.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackrunner%2Frucycle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackrunner%2Frucycle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackrunner%2Frucycle/lists"}