{"id":19732208,"url":"https://github.com/ytetsuro/sabik","last_synced_at":"2025-07-30T18:07:16.307Z","repository":{"id":37019876,"uuid":"312570930","full_name":"ytetsuro/sabik","owner":"ytetsuro","description":"Visualize source code complexity with Sabik. This tool is to find the bad smell code. I think your helpful refactoring.","archived":false,"fork":false,"pushed_at":"2025-06-14T10:58:13.000Z","size":3354,"stargazers_count":44,"open_issues_count":16,"forks_count":4,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-07-19T18:50:46.264Z","etag":null,"topics":["analytics","cli-tool","cognitive-complexity","complexity","difficulty","hack","hacktoberfest","halstead-complexity-measures","halstead-metrics","javascript","maintainability","metrics","php","report","typescript","visualizer"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ytetsuro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-11-13T12:34:35.000Z","updated_at":"2025-07-08T10:01:36.000Z","dependencies_parsed_at":"2024-11-12T00:27:35.659Z","dependency_job_id":"9557fd0a-3a8d-400f-80d6-4f0f1bd02d01","html_url":"https://github.com/ytetsuro/sabik","commit_stats":{"total_commits":474,"total_committers":5,"mean_commits":94.8,"dds":0.510548523206751,"last_synced_commit":"3890c18694ea1d3655aca90d905e4300c971c0d1"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/ytetsuro/sabik","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytetsuro%2Fsabik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytetsuro%2Fsabik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytetsuro%2Fsabik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytetsuro%2Fsabik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytetsuro","download_url":"https://codeload.github.com/ytetsuro/sabik/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytetsuro%2Fsabik/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267914116,"owners_count":24164653,"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-07-30T02:00:09.044Z","response_time":70,"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":["analytics","cli-tool","cognitive-complexity","complexity","difficulty","hack","hacktoberfest","halstead-complexity-measures","halstead-metrics","javascript","maintainability","metrics","php","report","typescript","visualizer"],"created_at":"2024-11-12T00:25:16.113Z","updated_at":"2025-07-30T18:07:16.286Z","avatar_url":"https://github.com/ytetsuro.png","language":"TypeScript","readme":"![Sabik](https://sabik.botch.me/images/sabik-visual.png)\n===\n\nThis project is under development.\n\nPlease feel free to PullRequest and Issue.\n\n---\n\n![ci-build](https://github.com/ytetsuro/sabik/workflows/ci-build/badge.svg)\n[![Known Vulnerabilities](https://snyk.io/test/github/ytetsuro/sabik/badge.svg)](https://snyk.io/test/github/ytetsuro/sabik)\n![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ytetsuro/32248b8c823155bb09711c7a5b960d3d/raw/sabik_coverage_heads_master.json)\n![LogicalLineOfCode(Average per method)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ytetsuro/32248b8c823155bb09711c7a5b960d3d/raw/sabik_line_of_code_heads_master.json)\n![CognitiveComplexity(Max)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ytetsuro/32248b8c823155bb09711c7a5b960d3d/raw/sabik_cognitive_complexity_heads_master.json)\n![Maintainability(Min)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ytetsuro/32248b8c823155bb09711c7a5b960d3d/raw/sabik_maintainability_heads_master.json)\n\nVisualize source code complexity with Sabik.\nThis tool is to find the bad smell code.\nI think your helpful refactoring.\n\nIf you want to see what it looks like, click [here](http://sabik.botch.me/example/).\n\n\u003c!-- toc --\u003e\n* [Basic Using](#basic-using)\n* [Support Programming Language](#support-programming-language)\n* [What analyzable metrics?](#what-analyzable-metrics)\n* [License](#license)\n\u003c!-- tocstop --\u003e\n\n\n# Basic Using\n\nPlease use Node.js \u003e= 14.\n\nIf you use Node.js 14 or less, please use version 0.2.0.\n\n```sh-session\n$ npx sabik /target/path\n```\n\n## Local installation\n\nIf you felt sabik is slow, using local installation.\n\n```sh-session\n$ npm i -g sabik\n```\n\n### Using sabik with local installed\n\n```sh-session\n$ sabik /target/path\n```\n\n## Help\n\n```sh-session\nUSAGE\n  $ sabik [TARGET]\n\nOPTIONS\n  -h, --help                               show CLI help\n\n  -o, --outputReportPath=outputReportPath  output report path.\n                                                 For HTML, specify the directory, and for JSON, specify the file.\n\n  -t, --outputFormat=(HTML|JSON)           [default: HTML] output report format. HTML or JSON. default: HTML\n\n  -v, --version                            show CLI version\n\n  --excludes=excludes                      [default: $^] exclude patterns. example: .test.ts$ .spec.ts$\n\n  --matches=matches                        [default: .*] match patterns. example: .ts$\n```\n\n# Support Programming Language\n\n* TypeScript\n* JavaScript\n* PHP\n\nFor now.\n\n# What analyzable metrics?\n\nSabik analyzable metrics are following.\n\n* Cyclomatic Complexity\n* Cognitive Complexity\n* Halstead complexity measures\n* Line of Code(Logical, Physical)\n* Maintainability\n\nFor now.\n\n## Cyclomatic Complexity\n\nCyclomatic Complexity is metrics for linearly independent paths count.\nMade Thomas McCabe.\nHigh is bad, low is good metrics.\nHigher when your code has a deep nest.\nIt’s very tiresome add test when over 8 scores. (In my experience)\n\nIf you want to know more about the detail, please see the following.\n\n[CyclomaticComplexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity)\n\n\n## Cognitive Complexity\n\nCognitive Complexity is metrics for human readability.\nMade SonarSource inc.\nHigh is bad, low is good metrics.\nHigher when your code has a deep nest.\nIt’s read very hard when over 8 scores. (In my experience)\n\nIf you want to know more about the detail, please see the following.\n\n[CognitiveComplexity](https://www.sonarsource.com/docs/CognitiveComplexity.pdf)\n\n## Halstead complexity measures\n\nHalstead complexity measures are metrics for a difficulty to understand.\nMade Maurice Howard Halstead.\nHigh is bad, low is good metrics.\nHigher when your code has many responsibilities.\nThese metrics are judge difficulty from vocabulary size, for example, the newspaper is difficult but, children's book is easy to understand.\n\nIf you want to know more about the detail, please see the following.\n\n[Halstead complexity measures](http://www.virtualmachinery.com/sidebar2.htm)\n\n## Line of Code(Logical, Physical)\n\nPhysical Line of Code is metrics for line count include comments.\nLogical Line of Code is metrics for line count ignored comments.\nHigh is bad, low is good metrics.\n\n## Maintainability\n\nMaintainability is metric for software maintainability.\nMade Microsoft inc.\nLow is bad, High is good metrics.\nThis metric ranges from 0 ~ 100.\nIt’s maintenance hard when under 60 scores. (In my experience)\n\nIf you want to know more about the detail, please see the following.\n\n[Maintainability](https://docs.microsoft.com/en-us/visualstudio/code-quality/code-metrics-maintainability-index-range-and-meaning?view=vs-2019)\n\n# License\n\nCopyright (c) 2020 Tetsuro Yoshikawa Licensed under the MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytetsuro%2Fsabik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytetsuro%2Fsabik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytetsuro%2Fsabik/lists"}