{"id":13468468,"url":"https://github.com/githubocto/repo-visualizer","last_synced_at":"2025-05-15T07:05:51.130Z","repository":{"id":37699952,"uuid":"388574386","full_name":"githubocto/repo-visualizer","owner":"githubocto","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-19T15:28:33.000Z","size":417,"stargazers_count":1215,"open_issues_count":24,"forks_count":128,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-05T19:49:00.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/githubocto.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":"2021-07-22T19:25:42.000Z","updated_at":"2025-05-03T22:00:05.000Z","dependencies_parsed_at":"2024-01-06T14:08:30.059Z","dependency_job_id":"9ab79672-dcac-4e88-a205-6ad590fc7977","html_url":"https://github.com/githubocto/repo-visualizer","commit_stats":{"total_commits":108,"total_committers":18,"mean_commits":6.0,"dds":0.5925925925925926,"last_synced_commit":"a999615bdab757559bf94bda1fe6eef232765f85"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Frepo-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Frepo-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Frepo-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Frepo-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubocto","download_url":"https://codeload.github.com/githubocto/repo-visualizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292042,"owners_count":22046426,"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-31T15:01:11.634Z","updated_at":"2025-05-15T07:05:46.120Z","avatar_url":"https://github.com/githubocto.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# Repo Visualizer\n\nA GitHub Action that creates an SVG diagram of your repo. Read more [in the writeup](https://octo.github.com/projects/repo-visualization).\n\n**Please note that this is an experiment. If you have feature requests, please submit a PR or fork and use the code any way you need.**\n\nFor a full demo, check out the [githubocto/repo-visualizer-demo](https://github.com/githubocto/repo-visualizer-demo) repository.\n\n## Inputs\n\n### `output_file`\n\nA path (relative to the root of your repo) to where you would like the diagram to live.\n\nFor example: images/diagram.svg\n\nDefault: diagram.svg\n\n### `excluded_paths`\n\nA list of paths to folders to exclude from the diagram, separated by commas.\n\nFor example: dist,node_modules\n\nDefault: node_modules,bower_components,dist,out,build,eject,.next,.netlify,.yarn,.vscode,package-lock.json,yarn.lock\n\n### `excluded_globs`\n\nA semicolon-delimited array of file [globs](https://globster.xyz/) to exclude from the diagram, using [micromatch](https://github.com/micromatch/micromatch) syntax. Provided as an array.\n\nFor example:\n\n```yaml\nexcluded_globs: \"frontend/*.spec.js;**/*.{png,jpg};**/!(*.module).ts\"\n# Guide:\n# - 'frontend/*.spec.js' # exclude frontend tests\n# - '**/*.{png,ico,md}'  # all png, ico, md files in any directory\n# - '**/!(*.module).ts'  # all TS files except module files\n```\n\n### `root_path`\n\nThe directory (and its children) that you want to visualize in the diagram, relative to the repository root.\n\nFor example: `src/`\n\nDefault: `''` (current directory)\n\n### `max_depth`\n\nThe maximum number of nested folders to show files within. A higher number will take longer to render.\n\nDefault: 9\n\n### `should_push`\n\nWhether to make a new commit with the diagram and push it to the original repository.\n\nShould be a boolean value, i.e. `true` or `false`. See `commit_message` and `branch` for how to customise the commit.\n\nDefault: `true`\n\n### `commit_message`\n\nThe commit message to use when updating the diagram. Useful for skipping CI. For example: `Updating diagram [skip ci]`\n\nDefault: `Repo visualizer: updated diagram`\n\n### `branch`\n\nThe branch name to push the diagram to (branch will be created if it does not yet exist).\n\nFor example: `diagram`\n\n### `artifact_name`\n\nThe name of an [artifact](https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts) to create containing the diagram.\n\nIf unspecified, no artifact will be created.\n\nDefault: `''` (no artifact)\n\n### `file_colors`\n\nYou can customize the colors for specific file extensions. Key/value pairs will extend the [default colors](https://github.com/githubocto/repo-visualizer/pull/src/language-colors.json).\n\nFor example: '{\"js\": \"red\",\"ts\": \"green\"}'\ndefault: '{}'\n\n## Outputs\n\n### `svg`\n\nThe contents of the diagram as text. This can be used if you don't want to handle new files.\n\n## Example usage\n\nYou'll need to run the `actions/checkout` Action beforehand, to check out the code.\n\n```yaml\n- name: Checkout code\n  uses: actions/checkout@master\n- name: Update diagram\n  uses: githubocto/repo-visualizer@0.7.1\n  with:\n    output_file: \"images/diagram.svg\"\n    excluded_paths: \"dist,node_modules\"\n```\n\n\n## Accessing the diagram\n\nBy default, this action will create a new commit with the diagram on the specified branch.\n\nIf you want to avoid new commits, you can create an artifact to accompany the workflow run,\nby specifying an `artifact_name`. You can then download the diagram using the\n[`actions/download-artifact`](https://github.com/marketplace/actions/download-a-build-artifact)\naction from a later step in your workflow,\nor by using the [GitHub API](https://docs.github.com/en/rest/reference/actions#artifacts).\n\nExample:\n```yaml\n- name: Update diagram\n  id: make_diagram\n  uses: githubocto/repo-visualizer@0.7.1\n  with:\n    output_file: \"output-diagram.svg\"\n    artifact_name: \"my-diagram\"\n- name: Get artifact\n  uses: actions/download-artifact@v2\n  with:\n    name: \"my-diagram\"\n    path: \"downloads\"\n```\nIn this example, the diagram will be available at downloads/my-diagram.svg\nNote that this will still also create a commit, unless you specify `should_push: false`!\n\nAlternatively, the SVG description of the diagram is available in the `svg` output,\nwhich you can refer to in your workflow as e.g. `${{ steps.make_diagram.outputs.svg }}`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubocto%2Frepo-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubocto%2Frepo-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubocto%2Frepo-visualizer/lists"}