| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Codebase map CLI. Compact, parsed, friendly to humans and LLM tooling.
Rust-aware today. tree (no --detail) works on any repo. Item parsing, refs, deps, graph are Rust-only (parsed via syn). Other languages render as bare file names. Respects .gitignore in or out of a git work tree.
cargo install rmap| Command | Purpose | Rust-only? |
|---|---|---|
| tree | Brace map of files/dirs. --detail inlines parsed items. | No (items: yes) |
| module | Focused index of a subtree or file, items always inlined. | Items: yes |
| refs | Find defs + uses of one or more identifiers. | Yes |
| deps | File-level dep graph from use and mod statements. | Yes |
| graph | Reachability subgraph from an entry file (forward or reverse). | Yes |
| body | Print the full source body of a Rust item by name. | Yes |
Orient on an unfamiliar repo:
rmap tree --depth 2 # shape of the repo
rmap tree --detail # tree + Rust items per .rs file
rmap tree --detail --lines # add :start-end ranges, :LOC per fileDrill into a subtree or file:
rmap module computer # fuzzy: any unique path suffix
rmap module src/domain/hull # exact directory
rmap module src/walk.rs # single-file item indexFind an identifier:
rmap refs enumerate # all defs + uses
rmap refs Filter --defs-only # where defined?
rmap refs render_file --uses-only # who calls?Print a symbol's source body:
rmap body run_refs # whole fn body, verbatim
rmap body Foo::bar # impl method
rmap body Filter # struct / enum / trait body
rmap body Foo --kind impl # the `impl Foo { ... }` blockTrace dependencies:
rmap deps # whole-repo forward graph
rmap deps --reverse # who imports each file
rmap deps --ext # include external crate edges
rmap deps src/walk.rs # focus: in/out/ext for one file
rmap graph # brace tree from crate root
rmap graph src/walk.rs --reverse # who reaches walk.rs?
rmap graph --mermaid # mermaid `graph TD` blockExplore a dependency's source (--crate, global flag on every lens):
rmap tree --crate serde --depth 2 # shape of a vendored crate
rmap module --crate tokio runtime # focused index inside a crate
rmap body Deserialize --crate serde # read a symbol's source
rmap refs spawn --crate tokio # defs + uses inside the crate
rmap body Foo --crate serde@1.0.210 # pin an exact version--crate SPEC rebases every path onto a crate's unpacked source in the local cargo registry ($CARGO_HOME/registry/src/...). Offline only — the crate must already be fetched (cargo fetch / any build). SPEC is name or name@version; a bare name uses the version pinned by the nearest Cargo.lock, falling back to the highest vendored version (with a warning).
rmap tree --detail:
src {
parse.rs { struct ParseOptions, fn render_file, fn render_str, fn render_items }
walk.rs { enum Node { fn name }, struct Filter, fn enumerate, fn list_paths }
}
rmap tree --detail --lines:
walk.rs:200 { enum Node:13-24 { fn name:27-31 }, struct Filter:34-42,
fn enumerate:44-67, ... }
rmap refs Filter:
src/main.rs:396:24 use struct-lit Filter src/refs.rs:28:25 use import Filter src/walk.rs:37:12 def struct Filter src/walk.rs:47:40 use type Filter
rmap refs Filter --excerpt 1 (with source context):
src/walk.rs:37:12 def struct Filter
36 | #[derive(Default)]
> 37 | pub struct Filter {
38 | /// Skip paths whose relative path contains any of these substrings.
rmap refs Filtr (typo → suggestion):
no hits for `Filtr` did you mean: Filter, filter?
rmap deps src/walk.rs:
src/walk.rs out: - in: src/refs.rs, src/render.rs
rmap graph --depth 2:
src/main { deps, graph { deps* }, parse, refs { walk }, render { parse*, walk* }, walk* }
Markers: * revisit, ~ back-edge, {…} depth limit hit.
rmap body run_refs --in src/main.rs:
// src/main.rs:566-597 fn run_refs
fn run_refs(args: RefsArgs) -> ExitCode {
...
}
rmap agent >> CLAUDE.md # or AGENTS.md, .cursorrules, ...Prints a short markdown snippet telling Claude/Cursor/Codex/... to reach for rmap instead of find/ls/tree when locating code.
Run rmap --help for the full surface. Highlights:
Global
tree
module
refs <NAME>...
deps [PATH]
graph [ENTRY...]
body <NAME>...
MIT.
| Back | FazBrowse Home | New Git URL |