GitVision is a zero-dependency Node.js project that reads a Git repository, computes branch lanes, and exports a polished static graph in SVG or HTML.
The first implementation targets the workflow you described:
- Parse commit history from
git log --all - Visualize branches, merges, and refs like a Git Graph view
- Export a static artifact that looks presentation-ready
- Work directly against a local repository such as
E:\MyRV_DIDE(https://github.com/zxis233/EsCute-RV.git)
Run the test suite:
npm testRender the default SVG export:
node src/cli.js render E:\MyRV_DIDEThe same renderer is also available through the package script:
npm run render -- E:\MyRV_DIDERender to a custom file:
node src/cli.js render E:\MyRV_DIDE -o out\escute-rv.svg --title "EsCute-RV Git Graph"Export an HTML wrapper instead of raw SVG:
node src/cli.js render E:\MyRV_DIDE --format html -o out\escute-rv.htmlLimit the number of commits:
node src/cli.js render E:\MyRV_DIDE --max-commits 120Keep a selected branch on the first-parent lane:
node src/cli.js render E:\MyRV_DIDE --main-branch mainOnly include recent commits:
node src/cli.js render E:\MyRV_DIDE --since-days 365This repository includes a manual workflow at .github/workflows/render-git-graph.yml.
It exposes three inputs:
repository_url: target Git repository URL, or GitHub shorthand likeowner/repomain_branch: branch to keep on lane 0 as the first-parent chainextra_args: extra render flags such as--max-commits 100 --since-days 365
For safety, extra_args only accepts --format, --max-commits, --since-days, and --title.
The workflow will:
- clone the target repository
- optionally use the
REPO_READ_PATsecret when accessing GitHub-hosted private repositories - render a single output file
- upload that file directly as a single-file artifact without zipping when the workflow runs on
actions/upload-artifact@v7
Generated files follow this naming pattern:
{User}-{Repo}_{Branch}_{parameters}.svg
Typical parameter slugs are compact, for example mc100-d365, mc200-html, or mc100-d30-tWeekly-Export.
If --format html is passed through extra_args, the extension becomes .html.
src/git-data.js: collect commits and refs from Gitsrc/layout.js: assign visual lanes and build edgessrc/render.js: render the final SVG/HTMLsrc/cli.js: command-line entry pointscripts/render-workflow.js: helper used by the manual GitHub Actions workflowtest/render.test.js: end-to-end smoke teststest/workflow-script.test.js: workflow helper unit tests
Based on Escute-RV