rustdoc-text-0.1.0 is not a library.
Visit the last successful build:
rustdoc-text-0.2.0
rustdoc-text
A lightweight CLI tool to view Rust documentation as plain text (Markdown) in the terminal.
Similar to tools like pydoc
and godoc
, but for Rust documentation.
Features
- View documentation for any Rust crate directly in your terminal as Markdown
- Access documentation locally (builds as needed) or from docs.rs
- Lightweight and fast with minimal dependencies
- Simple command-line interface
Installation
Usage
# View documentation for a crate
# View documentation for a specific item in a crate
# View documentation from docs.rs (instead of building locally)
# Get help
How it works
This tool:
- Fetches Rust documentation (either by building locally or from docs.rs)
- Extracts the main content section from the HTML
- Converts the HTML to Markdown using the htmd library
- Outputs clean, readable Markdown to stdout
Why Markdown?
Markdown is a lightweight markup language that's very readable as plain text, making it ideal for terminal output. It preserves the structure of the documentation while being much more readable than raw HTML.
Dependencies
htmd
: For HTML to Markdown conversionclap
: For command-line argument parsingreqwest
: For fetching online documentationanyhow
: For error handlingscraper
: For HTML parsing
License
This project is licensed under the MIT License - see the LICENSE file for details.