{"id":16096042,"url":"https://github.com/frenchbread/kloc","last_synced_at":"2026-05-10T19:29:27.820Z","repository":{"id":143882593,"uuid":"351740658","full_name":"frenchbread/kloc","owner":"frenchbread","description":"Count lines of code (KLOC) in a project.","archived":false,"fork":false,"pushed_at":"2021-03-26T11:45:51.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T14:48:40.880Z","etag":null,"topics":["kloc","nodejs","npm","software","software-engineering"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/frenchbread.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":"2021-03-26T10:15:52.000Z","updated_at":"2022-09-17T11:44:33.000Z","dependencies_parsed_at":"2024-02-06T09:01:33.949Z","dependency_job_id":null,"html_url":"https://github.com/frenchbread/kloc","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"ab052c213b83f90d5c5e50238d79ab7c28f41d20"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frenchbread%2Fkloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frenchbread%2Fkloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frenchbread%2Fkloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frenchbread%2Fkloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frenchbread","download_url":"https://codeload.github.com/frenchbread/kloc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247396273,"owners_count":20932294,"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":["kloc","nodejs","npm","software","software-engineering"],"created_at":"2024-10-09T17:10:17.197Z","updated_at":"2026-05-10T19:29:27.730Z","avatar_url":"https://github.com/frenchbread.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"KLOC\n==\n\n\u003e Get [kloc](https://www.webopedia.com/definitions/kloc/) for a software program.\n\n## install\n\n```bash\n# globally\n\n❯ yarn global add kloc\n\n# or in project\n\n❯ yarn add kloc\n```\n\n## usage\n\n### `cli`\n\n```bash\n❯ kloc ~/code/my-app\n\nKLOC: 41.912\n\n❯ kloc --exclude node_modules,.git\n\nKLOC: 0.632\n```\n\n### `nodejs`\n\n```js\nconst get_kloc = require('kloc')\n\nget_kloc('.', { exclude: 'node_modules,.git', show_logs: true })\n    .then(kloc =\u003e console.log(`\\nKLOC: ${kloc}`))\n    .catch(err =\u003e console.error(err.message))\n\n// output:\n//\n// Got 9 files!\n//\n// - src/fs.js - [31] lines.\n// - src/index.js - [31] lines.\n// - LICENSE - [22] lines.\n// - README.md - [63] lines.\n// - cli.js - [40] lines.\n// - index.js - [2] lines.\n// - package.json - [16] lines.\n// - test.js - [6] lines.\n// - yarn.lock - [441] lines.\n//\n// KLOC: 0.652\n\n```\n\n## api\n\n### kloc(path, options?)\n\nReturns a `number`.\n\n#### options\n\ntype: `object`\n\n- **exclude**\n\n  type: `string`\n\n  List of files \u0026 dirs to be excluded, separated by `,` (no spaces). Deep folder/file reference works too (e.g. `app/node_modules`).\n\n- **show_logs**\n\n  type: `boolean`\n  |\n  default: `false`\n\n  If `true`, lists each file that affected the total count.\n\n## license\n\n[MIT](https://github.com/frenchbread/kloc/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrenchbread%2Fkloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrenchbread%2Fkloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrenchbread%2Fkloc/lists"}