{"id":29933922,"url":"https://github.com/a-kenji/sizelint","last_synced_at":"2026-02-16T19:17:24.204Z","repository":{"id":305707630,"uuid":"1021089931","full_name":"a-kenji/sizelint","owner":"a-kenji","description":"  Lint your file tree based on file sizes ","archived":false,"fork":false,"pushed_at":"2025-08-01T15:16:36.000Z","size":96,"stargazers_count":11,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T19:34:26.231Z","etag":null,"topics":["ci-cd","cli","code-quality","developer-tools","file-size","formatter","linter","pre-commit"],"latest_commit_sha":null,"homepage":"","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/a-kenji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2025-07-16T21:39:17.000Z","updated_at":"2025-08-02T17:56:32.000Z","dependencies_parsed_at":"2025-07-21T16:44:41.741Z","dependency_job_id":null,"html_url":"https://github.com/a-kenji/sizelint","commit_stats":null,"previous_names":["a-kenji/sizelint"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/a-kenji/sizelint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fsizelint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fsizelint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fsizelint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fsizelint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-kenji","download_url":"https://codeload.github.com/a-kenji/sizelint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kenji%2Fsizelint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268660504,"owners_count":24286035,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["ci-cd","cli","code-quality","developer-tools","file-size","formatter","linter","pre-commit"],"created_at":"2025-08-02T19:02:22.739Z","updated_at":"2026-02-16T19:17:24.196Z","avatar_url":"https://github.com/a-kenji.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# `$ sizelint` - lint your working tree based on file sizes\n\n[![Built with Nix](https://img.shields.io/static/v1?label=built%20with\u0026message=nix\u0026color=5277C3\u0026logo=nixos\u0026style=flat-square\u0026logoColor=ffffff)](https://builtwithnix.org)\n[![Crates](https://img.shields.io/crates/v/sizelint?style=flat-square)](https://crates.io/crates/sizelint)\n\n`sizelint` is a fast, configurable file size linter that helps prevent large files from entering your Git repository.\nIt can be used as a standalone tool, pre-commit hook, or as part of your CI/CD pipeline.\n\n## Overview\n\n\u003c!--toc:start--\u003e\n- [`$ sizelint` - lint your working tree based on file sizes](#sizelint-lint-your-working-tree-based-on-file-sizes)\n  - [`$ sizelint` - usage](#-sizelint---usage)\n    - [`$ sizelint check`](#-sizelint-check)\n    - [`$ sizelint rules`](#-sizelint-rules)\n    - [`$ sizelint init`](#-sizelint-init)\n  - [Configuration](#configuration)\n  - [Documentation](#documentation)\n  - [Development](#development)\n  - [License](#license)\n\u003c!--toc:end--\u003e\n\n\n## `$ sizelint` - usage\n\n\u003c!-- `$ nix run . help` --\u003e\n\n```\nLint your working tree based on file size\n\nUsage: sizelint [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  check        Check files for size violations\n  init         Initialize sizelint configuration\n  rules        Rule management\n  completions  Generate shell completions\n  help         Print this message or the help of the given subcommand(s)\n\nOptions:\n  -c, --config \u003cFILE\u003e\n          Configuration file path\n\n  -v, --verbose\n          Verbose output\n\n      --log-level \u003cLOG_LEVEL\u003e\n          Log level\n\n          Possible values:\n          - trace: Trace level logging\n          - debug: Debug level logging\n          - info:  Info level logging\n          - warn:  Warning level logging\n          - error: Error level logging\n          \n          [default: info]\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -V, --version\n          Print version\n```\n\n## `$ sizelint check`\n\n\u003c!-- `$ nix run . help check` --\u003e\n\n```\nCheck files for size violations\n\nUsage: sizelint check [OPTIONS] [PATHS]...\n\nArguments:\n  [PATHS]...\n          Paths to check\n\nOptions:\n  -c, --config \u003cFILE\u003e\n          Configuration file path\n\n  -f, --format \u003cFORMAT\u003e\n          Output format\n\n          Possible values:\n          - human: Human-readable output\n          - json:  JSON output\n          \n          [default: human]\n\n      --staged\n          Check only staged files (git diff --staged)\n\n      --working-tree\n          Check working tree files\n\n      --git \u003cRANGE\u003e\n          Check files changed in a git revision range (e.g. \"main\", \"main..HEAD\", \"main...feature\")\n\n      --no-history\n          Skip git history scanning for deleted blobs (only check files at HEAD)\n\n  -q, --quiet\n          Quiet mode (only show violations)\n\n      --fail-on-warn\n          Treat warnings as errors\n\n  -h, --help\n          Print help (see a summary with '-h')\n```\n\n## `$ sizelint rules`\n\n\u003c!-- `$ nix run . help rules` --\u003e\n\n```\nRule management\n\nUsage: sizelint rules \u003cCOMMAND\u003e\n\nCommands:\n  list      List available rules\n  describe  Show rule documentation\n  help      Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help  Print help\n```\n\n## `$ sizelint init`\n\n\u003c!-- `$ nix run . help init` --\u003e\n\n```\nInitialize sizelint configuration\n\nUsage: sizelint init [OPTIONS]\n\nOptions:\n  -f, --force   Force overwrite existing configuration\n      --stdout  Print the default configuration to stdout\n      --edit    Open configuration file in editor after creation\n  -h, --help    Print help\n```\n\n\n## Quick Start\n\n### Installation\n\n```bash\ncargo install sizelint --locked\n```\n\n### Basic Usage\n\n```bash\n# Initialize configuration\nsizelint init\n\n# Check all files\nsizelint check\n\n# Check specific files\nsizelint check src/main.rs README.md\n```\n\n## Configuration\n\n`sizelint` uses TOML configuration files.\n\nRun `sizelint init` to create a default configuration:\n\u003c!-- `$ nix run . -- init --stdout` --\u003e\n\n```\nmax_file_size = \"10MB\"\nwarn_file_size = \"5MB\"\nexcludes = []\ncheck_staged = false\ncheck_working_tree = false\nrespect_gitignore = true\nfail_on_warn = false\n\n[rules.medium_files]\nenabled = true\ndescription = \"Base rule that fits many normal repos\"\npriority = 50\nmax_size = \"5MB\"\nwarn_size = \"2MB\"\nincludes = []\nexcludes = []\n\n[rules.no_images]\nenabled = false\ndescription = \"Warn about image files that might be better handled with LFS\"\npriority = 80\nincludes = [\"*.png\", \"*.jpg\", \"*.jpeg\", \"*.gif\", \"*.bmp\"]\nexcludes = []\nwarn_on_match = true\n\n```\n\n## Documentation\n\n- [Manual Page](docs/sizelint.1.scd) - Reference in scdoc format\n\n## Development\n\n### Development Shell\n\n```bash\nnix develop\n```\n\n### Building\n\n```bash\ncargo build --release\n```\n\n### Testing\n\n```bash\ncargo test\ncargo clippy\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-kenji%2Fsizelint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-kenji%2Fsizelint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-kenji%2Fsizelint/lists"}