HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sourcegraph
doctree
Go2022–2022
sourcegraph / doctree · Archived

doctree

First-class library documentation for every language (based on tree-sitter), with symbol search & more. Lightweight single binary, run locally or self-host. Surfaces usage examples via Sourcegraph.

4Distinct people
5Mentions
0Explicit recommenders
878GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

First-class library documentation for every language (based on tree-sitter), with symbol search & more. Lightweight single binary, run locally or self-host. Surfaces usage examples via Sourcegraph.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week5 dated mentions

Observed mentions: 2022-04-20 13:11:25 UTC to 2022-06-04 02:40:13 UTC. Weeks start Monday, UTC.

01232022-04-18 00:00:00 UTC to 2022-04-25 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsApr 182022-04-25 00:00:00 UTC to 2022-05-02 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2022-05-02 00:00:00 UTC to 2022-05-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-09 00:00:00 UTC to 2022-05-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 92022-05-16 00:00:00 UTC to 2022-05-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-23 00:00:00 UTC to 2022-05-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-30 00:00:00 UTC to 2022-06-06 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 30

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Apr 182022-04-18 00:00:00 UTC2022-04-25 00:00:00 UTC110
Apr 252022-04-25 00:00:00 UTC2022-05-02 00:00:00 UTC312
May 22022-05-02 00:00:00 UTC2022-05-09 00:00:00 UTC000
May 92022-05-09 00:00:00 UTC2022-05-16 00:00:00 UTC000
May 162022-05-16 00:00:00 UTC2022-05-23 00:00:00 UTC000
May 232022-05-23 00:00:00 UTC2022-05-30 00:00:00 UTC000
May 302022-05-30 00:00:00 UTC2022-06-06 00:00:00 UTC101

What Hacker News says

5 sources
Another issue with tree-sitter is how basic functionality is not consistent across all languages. Want to find all comment text in all languages? Each tree-sitter lang support will have a slightly different behavior for every language. When you extract the comment you'll have syntax from the language in there like `/*/` or `{}`. Example from a sourcegraph docs generation project: https://github.com/sourcegraph/doctree/blob/07a2d593fe9855be... https://github.com/sourcegraph/doctree/blob/07a2d593fe9855be...
In Is tree-sitter good enough?
Quite a lot, actually! It's definitely not ready for prime-time usage or anything, but I feel good about the week of time on it: * There are some Docker commands you can use to try it out on some Go code right now[0] (still working on getting binary releases for each OS so Docker is not necessary) * There's a not-too-bad frontend (written in Elm), screenshots in the README are real & it all functions! * There's an indexer implemented for the Go language[1] that runs tree-sitter queries & emits a basic schema[2], the idea is each language would emit to a common schema like this and then the frontend can serve it, we can index it for search, etc. So, I mean, yeah - just a week into it, but like - you can already view documentation for Go functions in it so moving quickly! [0] https://github.com/sourcegraph/doctree#try-it-out-extremely-... [
Read the rest
In Doctree
Whoa, wasn't expecting to see this on HN! I've only done a week of work on this, super early stages - here are our plans for it: * 100% OSS tool, run locally on your machine (static Go binary) or use https://doctree.org (not online yet, plug in a repository name, get docs) - really want this to be a proper, useful FOSS tool. * Work with any language, based on tree-sitter. * Provide symbol-level search functionality. * Surface real-world usage examples automatically, probably based on some statistical analysis of how functions are commonly used in open source code via Sourcegraph API, similar to what https://codestat.dev is doing. Tech details (again, just a week in): * Go for backend, Elm for frontend * Indexers will be written in Go, use tree-sitter queries to produce a standard index schema which then gets served to Elm frontend for ren
Read the rest
dering. https://github.com/sourcegraph/doctree/blob/main/doctree/sch... Probably not worth trying out right now, but if you're interested in it we set up a Discord server for collaboration, etc. https://discord.com/invite/vqsBW8m5Y8 Happy to answer any questions!
In Doctree

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.