{"id":21644698,"url":"https://github.com/vectronic/plantuml-proxy-cli","last_synced_at":"2026-04-11T08:37:19.379Z","repository":{"id":37960271,"uuid":"276409364","full_name":"vectronic/plantuml-proxy-cli","owner":"vectronic","description":"Simple NodeJS CLI to render local PlantUML files to images using the online PlantUML service.","archived":false,"fork":false,"pushed_at":"2023-07-14T18:16:31.000Z","size":622,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T22:34:52.644Z","etag":null,"topics":["git-hook","plantuml"],"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/vectronic.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-07-01T15:07:22.000Z","updated_at":"2024-10-23T03:30:21.000Z","dependencies_parsed_at":"2024-10-03T12:21:21.978Z","dependency_job_id":"e0524207-80db-4082-aea6-33647c74e6d7","html_url":"https://github.com/vectronic/plantuml-proxy-cli","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.5,"last_synced_commit":"0f55558964bce588c7954f2d3f0a05fe0b528be6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectronic%2Fplantuml-proxy-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectronic%2Fplantuml-proxy-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectronic%2Fplantuml-proxy-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectronic%2Fplantuml-proxy-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vectronic","download_url":"https://codeload.github.com/vectronic/plantuml-proxy-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244413461,"owners_count":20448710,"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":["git-hook","plantuml"],"created_at":"2024-11-25T05:41:54.477Z","updated_at":"2026-04-11T08:37:19.348Z","avatar_url":"https://github.com/vectronic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plantuml-proxy-cli\n[![license](https://img.shields.io/github/license/vectronic/plantuml-proxy-cli.svg)](https://github.com/vectronic/plantuml-proxy-cli/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/plantuml-proxy-cli.svg)](https://www.npmjs.com/package/plantuml-proxy-cli)\n\n\u003e Simple NodeJS CLI to render local PlantUML files to images using the online PlantUML service.\n\n## Overview\nThis project provides a simple NodeJS CLI which will look for local PlantUML source files and for each one:\n\n- [encode](https://plantuml.com/text-encoding) the file contents\n- perform an HTTPS request to the PlantUML [service](https://plantuml.com/server) to render the image\n- save the rendered image\n\n## Motivation\nThis mechanism:\n \n- avoids the need to have the required software for PlantUML rendering (Java etc.) installed.\n- can easily be used in Git pre-commit hook to ensure rendered images are always up to date.\n\n## Alternative\n\nThe key driver for this was to ensure I could include rendered UML diagrams could be included in Markdown files\nstored in GitHub. A documented\n[mechanism to achieve this](https://stackoverflow.com/questions/32203610/how-to-integrate-uml-diagrams-into-gitlab-or-github) does exist:\n\nHowever, as noted in this [excellent post](https://blog.anoff.io/2018-07-31-diagrams-with-plantuml/), \n\"the downside of this approach is that it will always render the latest commit in your repository even if you browse old versions.\"\n\n## Install\n\n```\nnpm install plantuml-proxy-cli\n```\n\n## Usage\n\n```\nRender local PlantUML files to images using the online PlantUML service.\n\n  version                 1.0.5\n\nUsage\n\n  plantrender --sourceFolder \u003cvalue\u003e --destFolder \u003cvalue\u003e [--sourceExt \u003cvalue\u003e] [--destFormat \u003cvalue\u003e] [--url \u003cvalue\u003e]\n\nCommand Arguments\n\n  --sourceFolder          Folder path which contains PlantUML files.\n  --destFolder            Folder path for output of rendered images.\n  --sourceExt             Source PlantUML file extension.\n                          (default: iuml)\n  --destFormat            Output rendered image format.\n                          (valid values: png,txt,svg)\n                          (default: png)\n  --url                   URL of the PlantUML render service.\n                          (default: http://www.plantuml.com/plantuml/)\n\nOther Arguments\n\n  --help                  Display application help\n  --version               Show version information\n  -h                      Display application help\n  -v                      Show version information\n  help                    Display application help\n```\n\n## Git Hook\n\nAn example Git hook defined in a [Husky](https://github.com/typicode/husky) config file using command\nargument defaults would be:\n\n```\n{\n    \"hooks\": {\n        \"pre-commit\": \"npx plantrender --sourceFolder=uml/source --destFolder=docs/images \u0026\u0026 git add docs/images/*.png\"\n    }\n}\n```\n\nOtherwise, get funky with the other options:\n\n```\n{\n    \"hooks\": {\n        \"pre-commit\": \"npx plantrender --sourceFolder=uml/source --destFolder=docs/images --sourceExt=uml --destFormat=txt \u0026\u0026 git add docs/images/*.png\"\n    }\n}\n```\n\n\n## Development\n\nFirstly:\n\n```\nnpm install\n```\n\nthen:\n\n```\nnpm run build\n```\n\nAfter building, the CLI can be run with:\n\n```\nbin/plantrender\n```\n\nIf you get stuck trying running with debug logging:\n\n```\nDEBUG='*' bin/plantrender\n```\n\n## Help etc.\n\nIf you have a query or problem, raise an issue in GitHub, or better yet submit a PR!\n\n## License\n\nMIT © Vectronic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectronic%2Fplantuml-proxy-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectronic%2Fplantuml-proxy-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectronic%2Fplantuml-proxy-cli/lists"}