{"id":13524683,"url":"https://github.com/vmchale/tin-summer","last_synced_at":"2025-04-03T10:11:45.603Z","repository":{"id":43298200,"uuid":"92632737","full_name":"vmchale/tin-summer","owner":"vmchale","description":"Find build artifacts that are taking up disk space","archived":false,"fork":false,"pushed_at":"2023-05-02T22:00:49.000Z","size":652,"stargazers_count":343,"open_issues_count":27,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T09:12:15.652Z","etag":null,"topics":["clean","cleaner","command-line-tool","disk-space","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmchale.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}},"created_at":"2017-05-28T01:09:47.000Z","updated_at":"2025-03-21T19:33:16.000Z","dependencies_parsed_at":"2024-01-12T22:10:15.063Z","dependency_job_id":null,"html_url":"https://github.com/vmchale/tin-summer","commit_stats":{"total_commits":690,"total_committers":6,"mean_commits":115.0,"dds":0.5449275362318841,"last_synced_commit":"4ad8a7e197af9baddb87f69c5cc1b894039f4ecb"},"previous_names":["vmchale/file-sniffer"],"tags_count":149,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Ftin-summer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Ftin-summer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Ftin-summer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Ftin-summer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmchale","download_url":"https://codeload.github.com/vmchale/tin-summer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246981173,"owners_count":20863827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["clean","cleaner","command-line-tool","disk-space","rust"],"created_at":"2024-08-01T06:01:12.455Z","updated_at":"2025-04-03T10:11:45.104Z","avatar_url":"https://github.com/vmchale.png","language":"Rust","readme":"# The Tin Summer\n\n[![Windows build status](https://ci.appveyor.com/api/projects/status/github/vmchale/tin-summer?svg=true)](https://ci.appveyor.com/project/vmchale/tin-summer)\n[![Build Status](https://travis-ci.org/vmchale/tin-summer.svg?branch=master)](https://travis-ci.org/vmchale/tin-summer)\n[![](https://img.shields.io/crates/d/tin-summer.svg)](https://crates.io/crates/tin-summer)\n[![](https://tokei.rs/b1/github/vmchale/tin-summer?category=code)](https://github.com/Aaronepower/tokei)\n\nIf you do a significant amount of programming, you'll probably end up with\nbuild artifacts scattered about. `sn` is a tool to help you find those\nartifacts.\n\n`sn` is also a replacement for `du`. It has nicer\noutput, saner commands and defaults, and it even runs faster on big directories\nthanks to multithreading.\n\n## Installation\n\n### Script\n\nEnter the following in a command prompt:\n\n```\ncurl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git vmchale/tin-summer\n```\n\n### Binary install\n\nIf the script doesn't work for you, you can download a binary from the [releases\npage](https://github.com/vmchale/tin-summer/releases).\n\n### Cargo\n\nIf your platform doesn't have binaries, or you just want to build from source, get [cargo](https://rustup.rs/). Then:\n\n```bash\n $ cargo install tin-summer\n```\n\nMake sure you are on nightly; otherwise\n\n```bash\n $ rustup run nightly cargo install tin-summer\n```\n\n## Use\n\nTo list directory and file sizes for the current directory:\n\n```\n$ sn f\n```\n\nTo get a list of directory sizes concurrently, excluding version control: \n\n```\n $ sn p --exclude '\\.git|\\.pijul|_darcs|\\.hg'\n```\n\nTo get a sorted list of the 12 biggest directories in `$DIR`:\n\n```\n $ sn sort $DIR -n12\n```\n\nTo search current directory for directories with build artifacts:\n\n```bash\n $ sn ar\n```\n\nTo look for artifacts or directories containing artifacts that occupy more than 200MB of disk space:\n\n```bash\n $ sn ar -t200M\n```\n\n### Accessibility\n\nTo turn off colorized output:\n\n```bash\nexport CLICOLOR=0\n```\n\n### Comparison (or, 10 Things I Hate About du)\n\n#### Reasons to use `du`\n\n  * Reads disk usage, not just file sizes\n  * Optionally dereferences symlinks\n  * Slightly faster on small directories\n  * Stable and well-supported\n\n#### Reasons to use `sn`\n\n  * Faster on large directories\n  * Uses [regex](https://github.com/rust-lang/regex) for exclusions, making it\n    dramatically faster than `du` when used with the `--exclude` flag.\n  * Defaults to human-readable output\n  * Colorized output\n  * Nicer help via [clap](https://github.com/kbknapp/clap-rs)\n  * Provides sorted output\n  * Finds build artifacts\n  * Reads file sizes, not disk usage\n  * Extensible in Rust\n\n#### Benchmark results\n\n| Directory Size | Tool | Command | Time |\n| -------------- | ---- | ------- | ---- |\n| 600MB | sn | `sn p` | 60.74 ms |\n| 600MB | sn | `sn d` | 99.92 ms |\n| 600MB | du | `du -hacd2` | 88.28 ms |\n| 4GB | sn | `sn p`| 185.2 ms |\n| 4GB | sn | `sn d` | 271.9 ms |\n| 4GB | du | `du -hacd2` | 195.5 ms |\n| 700MB | sn | `sn p` | 91.05 ms |\n| 700MB | sn | `sn d` | 176.3 ms |\n| 700MB | du | `du -hacd2` | 153.8 ms |\n| 7MB | sn | `sn p` | 19.48 ms |\n| 7MB | sn | `sn d` | 12.72 ms |\n| 7MB | du | `du -hacd2` | 10.13 ms |\n\nThese commands are all essentially equivalent in function, except that `sn p`\nmay use more threads than `sn a` or `du`. Results were obtained using Gabriel Gonzalez's [bench](https://github.com/Gabriel439/bench)\ntool. You can see pretty criterion graphs\n[here](http://vmchale.com/bench/tin-summer.html) or\n[here](http://vmchale.com/bench/tin-summer-parallel.html).\n\nIn summary: yes, `sn` actually is faster on larger directories, but it is also\nslower on small ones. I'm hoping to make it faster in the future; the current\nnaïve concurrency model has obvious directions for improvement.\n\n#### Screenshots (alacritty + solarized dark)\n\n##### The Tin Summer\n\n![Displaying a user's timeline in a terminal.](https://raw.githubusercontent.com/vmchale/tin-summer/master/screenshots/oskar1.png)\n\n##### du\n\n![Displaying a user's timeline in a terminal.](https://raw.githubusercontent.com/vmchale/tin-summer/master/screenshots/du-screenshot.png)\n\n### Heuristic for build artifacts\n\nCurrently, `sn` looks for files that either have an extension associated with\nbuild artifacts, or executable files that are ignored by version control. It also looks for \"build\ndirectories\", like `.stack-work`, `elm-stuff`, etc. and if it finds a\nconfiguration file like `tweet-hs.cabal`, it considers *all* their\ncontents to be build artifacts.\n\n#### Languages Supported\n\nThe following is a list of languages `sn artifacts` has been tested with.\nThe *intent* is to support basically anything, so feel free to open a PR or start an issue.\n\n  - [x] Haskell (incl. GHCJS)\n  - [x] Rust\n  - [x] Julia\n  - [x] Python\n  - [x] Elm\n  - [x] Nim\n  - [x] Vimscript\n  - [x] TeX\n  - [x] Idris\n  - [x] FORTRAN\n  - [ ] Ruby\n  - [ ] C\n\n##### Autoclean\n\n`sn` can clean up your artifacts for you, but only for the above-indicated\nlanguages. It is still experimental, but it has been tested and should not\ndelete unwanted files (though it may not clean everything it should).\n","funding_links":[],"categories":["Command Line","Rust","Other"],"sub_categories":["Dependency Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmchale%2Ftin-summer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmchale%2Ftin-summer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmchale%2Ftin-summer/lists"}