{"id":13502992,"url":"https://github.com/sminez/roc","last_synced_at":"2025-04-12T13:42:41.532Z","repository":{"id":57661620,"uuid":"241228030","full_name":"sminez/roc","owner":"sminez","description":"Rust command line documentation searching","archived":false,"fork":false,"pushed_at":"2024-06-19T14:54:10.000Z","size":109,"stargazers_count":51,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T08:22:48.143Z","etag":null,"topics":["command-line","command-line-tool","documentation","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sminez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2020-02-17T23:16:41.000Z","updated_at":"2025-01-27T11:33:03.000Z","dependencies_parsed_at":"2024-11-13T23:04:13.183Z","dependency_job_id":null,"html_url":"https://github.com/sminez/roc","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.1875,"last_synced_commit":"b075ef6ed01a825e79056349f0903e5599ab259d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sminez%2Froc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sminez%2Froc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sminez%2Froc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sminez%2Froc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sminez","download_url":"https://codeload.github.com/sminez/roc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248574626,"owners_count":21127047,"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","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":["command-line","command-line-tool","documentation","rust"],"created_at":"2024-07-31T22:02:32.864Z","updated_at":"2025-04-12T13:42:41.509Z","avatar_url":"https://github.com/sminez.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"roc -- cli rust documentation that rocks\n----------------------------------------\n[![Build](https://github.com/sminez/roc/workflows/Build/badge.svg?branch=master)](https://github.com/sminez/roc/actions?query=workflow%3ABuild)\n\n`go doc` style command line searching through documentation for rust crates.\n\n`roc` piggybacks off of the HTML documentation generated by rustdoc, so you will\nneed to run `cargo doc` before using roc if you want to look at anything other\nthat the standard library. `roc` only aims to provide a quick interface to track\ndown documentation summaries: most top level details will be shown but you\nshould pass the `-o` flag to your query if you need to read the full\ndocumentation. This will open the local doc page using your default web browser.\n\n### Some caveats\n* This is very much a work in progress! There are multiple features that need\n  implementing (grepping for partial matches, bash/zsh completion scripts,\n  hoogle style searching by signature etc) and several known bugs, mostly in\n  output formatting. If you have a use case that is not currenly covered or a\n  ideas for functionality that could be added, please raise an issue on the\n  GitHub repo or a PR if you are happy to implement the features yourself.\n* `roc` assumes that you are using rustup and that you have stdlib docs downloaded.\n  If not, you will be unable to search the docs of anything in `std`.\n* `roc` requires that you build any dependency crate docs before they can be found.\n  The simplest workflow is to run `cargo doc` whenever you update your\n  `Cargo.toml` in order to ensure that your local generated docs are up to date.\n\n### Example usage\n```bash\n# show summary comment for the Eq trait from stdlib\n$ roc std::cmp::Eq\nTrait for equality comparisons which are equivalence relations.\n\nThis means, that in addition to a == b and a != b being strict inverses, the equality must\nbe (for all a, b and c)\n\n\n# generate the documentation for roc itself\n$ cd roc \u0026\u0026 cargo doc\n\n\n# list out all of the known crates that we can find from this directory\n$ roc .\n:: known crates\natty                  bit_set               bit_vec               bitflags              cfg_if\nclap                  clap_derive           colored               debug_unreachable     futf\nheck                  html5ever             implementors          indexmap              lazy_static\nlibc                  log                   mac                   markup5ever           markup5ever_rcdom\nos_str_bytes          phf                   phf_shared            precomputed_hash      proc_macro2\nproc_macro_error      proc_macro_error_attr quote                 rocdoc                select\nserde                 siphasher             std                   string_cache          strsim\nsyn                   syn_mid               tendril               term_size             termcolor\ntextwrap              time                  unicode_segmentation  unicode_width         unicode_xid\nutf8                  vec_map               xml5ever\n\n\n# show top level summary details for the roc crate\n$ roc rocdoc\nroc - command line doucmentation that rocks\n\nroc is an attempt at bringing godoc style quick docs searching to the command\nline for rust. It doesn\\'t generate any documentation itself, instead it relies\nentirely on the local HTML output created by running cargo doc in the root of\nyour crate. You will need to have rust installed via rustup and have the std lib\ndocs downloaded in order to look at std lib.\n\n:: modules\nlocate  Locate the generated docs that we have available within the current workspace\nparse   Parse the contents of rustdoc generated HTML files\npprint  Formatted output and pretty printing\n\n\n# show specific information about the Locator struct\n$ roc rocdoc::locate::Locator\npub struct Locator { /* fields omitted */ }\n\nA Locator handles mapping a user query string from the command line to a file\nlocation on disk. It also provides information about what kind of documentation\nfile it has found so that the appropriate parsing of the file contents can be\ncarried out.\n\npub fn new(query: String) -\u003e Self\npub fn target_file_path(\u0026self) -\u003e Option\u003cString\u003e\npub fn determine_tagged_path(\u0026self) -\u003e Option\u003cTaggedPath\u003e\n```\n\n### Curent flags\n```\n-l, --list   list out modules under the current path\n-o, --open   open the selected doc page in the browser (local copy)\n```\n\n### Local file system doc locations\n```\nstd::* -\u003e $(rustc --print sysroot)/share/doc/rust/html/std\n*      -\u003e $(dirname Cargo.toml)/target/doc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsminez%2Froc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsminez%2Froc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsminez%2Froc/lists"}