{"id":25752133,"url":"https://github.com/shresht7/tali","last_synced_at":"2025-10-12T07:38:18.643Z","repository":{"id":278518144,"uuid":"933207976","full_name":"Shresht7/tali","owner":"Shresht7","description":"Count the number of lines, words, characters and bytes in a given set of files","archived":false,"fork":false,"pushed_at":"2025-03-19T21:20:24.000Z","size":137,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T21:37:05.220Z","etag":null,"topics":[],"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/Shresht7.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}},"created_at":"2025-02-15T12:16:35.000Z","updated_at":"2025-03-19T21:20:27.000Z","dependencies_parsed_at":"2025-02-20T08:24:06.313Z","dependency_job_id":"25251821-8abb-437e-b4dc-a4acaf0afa43","html_url":"https://github.com/Shresht7/tali","commit_stats":null,"previous_names":["shresht7/tali"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Shresht7/tali","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Ftali","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Ftali/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Ftali/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Ftali/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/tali/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Ftali/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010666,"owners_count":26084784,"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-10-12T02:00:06.719Z","response_time":53,"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":"2025-02-26T14:26:58.781Z","updated_at":"2025-10-12T07:38:18.636Z","avatar_url":"https://github.com/Shresht7.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `tali`\n\nA command-line application to count the number of lines, words, characters and bytes in a given set of files.\n\n![screenshot](./docs/screenshot-group.png)\n\n## 🌟 Features\n\n- **Scanning**: Scan a set of files (or directories) for the number of lines, words, characters and bytes.\n- **Language Detection**: Determines the languages used (based on the file extension)\n- **Configurable Output**: Choose from multiple output formats (Table, CSV, TSV, JSON)\n- **Colorized**: Defaults to a colorized output when printing to the console.\n- **Visualization**: Displays a graphical measure of each file's size relative to the largest file.\n- **Group by Language**: Aggregate and group the results by language\n\n---\n\n## 📦 Installation\n\n## 📘 Usage\n\nRun `tali` by specifying one or more files or directories to scan:\n\n```sh\ntali path/to/directory\n```\n\nBy default, `tali` outputs the results in a tabular format with colors.\n\n![screenshot](./docs/screenshot.png)\n\nThe output can be configured using the various command-line arguments.\n\n### Options\n\n- `-l, --lines`: Shows the line count\n- `-w, --words`: Show the word count\n- `-c, --chars`: Shows the character count\n- `-b, --bytes`: Show the byte count\n- `-e, --language`: Show the corresponding language\n- `-v, --graph`: Show a graphical visualization\n- `-f, --format`: Configures the output format (`\"table\"`, `\"json\"`, `\"plain\"`)\n- `--sort-by [metric]`: Sorts the output by the specified metric (`lines`, `words`, `chars` or `bytes`)\n- `--sort-order [order]`: Sorts in `ascending` or `descending` order\n- `--graph-by [metric]`: Uses the specified metric for the graphical visualization (`lines`, `words`, `chars`, or `bytes`)\n\nUse `--help` to get the full help for more details.\n\n### Examples\n\n#### Scan the current directory\n\n```sh\ntali\n```\n\n#### Scan a specific directory\n\n```sh\ntali src\n```\n\n#### Count lines in a file\n\n```sh\ntali README.md --lines\n```\n\n#### Scan a directory and group results by languages\n\n```sh\ntali projects --group\n```\n\n#### Show language, lines, and characters in JSON format\n\n```sh\ntali src --language --lines --chars --format json\n```\n\n#### Scan multiple files and output as plain text\n\n```sh\ntali README.md .gitignore src --lines --format plain\n```\n\n#### Exclude specific files\n\n```sh\ntali src --exclude \"*.md,*.toml\"\n```\n\n---\n\n## ⚽ Goals\n\n- Learn Rust\n- Build Stuff\n\n## 🖥️ Development\n\n### Project Structure\n\nThe cli logic resides in [`main.rs`](./src/main.rs) and the definitions for the command-line arguments are in the [`cli.rs`](./src/cli.rs) file.\n\nThe library [`src/lib`](./src/lib/) contains three modules:\n- [`scanner`](./src/lib/scanner/): Responsible for walking the file-system and scanning the file metrics\n- [`output`](./src/lib/output/): Responsible for formatting and displaying the scan results.\n- [`helpers`](./src/lib/helpers/): An amalgamation of helpers and utilities used throughout the project.\n\n### 📕 References\n\n- https://github.com/XAMPPRocky/tokei\n- https://boyter.org/posts/sloc-cloc-code/\n- https://github.com/cgag/loc\n- https://github.com/boyter/scc\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT LICENSE](./LICENSE). See the [LICENSE](./LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Ftali","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Ftali","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Ftali/lists"}