{"id":31689529,"url":"https://github.com/jm6271/loc","last_synced_at":"2026-02-01T23:06:40.477Z","repository":{"id":267547244,"uuid":"901597004","full_name":"jm6271/loc","owner":"jm6271","description":"A cli tool that counts the lines of code in a programming project","archived":false,"fork":false,"pushed_at":"2026-01-25T22:01:58.000Z","size":997,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-26T13:10:37.108Z","etag":null,"topics":["c","code-metrics","cpp","csharp","fsharp","lines-of-code","python","rust"],"latest_commit_sha":null,"homepage":"","language":"C++","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/jm6271.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2024-12-11T00:41:53.000Z","updated_at":"2026-01-25T22:02:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"584cecff-cfa2-4840-a5cf-9dd622aa0eaa","html_url":"https://github.com/jm6271/loc","commit_stats":null,"previous_names":["jm6271/loc"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jm6271/loc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jm6271%2Floc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jm6271%2Floc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jm6271%2Floc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jm6271%2Floc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jm6271","download_url":"https://codeload.github.com/jm6271/loc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jm6271%2Floc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["c","code-metrics","cpp","csharp","fsharp","lines-of-code","python","rust"],"created_at":"2025-10-08T11:49:16.908Z","updated_at":"2026-02-01T23:06:40.471Z","avatar_url":"https://github.com/jm6271.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loc\n\n```loc``` is a tool for counting the lines of code in a\nprogramming project. It is written in C++ and designed to be very fast.\n\n## Suported languages\n\n```loc``` supports the following languages:\n\n- C\n- C++\n- C#\n- F#\n- Go\n- Python\n- Rust\n\n## Installation\n\n1. Download the latest release binary for your platform from the GitHub Releases\n2. Extract the zip to a location on your path\n\n## Building from source\n\nRequires a C++ compiler, CMake, and ninja.\n\n### Windows:\n\n``` Powershell\n# Powershell\n\n# clone the repo\ngit clone https://github.com/jm6271/loc.git\ncd loc\n\n# setup vcpkg\ngit clone https://github.com/microsoft/vcpkg.git\ncd vcpkg\n./bootstrap-vcpkg.bat\ncd ..\n$env:VCPKG_ROOT = (Get-Location).Path + \"\\vcpkg\"\n$env:PATH = $env:VCPKG_ROOT + \";\" + $env:PATH\n\n# build loc\ncmake --preset=x64-release # replace preset with x86-release for 32-bit\ncd out/build/x64-release # or x86-release\nninja\n\n# release binary is located at out/build/x64-release/loc/loc.exe\n```\n\n### Linux:\n\n**Note:** You may need to use clang, gcc might not work.\n\n``` Bash\n# Bash\n\n# clone the repo\ngit clone https://github.com/jm6271/loc.git\ncd loc\n\n# setup vcpkg\ngit clone https://github.com/microsoft/vcpkg.git\ncd vcpkg\n./bootstrap-vcpkg.sh\ncd ..\nexport VCPKG_ROOT=$(pwd)/vcpkg\nexport PATH=${VCPKG_ROOT}:${PATH}\n\n# configure\ncmake --preset=linux-release . -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++\n\n# Build the project\ncd out/build/linux-release\nninja\n\n# Run the tests\ncd loc.tests\n./loc.tests\n\n# release binary is located at out/build/linux-release/loc/loc\n```\n\n## Usage\n\n```loc [options] [paths...]```\n\n### Options\n\n```-h [ --help ]``` - Display help\n\n```-j [ --jobs ]``` - Number of threads to use. Default is number of CPU cores available\n\n```-v [ --version ]``` - Display version\n\n```--include-hidden``` - Include hidden files and files in build directory (ignored by default)\n\n`-i,--ignore TEXT ...` Directories to ignore (relative to the provided directory to search)\n\n### Paths\n\nThe list of paths can be a list of paths to any files or directories. If any directories are specified,\nThe application will scan the directory and its subdirectories for any files with supported file extensions.\nIf any file paths are provided directly, the application will skip over them if the extension is not supported.\n\n### Example\n\nTo count the lines of code in the ```loc``` codebase from \nthe toplevel directory use this command:\n\n```\nloc .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjm6271%2Floc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjm6271%2Floc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjm6271%2Floc/lists"}