Skip to main content

repo-mapper-rs ๐Ÿฆ€

PyPI Downloads

Rust implementation of repo_mapper.

What it does:

A CLI tool to scan a code repository and generate a structured file tree map, inserted into your README.md written in Rust. The map is fenced inside a markdown code block under a # Repo map section, if one exists the existing one is replaced, else it is appended to the bottom of the README.md.

Supported functionality:

  • .gitignore
  • file extension filtering
  • directory exclusion
  • ignore hidden files

Installation

pip install repo-mapper-rs

Or

uv add repo-mapper-rs

Example usage:

python -m repo_mapper \
  --repo-root "/path/to/my_repo" \
  --readme-path "/path/to/my_repo/README.md" \
  --gitignore-path "/path/to/my_repo/.gitignore" \
  --allowed-exts "py,rs,toml" \
  --ignore-dirs ".venv,target" \
  --ignore-hidden

This command:

  • Traverses /path/to/my_repo
  • Respects files excluded in .gitignore or listed in --ignore-dirs
  • Includes only files with extensions .py, .rs, .toml. It's recommended to use this parameter to avoid unexpected files being added to the map.
  • Skips hidden files and directories (those starting with a dot)
  • Inserts or updates the # Repo map section in the README

Args

Argument Type Required Default Description
--repo-root str โœ… Path to the root of the repository to scan
--readme-path str โŒ './README.md' Path to the README file that will be modified
--gitignore-path str โŒ './.gitignore' Path to the .gitignore file
--allowed-exts Comma-separated str โŒ 'py,md,toml,lock,yaml,ipynb' Extensions to include (e.g. 'py,rs,md'). Note this is overruled by the .gitignore.
--ignore-dirs Comma-separated str โŒ '.git,.venv,build,dist' Directories to exclude (e.g. '.venv,target'). If not supplied, all directories will be evaluated. Note this is overruled by the .gitignore.
--output-mode str โŒ 'readme' Output mode to display the tree: choices=['readme', 'shell'].
--ignore-hidden Flag (no value) โŒ If set, hidden files and directories will be ignored
--dirs-only Flag (no value) โŒ If set, only directories and subdirectories will be mapped (useful with larger codebases).

New Features:

0.4.0

  • repo-map-desc:
    • adding repo-map-desc: to a line will treat everything after repo-map-desc: up to the end of the line as a file description.
    • that description is added to the corresponding file in the repo map
    • it will ignore any characters before repo-map-desc: (e.g. comments or code)
    • only apply to the first matching line per file

0.5.0

  • .repo-map-desc files
    • add a .repo-map-desc file in a directory with text matching the repo-map-desc: prefix to the file
    • that description is then added to the dir on the repo-map
    • only apply to the first matching line per file

Example

(in root/some_dir/.repo-map-desc)

repo-map-desc: this is the description that shows up in the repo map for the some_dir directory

Repo map

โ”œโ”€โ”€ benches
โ”‚   โ””โ”€โ”€ repo_mapper_rs_benchmark.rs
โ”œโ”€โ”€ python
โ”‚   โ””โ”€โ”€ repo_mapper                  # the python CLI interface that calls the rust core
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ __main__.py              # Main CLI entry point
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ core                         # the core rust code that does the work
โ”‚   โ”‚   โ”œโ”€โ”€ domain                   # main domain objects handles pure transformations of the files
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ file_tree.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ repo_entry.rs        # simple implementation of a repo object
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ret_codes.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ transform.rs         # Where the file tree is generated
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ utils.rs
โ”‚   โ”‚   โ”œโ”€โ”€ parsing                  # convert interactions with the outside world into something useful
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ args.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ context.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ file_text.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ gitignore.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ readme.rs
โ”‚   โ”‚   โ”œโ”€โ”€ adapters.rs
โ”‚   โ”‚   โ””โ”€โ”€ mod.rs
โ”‚   โ”œโ”€โ”€ api.rs                       # The translation layer between python and rust
โ”‚   โ””โ”€โ”€ lib.rs
โ”œโ”€โ”€ tests
โ”‚   โ””โ”€โ”€ integration_tests.rs         # component level integration tests using FakeFileSystem
โ”œโ”€โ”€ Cargo.lock
โ”œโ”€โ”€ Cargo.toml
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md                        # Installation and simple docs
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ uv.lock

(generated with repo-mapper-rs)
::

Ret codes

