{"id":13414211,"url":"https://github.com/inherd/coco","last_synced_at":"2025-03-14T21:32:12.377Z","repository":{"id":49147833,"uuid":"316853258","full_name":"inherd/coco","owner":"inherd","description":"An effective DevOps analysis and auto-suggest tool。Coco 是一个研发效能分析工具，如团队发展现状（根据架构复杂度及行数变更）、团队演进、历史分析等。生成可视化报告及对应的改进建议。 ","archived":false,"fork":false,"pushed_at":"2022-09-22T15:46:45.000Z","size":2002,"stargazers_count":322,"open_issues_count":0,"forks_count":51,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-20T05:20:40.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://inherd.github.io/coco/","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/inherd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-29T01:21:11.000Z","updated_at":"2024-05-13T04:14:10.000Z","dependencies_parsed_at":"2022-09-14T08:00:53.734Z","dependency_job_id":null,"html_url":"https://github.com/inherd/coco","commit_stats":null,"previous_names":["phodal/cocoj","phodal/coco"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inherd%2Fcoco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inherd%2Fcoco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inherd%2Fcoco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inherd%2Fcoco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inherd","download_url":"https://codeload.github.com/inherd/coco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221508976,"owners_count":16834807,"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":[],"created_at":"2024-07-30T21:00:16.540Z","updated_at":"2024-10-26T07:30:40.443Z","avatar_url":"https://github.com/inherd.png","language":"Rust","funding_links":[],"categories":["Rust","DevOps"],"sub_categories":["TypeScript / JavaScript"],"readme":"# Coco\n\n[![Coco Build](https://github.com/inherd/coco/actions/workflows/build.yml/badge.svg)](https://github.com/inherd/coco/actions/workflows/build.yml)\n\n\u003e (aka coconut, juice), an automatic DevOps metrics analysis tool.\n\ncase studies: [Coco cases](https://inherd.github.io/cases/)\n\nOnline Demos:\n\n - [Element-Plus](https://inherd.org/cases/element-plus/)\n - [Nginx](https://inherd.org/cases/nginx/)\n - [Redis](https://inherd.org/cases/redis/)\n\nOS: macOS, Windows, GNU/Linux\n\n## Usage\n\n0. install or download Coco components from release, and download ctags: [windows](https://github.com/universal-ctags/ctags-win32/releases)\n1. use `coco init` to generate config file\n2. config `coco.yml`\n3. optional: use `coco plugins` to download plugins\n4. run Coco\n   - `coco`, gather data from source\n   - `visual`, visualization of data\n   - `suggest`, generate suggestion\n5. download plugins (optional)\n   - coco_container，container analysis\n   - coco_pipeline，pipeline analysis\n   - coco_struct，model analysis by ctags\n   - coco_swagger，Swagger API Analysis\n\nvisual URL:\n\n - all:  [http://127.0.0.1:8000/](http://127.0.0.1:8000/)\n - explorer: [http://127.0.0.1:8000/explorer.html](http://127.0.0.1:8000/explorer.html)\n\nOffline usage:\n\n1. download `coco`, `visual` e``xec file\n2. download `coco_plugins_xxxx` with platform\n3. extract `coco_plugins_xxxx` to `plugins` dir \n\n### Coco Usage\n\n```\ncoco 0.5.3\n\nUSAGE:\n    coco [OPTIONS] [SUBCOMMAND]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -b, --branches \u003cbranches\u003e            With all branches [default: true]\n        --commits \u003ccommits\u003e              With all commits [default: true]\n    -c, --config-file \u003cconfig-file\u003e      Config file .yml [default: coco.yml]\n    -d, --debug \u003cdebug\u003e                  Debug mode [default: false]\n    -f, --file-history \u003cfile-history\u003e    Scan file change list from git \u0026 cloc [default: false]\n    -y, --git-years \u003cgit-years\u003e          Set git commits scan years, default 1, [default: 1.0]\n    -t, --tags \u003ctags\u003e                    With all tags [default: true]\n\nSUBCOMMANDS:\n    help       Prints this message or the help of the given subcommand(s)\n    init       Create default coco.yml files\n    plugins    Download plugins from GitHub\n```\n\nsample:\n\n```\ncoco --file-history=true --git-years=3\n```\n\n### coco.yml\n\n#### 配置 (config in Chinese)\n\n示例：\n\n```yml\n# 代码库\nrepos:\n  - url: https://github.com/coco-rs/coco.fixtures\n  - url: https://github.com/coco-rs/coco.fixtures2\n  - url: .\n    languages: [Rust]\n  - url: https://github.com/datum-lang/scie\n  - url: https://github.com/projectfluent/fluent-rs\n    languages: [Rust, JavaScript]                     # set languages for struct analysis\n\nplugins:\n  - name: swagger\n  - name: struct\n    config:\n      - key: ctags                       # set location for macOS ctags path\n        value: /usr/local/bin/ctags\n        \ngit:\n  local: true # true will use `git clone`, false will use libgit2\n```\n\n## Documents\n\n### Development\n\nSee in [DEVELOPMENT.md](DEVELOPMENT.md)\n\n### Online video\n\nBilibili: [研发效能分析工具 Coco 第一次线上讨论](https://www.bilibili.com/video/BV18K4y1W7jN/)\n\n### Roadmap\n\n#### analysis and reporter\n\nanalysis\n\n - git analysis\n    - branch\n    - changes\n    - commits\n - cloc analysis\n    - summary\n    - file arch\n - framework analysis\n - architecture analysis\n    - file/directory organization\n\nreporter\n\n - html reporter\n - json output\n - query api?\n\n#### suggest and case study\n\n### Tech\n\n - AST Parser: `include_parser/mod.rs` \n - Web Server: `light_server.rs`\n - CLI: `visual.rs`, `coco.rs`, `suggest.rs`\n\n## Todo\n\n - [x] git analysis\n    - [x] merge code from [coca](https://github.com/phodal/coca/tree/master/pkg)\n    - [x] local repo support\n    - [x] project calendar view [https://observablehq.com/@d3/calendar-view](https://observablehq.com/@d3/calendar-view)\n    - [x] change\n       - [x] line change\n       - [x] changed file\n       - [x] commit number\n    - [x] git branch analysis\n       - [x] branch history\n       - [x] branch visual. such as [https://app.gfc.io/github/nvie/gitflow](https://app.gfc.io/github/nvie/gitflow)\n           - ahead vs behind [https://github.com/BenoitZugmeyer/git-branches-overview](https://github.com/BenoitZugmeyer/git-branches-overview)\n    - [x] git commit time analysis\n       - [x] storage all commits\n       - [x] working night count\n - [x] cloc analysis\n    - [x] spike cloc tools [Tokei](https://github.com/XAMPPRocky/tokei)\n    - [x] history cloc changes\n    - [x] commit cloc changes\n - [ ] framework analysis.\n    - framework detector\n    - [x] merge from [scie-detector](https://github.com/datum-lang/scie/tree/master/scie-detector)\n    - [x] framework output\n    - [ ] tech stack generate\n    - [ ] cloud native\n - [ ] module analysis\n    - [x] base framework for directory\n       - [x] gitignore support\n    - [x] code flower\n    - [ ] include analysis\n       - [x] code parser: [pest](https://github.com/pest-parser/pest)\n       - [ ] languages support.\n - [x] team analysis\n    - [x] join time \u0026 life time\n       - 以加入时间开始度量平均提交：上手成本分析\n       - 平均加入时长\n       - 成员加入时间点\n    - [x] member growth\n    - [x] count system size \u0026 learning curve\n - [ ] commit analysis\n    - [x] commit times analysis (hours)\n    - [x] rule regex support in config\n    - [ ] participle（分词）\n    - [x] tags generate\n - [ ] suggestion API\n    - [ ] document manage system\n    - [ ] suggest to ledge\n    - [ ] suggest to cases \n    - [ ] suggest to coco.server?\n       - [ ] online suggest ?\n       - [ ] link daily checking\n    - [ ] architecture design rules\n - [ ] architecture \n    - [ ] tech stack version check (more than 3 years ?) \n       - [ ] Maven Center \n       - [ ] NPM Server \n       - [ ] Go Server \n - [ ] ~~tools~~\n    - [ ] ~~tools config identify~~\n    - [ ] ~~tools suggest (identify old tools)~~\n    - [ ] ~~cloud-native config~~\n - [ ] case study\n    - [x] homepage: [https://github.com/inherd/cases](https://github.com/inherd/cases)\n    - [ ] auto clone and auto deploy\n - [ ] todo scan\n    - [ ] merge from [coca](https://github.com/inherd/coca/blob/master/pkg/application/todo/astitodo/astitodo.go)\n - [x] multiple platform support\n    - [x] macOS\n    - [x] GNU/Linux \n    - [x] Windows\n       - [x] fix tests\n       - [x] make it works\n - [ ] C4 Model\n    - [ ] PUML for call chain\n       - [ ] symbol design - IsA, Use-In-The-Interface, Uses-In-The-Implementation  \n - [ ] plugin\n    - [ ] struct analysis\n       - [x] ctags\n       - [ ] visual\n       - [x] uml\n    - [x] swagger\n    - [x] Jenkinsfile\n    - [ ] ~~Dockerfile~~\n\nVisual and Reporter\n\n - visual api\n     - [x] static files server\n        - [x] http server: [actix_web](https://github.com/actix/actix-web)\n        - [x] static server: [Rust Embed](https://github.com/pyros2097/rust-embed)\n     - [x] export assets\n     - [x] cli prompt for projects\n     - [ ] query JSON API\n     - [ ] CLI JSON API\n - visual web\n     - [x] spike d3.js code organization\n     - [ ] typescript with frontend framework\n        - [ ] use Deno ?\n     - [x] architecture\n        - [x] first demo\n        - [x] code flower 1, [D3.js code flower](https://github.com/fzaninotto/CodeFlower)\n        - [x] circle\n     - [ ] git\n        - [x] branch history\n     - [x] commits in years/month\n        - examples: [gilot](https://github.com/hirokidaichi/gilot) average committer in month\n        - [ ] changes in years/month\n           - [x] [Stacked Area Chart](https://observablehq.com/@d3/stacked-area-chart)\n    - [ ] graph support for velocity\n        - [x] code commits by daily\n        - ~~PR times by daily~~\n    - [ ] story velocity\n        - [ ] commit message analysis\n        - [ ] story spend days\n    - [ ] advanced code flower, [Polyglot Code Explorer](https://blog.korny.info/2020/09/06/introducing-the-polyglot-code-explorer.html)\n        - source code: https://github.com/kornysietsma/polyglot-code-explorer/tree/master/src\n        - [x] [Weighted Voronoi diagram](https://en.wikipedia.org/wiki/Weighted_Voronoi_diagram)\n        - [ ] Age since last change\n        - [ ] Creation date\n        - [ ] Unique changers\n        - [ ] Temporal Coupling\n - [ ] reporter\n     - [ ] framework\n     - [ ] cloc\n     - [ ] git\n     - [ ] architecture\n\nDevOps pipeline\n\n - [ ] Jenkinsfile of Coco's examples\n\nTech Debt Integration\n\n - [ ] Git 2\n     - [ ] Code check with: [https://github.com/kornysietsma/polyglot-code-scanner](https://github.com/kornysietsma/polyglot-code-scanner)\n - [ ] Integration Sonarqube ?\n     - [ ] [Our 10-Point Technical Debt Assessment](https://codeclimate.com/blog/10-point-technical-debt-assessment/)\n\n## Documents\n\nRefs: [Libgit2 Documents](https://github.com/libgit2/libgit2.github.com/blob/master/docs/guides/101-samples/index.md)\n\n## FAQ\n\n### How to install in macOS?\n\n#### Step1\n\nDownload Coco to your Mac from [release](https://github.com/daolou/coco/releases)\n\n#### Step2\n\nMove it(Coco) to your preferred directory,such as:\n\n```zsh\nmkdir ~/.coco\nmv ~/Downloads/coco_macos ~/.coco/\n```\n\n#### Step3\n\nSet up an alias to make it easier to use,such as:\n\n```zsh\nexport 'alias coco=\"~/.coco/coco_macos\"' \u003e\u003e ~/.zshrc\n```\n\n#### Step4\n\nTry to use execute it by alias `coco`:\n\n```zsh\ncoco -h\n```\n\nIf it show no permission,you can execute the following command:\n\n```zsh\nchmod -R u=rwx,g=rw,o=r ~/.coco/coco_macos\n```\n\nThen retry:\n\n```zsh\ncoco -h\n```\n\nGood luck!\n\n## Thanks\n\n[![Jetbrains](docs/images/jetbrains.svg)](https://www.jetbrains.com/?from=coco)\n\nLicense\n---\n\nctags analysis based on [https://github.com/dalance/ptags](https://github.com/dalance/ptags) with MIT, see in [src](plugins/coco_struct_analysis/src)\n\nctags parser rewrite from Golang's [https://github.com/ruben2020/tags2uml](https://github.com/ruben2020/tags2uml) with Apache License.\n\n@ 2020~2021 This code is distributed under the MIT license. See `LICENSE` in this directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finherd%2Fcoco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finherd%2Fcoco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finherd%2Fcoco/lists"}