{"id":30437457,"url":"https://github.com/alexeev-prog/rtfm","last_synced_at":"2025-08-23T03:49:52.090Z","repository":{"id":302339583,"uuid":"1012091923","full_name":"alexeev-prog/rtfm","owner":"alexeev-prog","description":"RTFM - blazingly fast util for searching manuals \u0026 docs","archived":false,"fork":false,"pushed_at":"2025-08-05T10:13:59.000Z","size":2277,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-05T12:12:13.471Z","etag":null,"topics":["blazing-fast","blazingly-fast","cli","documentation","linux","man","manual","rust","tldr","util"],"latest_commit_sha":null,"homepage":"https://alexeev-prog.github.io/rtfm/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexeev-prog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2025-07-01T19:53:30.000Z","updated_at":"2025-08-05T10:14:02.000Z","dependencies_parsed_at":"2025-08-05T12:20:36.685Z","dependency_job_id":null,"html_url":"https://github.com/alexeev-prog/rtfm","commit_stats":null,"previous_names":["alexeev-prog/rtfm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alexeev-prog/rtfm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeev-prog%2Frtfm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeev-prog%2Frtfm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeev-prog%2Frtfm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeev-prog%2Frtfm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeev-prog","download_url":"https://codeload.github.com/alexeev-prog/rtfm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeev-prog%2Frtfm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740175,"owners_count":24812636,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blazing-fast","blazingly-fast","cli","documentation","linux","man","manual","rust","tldr","util"],"created_at":"2025-08-23T03:49:51.363Z","updated_at":"2025-08-23T03:49:52.065Z","avatar_url":"https://github.com/alexeev-prog.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rtfm\n\n\u003ca id=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- \u003cimg src=\"https://raw.githubusercontent.com/alexeev-prog/rtfm/refs/heads/main/docs/logo.png\" width=\"250\" alt=\"RTFM Logo\"\u003e --\u003e\n\n  \u003ch3\u003eBlazingly fast terminal utility for exploring man pages and tldr cheatsheets\u003c/h3\u003e\n\n  \u003cdiv\u003e\n    \u003ca href=\"https://alexeev-prog.github.io/rtfm/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Docs-Online-blue?style=for-the-badge\" alt=\"Docs\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/alexeev-prog/rtfm/blob/main/LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/License-GPL_v3-blue?style=for-the-badge\u0026logo=gnu\" alt=\"License\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/alexeev-prog/rtfm/stargazers\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/stars/alexeev-prog/rtfm?style=for-the-badge\u0026logo=github\" alt=\"Stars\"\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/alexeev-prog/rtfm?style=for-the-badge\" alt=\"Top Language\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/count/alexeev-prog/rtfm?style=for-the-badge\" alt=\"Language Count\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/alexeev-prog/rtfm?style=for-the-badge\" alt=\"License\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/alexeev-prog/rtfm?style=for-the-badge\u0026color=critical\" alt=\"Issues\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/alexeev-prog/rtfm?style=for-the-badge\" alt=\"Last Commit\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/alexeev-prog/rtfm?style=for-the-badge\" alt=\"Contributors\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\" style=\"margin: 15px 0\"\u003e\n  \u003cimg src=\"https://github.com/alexeev-prog/rtfm/actions/workflows/deploy_docs.yml/badge.svg\" alt=\"Deploy docs\"\u003e\n  \u003cimg src=\"https://github.com/alexeev-prog/rtfm/actions/workflows/release.yml/badge.svg\" alt=\"Release build\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/alexeev-prog/rtfm/refs/heads/main/docs/pallet-0.png\" width=\"600\" alt=\"Color Palette\"\u003e\n\u003c/div\u003e\n\n \u003e Read the f*cking manual NOW!\n\nRTFM - blazingly fast util for exploring man pages and tldr cheatsheets.\n\nWe are support [tldr](https://github.com/tldr-pages/tldr). You should install `man` and `tldr`.\n\n![img.png](https://raw.githubusercontent.com/alexeev-prog/rtfm/refs/heads/main/docs/img.png)\n\n![img_1.png](https://raw.githubusercontent.com/alexeev-prog/rtfm/refs/heads/main/docs/img_1.png)\n\n## Building\n\n```bash\n# Clone\ngit clone https://github.com/alexeev-prog/rtfm\ncd rtfm\n\n# Build\ncargo build --release\n\n# Run:\n./target/release/rtfm -V\n```\n\n## Usage\n\n```\nUsage: rtfm [OPTIONS] [COMMAND]\n\nCommands:\n  getmans  \n  getman   \n  help     Print this message or the help of the given subcommand(s)\n\nOptions:\n  -m, --manpage \u003cMANPAGE\u003e  [default: 1]\n  -h, --help               Print help\n  -V, --version            Print version\n```\n\n## Features\n\n- **Dual-source documentation**: Access both man pages and tldr cheatsheets\n- **Instant search**: Trie-based command search with real-time filtering\n- **Syntax highlighting**: Intelligent highlighting for documentation content\n- **Search within pages**: Find text in documentation with match navigation\n- **Caching system**: LRU cache for fast document retrieval\n- **Responsive TUI**: Smooth terminal interface with keyboard navigation\n- **Debounced input**: Efficient handling of rapid user input\n\n## Technical Architecture\n\n### Core Components\n```mermaid\ngraph TD\n    A[TUI Interface] --\u003e B[AppState]\n    B --\u003e C[ManDb]\n    C --\u003e D[Trie Structure]\n    C --\u003e E[Document Cache]\n```\n\n### Data Flow\n1. User inputs trigger command filtering\n2. Trie structure performs prefix search\n3. Selected command fetches document from cache or external source\n4. Content is parsed and displayed with syntax highlighting\n5. Search queries scan content and highlight matches\n\n## Building and Installation\n\n### Prerequisites\n- Rust 1.70+\n- Man-db\n- tldr (optional but recommended)\n\n### Installation\n```bash\n# Build from source\ncargo install --path .\n\n# Or via cargo\ncargo install rtfm\n```\n\n### Build Options\n```bash\n# Debug build\ncargo build\n\n# Release build (recommended)\ncargo build --release\n\n# Build with all optimizations\nRUSTFLAGS=\"-C target-cpu=native\" cargo build --release\n```\n\n## Usage\n\n### TUI Mode (Default)\n```bash\nrtfm\n```\n\n### Key Bindings\n| Key               | Command List        | Man Page          | Search          |\n|-------------------|---------------------|-------------------|-----------------|\n| `Tab`             | Switch focus        | Switch focus      | N/A             |\n| `↑/↓`             | Navigate commands   | Scroll            | N/A             |\n| `Page Up/Down`    | Jump 50 commands    | Jump 30 lines     | N/A             |\n| `/`               | N/A                 | Enter search      | N/A             |\n| `n/N`             | N/A                 | Next/prev match   | N/A             |\n| `t`               | N/A                 | Toggle man/tldr   | N/A             |\n| `Enter`           | Load documentation  | N/A               | Apply search    |\n| `Esc`             | Clear input         | Focus command     | Cancel search   |\n\n### CLI Commands\n```bash\n# List commands starting with 'ls'\nrtfm getmans ls\n\n# View man page for ls\nrtfm getman ls\n\n# Use specific man section\nrtfm --section 3 getman printf\n```\n\n## Technical Specifications\n\n### Data Structures\n- **Trie**: Efficient prefix search for command names\n- **LRU Cache**: Caches parsed documentation (size: 100 entries)\n- **Arc\u003cMutex\u003e**: Thread-safe caching with async support\n\n### Algorithms\n- **Debounced Input**: 150ms delay before triggering search\n- **Scroll Optimization**: Visible range tracking for large lists\n- **Syntax Highlighting**: Rule-based text segmentation\n- **Search Matching**: Case-insensitive substring matching\n\n### Dependencies\n| Crate        | Purpose                     |\n|--------------|-----------------------------|\n| `crossterm`  | Terminal control            |\n| `tui-rs`     | Terminal UI framework       |\n| `tokio`      | Async runtime               |\n| `regex`      | Man page parsing            |\n| `clap`       | Command-line parsing        |\n| `anyhow`     | Error handling              |\n\n## Contributing\n\n1. Fork the repository\n2. Create feature branch (`git checkout -b feature/improvement`)\n3. Commit changes (`git commit -am 'Add new feature'`)\n4. Push to branch (`git push origin feature/improvement`)\n5. Create new Pull Request\n\n### Development Guidelines\n- Follow Rust 2024 edition conventions\n- Maintain 85%+ test coverage\n- Use `clippy` and `rustfmt` for code quality\n- Document public APIs with examples\n\n## Plans\n\n - [ ] fix low speed which switch from `man` to `tldr` mode.\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n```\nBlazingly fast util for searching manuals \u0026amp; docs\nCopyright (C) 2025  Alexeev Bronislav\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeev-prog%2Frtfm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeev-prog%2Frtfm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeev-prog%2Frtfm/lists"}