{"id":13461354,"url":"https://github.com/sourcegraph/doctree","last_synced_at":"2025-10-23T20:32:24.281Z","repository":{"id":37034326,"uuid":"483448657","full_name":"sourcegraph/doctree","owner":"sourcegraph","description":"First-class library documentation for every language (based on tree-sitter), with symbol search \u0026 more. Lightweight single binary, run locally or self-host. Surfaces usage examples via Sourcegraph.","archived":false,"fork":false,"pushed_at":"2024-05-22T18:37:55.000Z","size":435,"stargazers_count":862,"open_issues_count":23,"forks_count":23,"subscribers_count":28,"default_branch":"main","last_synced_at":"2024-05-22T19:47:50.500Z","etag":null,"topics":["documentation","documentation-generator","documentation-site","elm-lang","golang","tree-sitter"],"latest_commit_sha":null,"homepage":"https://doctree.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcegraph.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":"2022-04-20T00:09:50.000Z","updated_at":"2024-06-04T21:07:49.814Z","dependencies_parsed_at":"2023-12-05T21:25:59.163Z","dependency_job_id":"1e969b53-ae1b-45ef-8fe8-f4dc058b65ce","html_url":"https://github.com/sourcegraph/doctree","commit_stats":{"total_commits":296,"total_committers":10,"mean_commits":29.6,"dds":0.1351351351351351,"last_synced_commit":"418506c648ded380cad7883dbdbb057e616febf9"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdoctree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdoctree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdoctree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdoctree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcegraph","download_url":"https://codeload.github.com/sourcegraph/doctree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867845,"owners_count":16555812,"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":["documentation","documentation-generator","documentation-site","elm-lang","golang","tree-sitter"],"created_at":"2024-07-31T11:00:35.700Z","updated_at":"2025-10-23T20:32:18.953Z","avatar_url":"https://github.com/sourcegraph.png","language":"Go","funding_links":[],"categories":["Go","Generators","golang"],"sub_categories":["Documentation websites"],"readme":"# doctree: 100% open-source library docs tool for every language\n\ndoctree provides first-class library documentation for every language (based on tree-sitter), with symbol search \u0026 more. If connected to Sourcegraph, it can automatically surface real-world usage examples.\n\n## Try it at [doctree.org](https://doctree.org)\n\n[![](https://user-images.githubusercontent.com/3173176/168915777-571410e3-ef6e-486d-86a7-dea926246d2c.png)](https://doctree.org)\n\n## Run locally, self-host, or use doctree.org\n\ndoctree is a single binary, lightweight, and designed to run on your local machine. It can be self-hosted, and used via doctree.org with any GitHub repository.\n\n## Experimental! Early stages!\n\nExtremely early stages, we're working on adding more languages, polishing the experience, and adding usage examples. It's all very early and not yet ready for production use, please bear with us!\n\nPlease see [the v1.0 roadmap](https://github.com/sourcegraph/doctree/issues/27) for more, ideas welcome!\n\n## Join us on Discord\n\nIf you think what we're building is a good idea, we'd love to hear your thoughts!\n[Discord invite](https://discord.gg/vqsBW8m5Y8)\n\n## Language support\n\nAdding support for more languages is easy. To request support for a language [comment on this issue](https://github.com/sourcegraph/doctree/issues/10)\n\n| language | functions | types | methods | consts/vars | search | usage examples | code intel |\n|----------|-----------|-------|---------|-------------|--------|----------------|------------|\n| Go       | ✅        | ✅     | ❌       | ❌          | ✅     | ❌             | ❌          |\n| Python   | ✅        | ❌     | ❌       | ❌          | ✅     | ❌             | ❌          |\n| Zig      | ✅        | ❌     | partial | ❌          | ✅     | ❌              | ❌          |\n| Markdown | n/a       | ❌     | n/a     | n/a         | ✅     | n/a            | n/a        |\n\n## Installation\n\n\u003cdetails\u003e\n\u003csummary\u003emacOS (Apple Silicon)\u003c/summary\u003e\n\n```sh\ncurl -L https://github.com/sourcegraph/doctree/releases/latest/download/doctree-aarch64-macos -o /usr/local/bin/doctree\nchmod +x /usr/local/bin/doctree\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003emacOS (Intel)\u003c/summary\u003e\n\n```sh\ncurl -L https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-macos -o /usr/local/bin/doctree\nchmod +x /usr/local/bin/doctree\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLinux (x86_64)\u003c/summary\u003e\n\n```sh\ncurl -L https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-linux -o /usr/local/bin/doctree\nchmod +x /usr/local/bin/doctree\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWindows (x86_64)\u003c/summary\u003e\nIn an administrator PowerShell, run:\n\n```powershell\nNew-Item -ItemType Directory 'C:\\Program Files\\Sourcegraph'\n\nInvoke-WebRequest https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-windows.exe -OutFile 'C:\\Program Files\\Sourcegraph\\doctree.exe'\n\n[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) + ';C:\\Program Files\\Sourcegraph', [EnvironmentVariableTarget]::Machine)\n$env:Path += ';C:\\Program Files\\Sourcegraph'\n```\n\nOr download [the exe file](https://github.com/sourcegraph/doctree/releases/latest/download/doctree-x86_64-windows.exe) and install it wherever you like.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVia Docker\u003c/summary\u003e\n\n```sh\ndocker run -it --publish 3333:3333 --rm --name doctree --volume ~/.doctree:/home/nonroot/.doctree sourcegraph/doctree:latest\n```\n\nIn a folder with Go code you'd like to see docs for, index it (for a large project like `golang/go` expect it to take ~52s for now. It's not multi-threaded.):\n\n```sh\ndocker run -it --volume $(pwd):/index --volume ~/.doctree:/home/nonroot/.doctree --entrypoint=sh sourcegraph/doctree:latest -c \"cd /index \u0026\u0026 doctree index .\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDigitalOcean user data\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\napt update -y \u0026\u0026 apt upgrade -y \u0026\u0026 apt install -y docker.io\napt install -y git\n\nmkdir -p $HOME/.doctree \u0026\u0026 chown 10000:10001 -R $HOME/.doctree\n\n# Index golang/go repository\ngit clone https://github.com/golang/go\nchown 10000:10001 -R go\ncd go\ndocker run -i --volume $(pwd):/index --volume $HOME/.doctree:/home/nonroot/.doctree --entrypoint=sh sourcegraph/doctree:latest -c \"cd /index \u0026\u0026 doctree index .\"\n\n# Run server\ndocker rm -f doctree || true\ndocker run -d --rm --name doctree -p 80:3333 --volume $HOME/.doctree:/home/nonroot/.doctree sourcegraph/doctree:latest\n```\n\n\u003c/details\u003e\n\n## Usage\n\nRun the server:\n\n```sh\ndoctree serve\n```\n\nIndex a Go project (takes ~52s for a large project like golang/go itself, will be improved soon):\n\n```sh\ndoctree index .\n```\n\nNavigate to http://localhost:3333\n\n## Contributing\n\nWe'd love any contributions!\n\nTo get started see [docs/development.md](docs/development.md) and the [language support tracking issue](https://github.com/sourcegraph/doctree/issues/10).\n\n## Changelog\n\n### v0.2 (not yet released)\n\n* Page downloads are now even slimmer (a few KiB for a a large Go package page.)\n* Fixed an issue where root Go project pages (e.g. `github.com/gorilla/mux` which contains only one Go package) would not render.\n\n### v0.1\n\n* Go, Python, Zig, and Markdown basic support\n* Basic search navigation experience based on [experimental Sinter search filters](https://github.com/hexops/sinter/blob/c87e502f3cfd468d3d1263b7caf7cea94ff6d084/src/filter.zig#L18-L85)\n* Searching globally across all projects, and within specific projects is now possible.\n* Searching within a specific language is now supported (add \"go\", \"python\", \"md\" / \"markdown\" to front of your query string.)\n* Markdown files now have headers and sub-headers indexed for search (e.g. `# About doctree \u003e Installation` shows up in search)\n* Basic Markdown frontmatter support.\n* Initial [doctree schema format](https://github.com/sourcegraph/doctree/blob/main/doctree/schema/schema.go)\n* Experimental (not yet ready for use) auto-indexing, `doctree add .` to monitor a project for file changes and re-index automatically.\n* Docker images, single-binary downloads for every OS cross-compiled via Zig compiler.\n* Initial [v1.0 roadmap](https://github.com/sourcegraph/doctree/issues/27), [language support tracking issue](https://github.com/sourcegraph/doctree/issues/10)\n\nSpecial thanks: [@KShivendu](https://github.com/KShivendu) (Python support), [@slimsag](https://github.com/slimsag) (Zig support)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fdoctree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcegraph%2Fdoctree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fdoctree/lists"}