{"id":36493601,"url":"https://github.com/tamadalab/purplecat","last_synced_at":"2026-01-12T01:58:31.252Z","repository":{"id":54841734,"uuid":"303253349","full_name":"tamadalab/purplecat","owner":"tamadalab","description":"Purple cat, Purple cat, What do you see?   I see the dependant libraries and their licenses!","archived":false,"fork":false,"pushed_at":"2023-02-25T01:49:35.000Z","size":302,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T09:59:07.611Z","etag":null,"topics":["golang","license-checking","oss"],"latest_commit_sha":null,"homepage":"https://tamadalab.github.io/purplecat","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamadalab.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":"2020-10-12T02:04:45.000Z","updated_at":"2021-01-26T01:20:10.000Z","dependencies_parsed_at":"2024-06-21T09:04:41.995Z","dependency_job_id":null,"html_url":"https://github.com/tamadalab/purplecat","commit_stats":{"total_commits":57,"total_committers":1,"mean_commits":57.0,"dds":0.0,"last_synced_commit":"0641ad87315d6ac3980c4d652e2a6360d571b278"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tamadalab/purplecat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamadalab%2Fpurplecat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamadalab%2Fpurplecat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamadalab%2Fpurplecat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamadalab%2Fpurplecat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamadalab","download_url":"https://codeload.github.com/tamadalab/purplecat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamadalab%2Fpurplecat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["golang","license-checking","oss"],"created_at":"2026-01-12T01:58:31.182Z","updated_at":"2026-01-12T01:58:31.247Z","avatar_url":"https://github.com/tamadalab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build](https://github.com/tamadalab/purplecat/workflows/build/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/tamadalab/purplecat/badge.svg?branch=main)](https://coveralls.io/github/tamadalab/purplecat?branch=main)\n[![codebeat badge](https://codebeat.co/badges/760a8a6f-2675-4a71-9a77-07c33a807192)](https://codebeat.co/projects/github-com-tamadalab-purplecat-main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tamadalab/purplecat)](https://goreportcard.com/report/github.com/tamadalab/purplecat)\n\n[![License](https://img.shields.io/badge/License-WTFPL-blue.svg)](https://github.com/tamada/purplecat/blob/main/LICENSE)\n[![Version](https://img.shields.io/badge/Version-0.3.3-yellowgreen.svg)](https://github.com/tamada/purplecat/releases/tag/v0.3.3)\n[![Heroku-Deployed](https://img.shields.io/badge/Heroku-Deployed-green?logo=Heroku)](https://afternoon-wave-39227.herokuapp.com/purplecat/)\n[![Docker](https://img.shields.io/badge/docker-ghcr.io%2Ftamadalab%2Fpurplecat%3A0.3.3-blue?logo=docker)](https://github.com/orgs/tamadalab/packages/container/package/purplecat)\n\n# :cat: purplecat\n\nPurple cat, Purple cat, What do you see?\nI see the dependent libraries and their licenses!\n\nWe develop `purplecat` for detecting the license conflicts.\nFor this, `purplecat` finds the dependent libraries and their licenses.\n\n## :runner: Usage\n\n```sh\n$ purplecat -h\npurplecat version 0.3.2\npurplecat [COMMON_OPTIONS] [CLI_MODE_OPTIONS] [SERVER_MODE_OPTIONS] \u003cPROJECTs...|BUILD_FILEs...\u003e\nCOMMON_OPTIONS\n    -c, --cache-type \u003cTYPE\u003e        specifies the cache type. (default: default).\n                                   Available values are: default, ref-only, newdb and memory.\n        --cachedb-path \u003cDBPATH\u003e    specifies the cache database path\n                                   (default: ~/.config/purplecat/cachedb.json).\n    -l, --log-level \u003cLOGLEVEL\u003e     specifies the log level. (default: WARN).\n                                   Available values are: DEBUG, INFO, WARN, and FATAL\n    -h, --help                     prints this message.\n\nCLI_MODE_OPTIONS\n    -d, --depth \u003cDEPTH\u003e            specifies the depth for parsing (default: 1)\n    -f, --format \u003cFORMAT\u003e          specifies the result format. Default is 'markdown'.\n                                   Available values are: CSV, JSON, YAML, XML, and Markdown.\n    -o, --output \u003cFILE\u003e            specifies the destination file (default: STDOUT).\n    -N, --offline                  offline mode (no network access).\n\nSERVER_MODE_OPTIONS\n    -p, --port \u003cPORT\u003e              specifies the port number of REST API server. Default is 8080.\n                                   If '--server' option did not specified, purplecat ignores this option.\n    -s, --server                   starts REST API server. With this option, purplecat ignores\n                                   CLI_MODE_OPTIONS and arguments.\n\nPROJECT\n    target project for extracting dependent libraries and their licenses.\nBUILD_FILE\n    build file of the project for extracting dependent libraries and their licenses\n\npurplecat support the projects using the following build tools.\n    * Maven 3 (pom.xml)\n```\n\n### Resultant Format in CLI Mode\n\n#### CSV\n\n```csv\nproject-name,license-name,parent\nproject1,[\"Apache 2.0\"],\ndependent-project1,[\"Apache 2.0\"],project1\ndependent-project2,[\"BSD\"],project1\n```\n\n#### Json\n\n```json\n{\n    \"project-name\": \"project1\",\n    \"license-name\": \"Apache 2.0\",\n    \"dependencies\": [\n        {\n            \"project-name\": \"dependent-project1\",\n            \"license-name\": \"Apache 2.0\"\n        }, {\n            \"project-name\": \"dependent-project2\",\n            \"license-name\": \"BSD\"\n        }\n    ]\n}\n```\n\nyou can get formatted Json using `jq`, like the following the command.\n\n```sh\n$ purplecat .... | jq .\n```\n\n#### Yaml\n\n```yaml\nproject-name: project1\nlicense-name: Apache 2.0\ndependencies:\n- project-name: dependent-project1\n  license-name: Apache 2.0\n- project-name: dependent-project2\n  license-name: BSD\n```\n\n#### Xml\n\n```xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003cpurplecat\u003e\n  \u003cproject-name\u003eproject1\u003c/project-name\u003e\n  \u003clicense-names\u003e\n    \u003clicense-name\u003eApache 2.0\u003c/license-name\u003e\n  \u003c/license-names\u003e\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cproject-name\u003edependent-project1\u003c/project-name\u003e\n      \u003clicense-names\u003e\n        \u003clicense-name\u003eApache 2.0\u003c/license-name\u003e\n      \u003c/license-names\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cproject-name\u003edependent-project2\u003c/project-name\u003e\n      \u003clicense-names\u003e\n        \u003clicense-name\u003eBSD\u003c/license-name\u003e\n      \u003c/license-names\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n\u003c/purplecat\u003e\n```\n\n#### Toml (not implemented yet)\n\n```toml\nproject-name = \"project1\"\nlicense-name = \"Apache 2.0\"\n[[dependencies]]\nproject-name: dependent-project1\nlicense-name: Apache 2.0\n[[dependencies]]\nproject-name: dependent-project2\nlicense-name: BSD\n```\n\n#### Markdown\n\n```markdown\n* project1: Apache 2.0\n    * dependent-project1: [\"Apache 2.0\"]\n    * dependent-project2: [\"BSD\"]\n```\n\n## :whale: Docker\n\n[![Docker](https://img.shields.io/badge/docker-ghcr.io%2Ftamadalab%2Fpurplecat%3A0.3.2-blue?logo=docker)](https://github.com/orgs/tamadalab/packages/container/package/purplecat)\n\n* `tamadalab/purplecat`\n    * `0.3.2`, `latest`\n    * `0.3.1`\n    * `0.3.0`\n    * `0.2.0`\n    * `0.1.0`\n\n```sh\n$ docker run -v /target/project/dir:/home/purplecat ghcr.io/tamadalab/purplecat pom.xml # \u003c- CLI Mode\n$ docker run -p 8080:8080 -v /target/project/dir:/home/purplecat ghcr.io/tamadalab/purplecat --server --port 8080 # \u003c- Server Mode\n```\n\n## :bathtub: Rest API\n\nPurplecat provides REST API server as specifying option `'-s'` or `'--server'` to `purplecat` command.\n\n[![Heroku-Deployed](https://img.shields.io/badge/Heroku-Deployed-green?logo=Heroku)](https://afternoon-wave-39227.herokuapp.com/purplecat/)\n\n### End points\n\n#### `/purplecat/api/licenses`\n\n* `GET`\n    * run purplecat with pom url by query param and returns the result as JSON format.\n    * Query params\n        * `target` (required)\n            * specifies the target build file url.\n        * `depth`\n            * specifies the depth of the parsing. Default is 1.\n    * Status Codes\n        * 200 OK\n            * provides license data of the build files as json format.\n        * 404 Not found\n            * specified build file not found.\n        * 500 Error\n            * parsing error.\n* `POST`\n    * run purplecat with pom data from request body and returns the result as JSON format.\n    * Query params\n        * `depth`\n            * specifies the depth of the parsing. Default is 1.\n    * Requst body\n        * plain `pom.xml` data.\n    * Status Codes\n        * 200 OK\n            * provides license data of the build files as json format.\n        * 404 Not found\n            * specified build file not found.\n        * 500 Error\n            * parsing error.\n\n#### `/purplecat/api/caches`\n\n* `GET`\n    * getting the whole cached data.\n    * Status Codes\n        * 200 OK\n           * provides cache data as json format.\n* `DELETE`\n    * delete cache data.\n        * 200 OK\n            * always returns this code.\n\n\n## :anchor: Install\n\n### :beer: Homebrew\n\n```sh\n$ brew tap tamadalab/brew\n$ brew install purplecat\n```\n\n### :muscle: Compiling yourself\n\n```sh\n$ make\n```\n\n### Requirements\n\n* [github.com/antchfx/htmlquery](https://github.com/antchfx/htmlquery)\n* [github.com/antchfx/xmlquery](https://github.com/antchfx/xmlquery)\n* [github.com/asaskevich/govalidator](https://github.com/asaskevich/govalidator)\n* [github.com/go-resty/resty/v2](https://github.com/go-resty/resty)\n* [github.com/gorilla/mux](https://github.com/gorilla/mux)\n* [github.com/mitchellh/go-homedir](https://github.com/mitchellh/go-homedir)\n* [github.com/spf13/pflag](https://github.com/spf13/pflag)\n* [golang.org/pkg/net/http](https://golang.org/pkg/net/http/)\n\n## :smile: About\n\n### :scroll: License\n\n[![License](https://img.shields.io/badge/License-WTFPL-blue.svg)](https://github.com/tamada/purplecat/blob/main/LICENSE)\n\nThis license permits\n\n- :+1: Commercial use,\n- :+1: Modification,\n- :+1: Distribution, and\n- :+1: Private use.\n\n### :jack_o_lantern: Logo\n\n![purplecat](https://github.com/tamadalab/purplecat/raw/main/site/static/images/purplecat_128.png)\n\nThis image comes from https://pixy.org/4693873/ ([CC-0](https://creativecommons.org/publicdomain/zero/1.0)).\n\n### :name_badge: Project name come from?\n\nThe project name come from the children book, titled \"[Brown Bear, Brown Bear, What do you see?](https://www.amazon.com/dp/B07BZS8RS9)\" by Bill Martin, Jr. and Eric Carle.\n\nI read the book to my child many times by her request.\nThe purple cat is the most favorit character of her.\n\n### :woman_office_worker: Developers :man_office_worker:\n\n* [Haruaki TAMADA](https://github.com/tamada)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamadalab%2Fpurplecat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamadalab%2Fpurplecat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamadalab%2Fpurplecat/lists"}