{"id":28350972,"url":"https://github.com/svenslaggare/gitrends","last_synced_at":"2026-05-17T18:02:42.581Z","repository":{"id":287959863,"uuid":"957586204","full_name":"svenslaggare/gitrends","owner":"svenslaggare","description":"Web-based behavior code analysis tool.","archived":false,"fork":false,"pushed_at":"2025-04-18T20:08:03.000Z","size":1911,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T22:38:49.979Z","etag":null,"topics":["behavior-code-analysis","datafusion","git","sql","trends"],"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/svenslaggare.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-03-30T18:16:37.000Z","updated_at":"2025-04-18T20:08:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"8771f4c6-b539-4ca5-bdf9-ce6198598cec","html_url":"https://github.com/svenslaggare/gitrends","commit_stats":null,"previous_names":["svenslaggare/gitrends"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/svenslaggare/gitrends","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitrends","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitrends/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitrends/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitrends/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svenslaggare","download_url":"https://codeload.github.com/svenslaggare/gitrends/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenslaggare%2Fgitrends/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264958623,"owners_count":23689035,"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":["behavior-code-analysis","datafusion","git","sql","trends"],"created_at":"2025-05-27T22:08:49.679Z","updated_at":"2026-05-17T18:02:42.139Z","avatar_url":"https://github.com/svenslaggare.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Gitrends](frontend/static/images/Logo.png)\n\nWeb-based behavior code analysis tool based on the work by Adam Tornhill in \"Your Code as a Crime Scene\".\n\nThe following behavior code analysis are implemented:\n\n* Module decomposition - breakdown of amount of code by module.\n* Hotspots - which file/module is changed most often.\n* Change coupling - which file/module are changed together.\n* Sum of couplings - total change coupling per file/module.\n* Main developer - who has added most lines for file/module.\n* Commit spread - spread of commit authors per module.\n* Ability to write custom analysis in SQL.\n\n![Gitrends](Screenshot.png)\n\n## How to install\n\n### Using debian package\n* Install the debian package.\n* Run as `gitrends \u003cconfig\u003e`\n\n### Using docker image\n* Run `./build_docker.sh` to build the docker image (produces an image called `gitrends:latest`).\n* `$SRC_DIR` should contain a folder that contains source directories to index while `$DATA_DIR` is where output is placed.\n* Run as `docker run -it --rm -v $SRC_DIR:/src -v $DATA_DIR:/data -p 9090:9090 gitrends:latest /data/config.yaml`\n\n### Using standalone\n* Unzip the prebuilt binaries and frontend in a folder\n* Run as `./gitnotes \u003cconfig\u003e`.\n\n## How to use\nThe application is configured through a YAML file:\n```yaml\nsource_dir: /home/antjans/Code/sqlgrep\ndata_dir: data/sqlgrep\nlisten: 0.0.0.0:9090 # If running in docker\n```\n\n* `source_dir` is the repository to index.\n* `data_dir` is where the index of the repository is placed at.\n\nAfter indexing, the program no longer need to access the repository, and no source code is extracted to the index (code statistics are though).\n\nAfter running the application (see above), browse to http://localhost:9090 to access the tool.\n\n### Module definitions\nThe `modules.txt` file in the `data_dir` allows you to define the module structure of your repository.\n\n```text\nsrc/model.rs =\u003e model\nsrc/data_model.rs =\u003e model\n\nsrc/parsing/**/* =\u003e parsing\n\nsrc/execution/**/* =\u003e execution\nsrc/executor.rs =\u003e execution\n\nsrc/integration_tests.rs =\u003e tests\ntestdata =\u003e tests\n\nsrc/main.rs =\u003e cli\nsrc/table_editor.rs =\u003e cli\n\nsrc/python_wrapper =\u003e lib\n\nCargo* =\u003e build\n.github/workflows/**/* =\u003e ci\n```\n\nIf a file don't match above patterns, the folder of the file will be used as module instead.\n\nWhen writing custom analysis, the function `extract_module_name` can then be used to extract the module name of a file.\n\n### Ignore files\nThe `ignore.txt` file in the `data_dir` allows you to ignore certain files from being used in the analysis (they are still indexed, so no reindexing required when changing).\n\n```text\nsrc/*.rs\n```\n\n### Authors\nThe `authors.txt` file in the `data_dir` allows you to normalize the authors of commits (such that just one name is used).\n\n```text\nantjans =\u003e Anton Jansson\n```\n\n## How to build\nRequirements:\n* `cargo` (https://rustup.rs/)\n* `yarn` (https://yarnpkg.com/getting-started/install)\n\nRun `./build_deb.sh` to build the Debian package.\n\n## Implementation details\nThe data from the git log and source code analysis is extracted as Parquet files which then is used by Apache DataFusion to provide querying of the git data.\nThis allows most of the analysis to be implemented as SQL queries. In addition, this allows a user of the tool to write custom SQL queries of the same data.\n\n## Logo\nLogo inspired by the Git logo - see https://git-scm.com/downloads/logos.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenslaggare%2Fgitrends","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvenslaggare%2Fgitrends","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenslaggare%2Fgitrends/lists"}