Doctree
github.com
github.com
* 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 rendering. 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!
It'll require _a lot_ of iteration to make this work really well, though, and make it something that everyone feels good about using *for their projects*. Don't want there to be barriers to using it, if it was enterprise/paid it'd be tough to do that.
There will be features/functionality doctree _can_ gain if you connect it to a Sourcegraph instance, but largely because they'd be impossible to do otherwise:
* Usage examples - we need statistical analysis of a large corpus of open source code to find good real-world usage examples, so we'll leverage Sourcegraph for that (it already has that data.)
* Respecting repository permissions, OAuth integration, etc.; very important in enterprise environments, super complex/annoying to do. Sourcegraph already has all this data about your github/gitlab/bitbucket repos, user accounts, etc. and so maybe you can one-click connect doctree to a Sourcegraph instance to gain this functionality if you're some large enterprise that needs it.
I think there are some great synergistic ways doctree will work with Sourcegraph if you use that (or are OK with it contacting Sourcegraph.com for public code, but very important to make that respectful / opt in.)
I want to be clear, though, doctree is 100% open source, it'll be a proper OSS project - just want to make a useful tool for everyone first and foremost.
I think "Why is this open source?", though, is what got you down-voted because it implies it should be closed source, when folks obviously prefer open source.
Hope that helps!
* 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-...
[1] https://github.com/sourcegraph/doctree/tree/main/doctree/ind...
[2] https://github.com/sourcegraph/doctree/blob/main/doctree/sch...
Figuring out sourcecode-to-apidocs for one language is annoying, and figuring it out in the context of multi-language monorepos is exhausting. Then on top of that, I want to fail the build if someone adds public APIs to a library and doesn't document them! Now I have to go back to all my doc generators and get some kind of metadata out of them??????? And what if I want to make my docs pretty, and link to each other across languages?????? SFLSJHDFKJSDHKJF
So, this is great. A small dream, coming true. Best of luck to y'all!
edit: No longer! Hopefully someone benevolent picked it up
| Welcome to the doctree.dev demo site!
|---
| Enter your github oauth2 token to see it workWhich standard was that? I thought only example.com was special-cased?
It wasn't formalized, but that doesn't really matter. It was well known and commonly done.
In fact, it couldn't have been formalized, because the TLDs were limited and by definition any non standard TLD was for internal use only. It would make no sense to have a defined standard for an impossible situation.
No, there never was any guarantee that the existing TLDs were all that would exist ever, so non-standard TLDs were just that: non-standard, undefined what happens to them. And you even provided a counter-example: .test is explicitly reserved by an internet standard to never be in public DNS and thus safe to use for testing purposes.
Pow used .dev and .test in the 2000s-2010s
It was definitely available to purchase when I commented
Good news is we've got doctree.org, so will be using that instead. I've removed all references to the other domain.
If it was a good samaritan, shoot me an email -> stephen@sourcegraph.com
So sorry that the site isn’t up yet. We’ll update the README soon to reflect that. If folks are interested in trying out a super early version, there’s the Docker run command and if you’d like to help us realize this vision, please join our Discord! https://discord.gg/vqsBW8m5Y8
Something I've always wanted is better multi-language documentation support. kLike suppose I have a c++ project that is integrated to python with pybind11. The python bindings may be the highlevel interface, but sphinx doesn't make it easy (as far as I know) to integrate python documentation generated from doc strings with c++ doxygen style briefs, especially in a way that lets you navigate seamlessly between the two.
I wonder if you have considered a use-case like this?
Linking between the two may be tougher (showing you with confidence they're related), but maybe possible for us to do something there, not sure yet.