{"data":{"slug":"ekalinin-github-markdown-toc","name":"github-markdown-toc","tagline":"Easy TOC creation for GitHub README.md","github_url":"https://github.com/ekalinin/github-markdown-toc","owner":"ekalinin","repo":"github-markdown-toc","owner_avatar_url":"https://avatars.githubusercontent.com/u/234891?v=4","primary_language":"Shell","stars":3292,"forks":2690,"topics":["github","markdown","shell","table-of-contents","toc"],"archived":false,"github_pushed_at":"2024-10-12T19:30:59+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/ekalinin-github-markdown-toc","markdown_url":"https://www.graphcanon.com/tools/ekalinin-github-markdown-toc.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/ekalinin-github-markdown-toc","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=ekalinin-github-markdown-toc","description":"Easy TOC creation for GitHub README.md","homepage_url":null,"license":"MIT","open_issues":24,"watchers":36,"ai_summary":null,"readme_excerpt":"gh-md-toc\n=========\n\n\n\n\ngh-md-toc — is for you if you **want to generate TOC** (Table Of Content) for a README.md or\na GitHub wiki page **without installing additional software**.\n\nIt's my try to fix a problem:\n\n  * [github/issues/215](https://github.com/isaacs/github/issues/215)\n\ngh-md-toc is able to process:\n\n  * stdin\n  * local files (markdown files in local file system)\n  * remote files (html files on github.com)\n\ngh-md-toc tested on Ubuntu, and macOS High Sierra (gh-md-toc release 0.4.9). If you want it on Windows, you\nbetter to use a golang based implementation:\n\n  * [github-markdown-toc.go](https://github.com/ekalinin/github-markdown-toc.go)\n\nIt's more solid, reliable and with ability of a parallel processing. And\nabsolutely without dependencies.\n\nTable of contents\n=================\n\n\n   * [Installation](#installation)\n   * [Usage](#usage)\n      * [STDIN](#stdin)\n      * [Local files](#local-files)\n      * [Remote files](#remote-files)\n      * [Multiple files](#multiple-files)\n      * [Combo](#combo)\n      * [Auto insert and update TOC](#auto-insert-and-update-toc)\n      * [GitHub token](#github-token)\n      * [TOC generation with Github Actions](#toc-generation-with-github-actions)\n   * [Tests](#tests)\n   * [Dependency](#dependency)\n   * [Docker](#docker)\n     * [Local](#local)\n     * [Public](#public)\n\n\n\nInstallation\n============\n\nLinux (manual installation)\n```bash\n$ wget https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc\n$ chmod a+x gh-md-toc\n```\n\nMacOS (manual installation)\n```bash\n$ curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc\n$ chmod a+x gh-md-toc\n```\n\nLinux or MacOS (using [Basher](https://github.com/basherpm/basher))\n```bash\n$ basher install ekalinin/github-markdown-toc\n# `gh-md-toc` will automatically be available in the PATH\n```\n\nUsage\n=====\n\n\nSTDIN\n-----\n\nHere's an example of TOC creating for markdown from STDIN:\n\n```bash\n➥ cat ~/projects/Dockerfile.vim/README.md | ./gh-md-toc -\n  * [Dockerfile.vim](#dockerfilevim)\n  * [Screenshot](#screenshot)\n  * [Installation](#installation)\n        * [OR using Pathogen:](#or-using-pathogen)\n        * [OR using Vundle:](#or-using-vundle)\n  * [License](#license)\n```\n\nLocal files\n-----------\n\nHere's an example of TOC creating for a local README.md:\n\n```bash\n➥ ./gh-md-toc ~/projects/Dockerfile.vim/README.md\n\n\nTable of Contents\n=================\n\n  * [Dockerfile.vim](#dockerfilevim)\n  * [Screenshot](#screenshot)\n  * [Installation](#installation)\n        * [OR using Pathogen:](#or-using-pathogen)\n        * [OR using Vundle:](#or-using-vundle)\n  * [License](#license)\n```\n\nRemote files\n------------\n\nAnd here's an example, when you have a README.md like this:\n\n  * [README.md without TOC](https://github.com/ekalinin/envirius/blob/f939d3b6882bfb6ecb28ef7b6e62862f934ba945/README.md)\n\nAnd you want to generate TOC for it.\n\nThere is nothing easier:\n\n```bash\n➥ ./gh-md-toc https://github.com/ekalinin/envirius/blob/master/README.md\n\nTable of Contents\n=================\n\n  * [envirius](#envirius)\n    * [Idea](#idea)\n    * [Features](#features)\n  * [Installation](#installation)\n  * [Uninstallation](#uninstallation)\n  * [Available plugins](#available-plugins)\n  * [Usage](#usage)\n    * [Check available plugins](#check-available-plugins)\n    * [Check available versions for each plugin](#check-available-versions-for-each-plugin)\n    * [Create an environment](#create-an-environment)\n    * [Activate/deactivate environment](#activatedeactivate-environment)\n      * [Activating in a new shell](#activating-in-a-new-shell)\n      * [Activating in the same shell](#activating-in-the-same-shell)\n    * [Get list of environments](#get-list-of-environments)\n    * [Get current activated environment](#get-current-activated-environment)\n    * [Do something in environment without enabling it](#do-something-in-environment-without-enabling-it)\n    * [Get help](#get-help)\n    * [Get help for a command](#get-help-for-a-command)\n  * [How","github_created_at":"2014-09-02T15:33:16+00:00","created_at":"2026-07-11T23:08:00.418739+00:00","updated_at":"2026-07-11T23:08:14.527239+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"}],"tags":[{"slug":"github","name":"github"},{"slug":"markdown","name":"markdown"},{"slug":"toc","name":"toc"},{"slug":"table-of-contents","name":"table-of-contents"},{"slug":"shell","name":"shell"}],"trust":{"provenance":{"is_fork":false,"github_id":23584347,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:08:07.016Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":637,"last_release_at":"2024-03-03T11:00:19Z"},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:08:07.373Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:08:06.736Z"},"deploy":{"source":"dockerfile:Dockerfile","self_host":true,"observed_at":"2026-07-11T23:08:06.736Z","managed_saas":false},"languages":{"value":["shell"],"source":"github.language","observed_at":"2026-07-11T23:08:06.736Z"},"has_docker":{"value":true,"source":"dockerfile:Dockerfile","observed_at":"2026-07-11T23:08:06.736Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-11T23:08:06.736Z"}}}}