RetCode int description
NoModification 0 The Repo map reflects the current state of the repo.
ModifiedReadme 1 The README was updated.
FailedParsingFile 2 Failed to read the file to string.
FailedToWriteReadme 3 Failed to write the modified README to file.
InvalidFilename 4 The given README.md or .gitignore path does not match the expected basename.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_mapper_rs-0.5.0.tar.gz (32.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

repo_mapper_rs-0.5.0-cp313-cp313-win_amd64.whl (563.3 kB view details)

Uploaded CPython 3.13Windows x86-64

repo_mapper_rs-0.5.0-cp313-cp313-manylinux_2_34_x86_64.whl (681.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.5.0-cp313-cp313-macosx_11_0_arm64.whl (581.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

repo_mapper_rs-0.5.0-cp312-cp312-win_amd64.whl (564.2 kB view details)

Uploaded CPython 3.12Windows x86-64

repo_mapper_rs-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl (681.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.5.0-cp312-cp312-macosx_11_0_arm64.whl (582.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

repo_mapper_rs-0.5.0-cp311-cp311-win_amd64.whl (564.3 kB view details)

Uploaded CPython 3.11Windows x86-64

repo_mapper_rs-0.5.0-cp311-cp311-manylinux_2_34_x86_64.whl (682.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.5.0-cp311-cp311-macosx_11_0_arm64.whl (582.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

repo_mapper_rs-0.5.0-cp310-cp310-win_amd64.whl (564.7 kB view details)

Uploaded CPython 3.10Windows x86-64

repo_mapper_rs-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl (682.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.5.0-cp310-cp310-macosx_11_0_arm64.whl (582.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file repo_mapper_rs-0.5.0.tar.gz.

File metadata

  • Download URL: repo_mapper_rs-0.5.0.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repo_mapper_rs-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5c89e9b37ecf098ef34d5f65c2ffb073cb647229f588da572ef5ef9cc2253a80
MD5 dc2c454a463ec520a31534f0c1bbd60d
BLAKE2b-256 bf0ac6752e1f520f831d3e57bffebcb7053a627b8a728d193b5450ed6559c8cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0.tar.gz:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4ac01e66ac3e3753adf441395cb745da0a4308950494b385c1ed292d5d2b3621
MD5 43dcbde508d44f491fac84bd16f25a76
BLAKE2b-256 31842b13382dae8307173180fa5f5018e060ecc21f6f2482221e29fc5ff9697f

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9eb98f3d8161cc001f49ed5f2538e9e63065344685b44c7a762b76daafee0626
MD5 9b99014f60faed7b6469f08231d8bedd
BLAKE2b-256 1a2020352720446ef9d5a5227509b64b12fdc6a91de73a7b796e2aa25ef2bfb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 785037f4e002f9d2b8026910bf96fe77d27d93462996ca6ce8483aba3483f327
MD5 3a84b105f90110bd4a4392ec7496b54e
BLAKE2b-256 133e59b1d5591dd891ea4e440ea6d4a31ea103c8b5438fcd8c60a9075264cd20

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3bf43769d00466501e135a2721fe7775a84ebfb510bad542fa155b2c04c8a165
MD5 24d4195b17aee7b809cffc8f1a585665
BLAKE2b-256 131026b4b05e8bed820d47eb559d3748ae604f14df7f4db11b9d66309affa649

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5f1c438a0c9476890a0a1cc5717e7839eec2c17e299378303f836f1f2e00a7de
MD5 5295acca48d74284761302221cfe5927
BLAKE2b-256 120f5bd36f6b94fa27cd141f888d0fc84b9407387809137aeaf0b33192d55794

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f78337573c648c3015694816ace2a648ec4aa0987c5ef83e7165d5e9e479a108
MD5 a76dbb3a4a16ffd4b0e9fd54971b5620
BLAKE2b-256 4b388bcafbe7126fa9f8409a84b9fc7291b26d17d788350c32028a24a6bbf6ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0b17595ea78e549a68e5fe249959c98fb8ec397edf6344796eb016ae7dde5439
MD5 3c8d1f5e0f088c97f5d798ffe63646e6
BLAKE2b-256 a62c8d611913223de0abee0eb554fdc7ab1ae7d002b342201c6787264943f246

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f5aa192df26e839ca8ce901051543ae99ec328e2a116382330b518279d23525c
MD5 7885e681598c3a9c02674a158093417a
BLAKE2b-256 1318d4ba8730ef41565bd937d3d92a350fc6ac7b2adac47742eee019ab95bf30

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be1ecfd8a840daea792d049f87fa5593c8be2b17e74dacd15ec10f6535259754
MD5 eaff7a3fc040c466a5accc1c9f1bb0b5
BLAKE2b-256 2eaca50d285419197b4d1e8961ec890084ff7f676a47943a07130f0a8a597ef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b17874fab67bc61c03b0c88125adb940f019fc90e18e41f2180632e62ac552a1
MD5 a7dbc659ea40e9a61456f67a735c91c0
BLAKE2b-256 9e04f415936a9e882b7b777db4bd30e040b0b7074c1cc1e153a754baf36ea521

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp310-cp310-win_amd64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c97b8029019e5a5b96684076e875aefd45ca91f49cba80fdb3b3385b0718e2b9
MD5 ec790213de8a5b838a85bc1d77257a41
BLAKE2b-256 4b9b56a7be2a52bd0a0f33695a9d0fe6109e8587d95eb6e17d07eb9d84b25044

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper_rs-0.5.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.5.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 62b06c819a8550ffefccb714d172eed44c4037596119d9f8129d8dfbd4f57af0
MD5 cfc214408f3e4c8f8819cfc0fbb955b2
BLAKE2b-256 6260b9148ce7a814913436035135730f6f31642c55ab5cb533ebb3f0e3f17a0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.5.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yaml on second-ed/repo-mapper-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page