laibrary
laibrary extracts public API documentation from a library and outputs it in an LLM-friendly format. The endgame is to provide AI coding agents with all the context they need to use a particular dependency, but for now you can just use it manually on the CLI.
This project was inspired by Aider's repository map.
Features
- Outputs public symbols (e.g. functions) only.
- Outputs function signatures and documentation, but not the implementation.
- Only supports Rust for now, but any language supported by tree-sitter can be supported.
- Reads the source code directly, so it doesn't process the HTML of the generated documentation, thus keeping the output clean.
CLI Usage
To extract the documentation from a library, pass the name of the language and the path to the library. For example:
Library Usage
use generate_documentation;
use Path;
let path = new;
match generate_documentation