Skip to main content

No project description provided

Project description

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

Repo map

โ”œโ”€โ”€ .github
โ”‚   โ””โ”€โ”€ workflows
โ”‚       โ”œโ”€โ”€ ci.yaml
โ”‚       โ””โ”€โ”€ publish.yaml
โ”œโ”€โ”€ python
โ”‚   โ””โ”€โ”€ repo_mapper
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ __main__.py       # Main CLI entry point
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ core
โ”‚   โ”‚   โ”œโ”€โ”€ domain
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ file_node.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ file_tree.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ repo_file.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ret_codes.rs
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ transform.rs  # Where the file tree is generated
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ utils.rs
โ”‚   โ”‚   โ”œโ”€โ”€ parsing
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ 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
โ”œโ”€โ”€ .pre-commit-config.yaml
โ”œโ”€โ”€ Cargo.lock
โ”œโ”€โ”€ Cargo.toml
โ”œโ”€โ”€ 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.

Project details


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.4.0.tar.gz (23.8 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.4.0-cp313-cp313-win_amd64.whl (849.6 kB view details)

Uploaded CPython 3.13Windows x86-64

repo_mapper_rs-0.4.0-cp313-cp313-manylinux_2_34_x86_64.whl (965.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (817.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

repo_mapper_rs-0.4.0-cp312-cp312-win_amd64.whl (850.2 kB view details)

Uploaded CPython 3.12Windows x86-64

repo_mapper_rs-0.4.0-cp312-cp312-manylinux_2_34_x86_64.whl (966.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (817.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

repo_mapper_rs-0.4.0-cp311-cp311-win_amd64.whl (850.3 kB view details)

Uploaded CPython 3.11Windows x86-64

repo_mapper_rs-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl (966.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (819.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

repo_mapper_rs-0.4.0-cp310-cp310-win_amd64.whl (850.2 kB view details)

Uploaded CPython 3.10Windows x86-64

repo_mapper_rs-0.4.0-cp310-cp310-manylinux_2_34_x86_64.whl (966.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (819.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: repo_mapper_rs-0.4.0.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for repo_mapper_rs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1b10da208bf18f6a9fcae168af8647afc35378756a64fb8b2d3dc7a56f12840b
MD5 2aab7b3450283f41769fb17b8a6b4356
BLAKE2b-256 ab92a86236660a5820e36b6bb9f76b3d15fb2169b7795a94ca84df0bb8ff409a

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ffc14e422fe1bfbc354a5987bf41b619594dec95387621a071b3e2e29fd4c764
MD5 156ef1b38055c2f8c47b44cbf5e6cc26
BLAKE2b-256 80b894e8fa92dcb29a1bcd5544b494714d4b76318b08b9778eab8e74e7bb37d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 78139929709acb97adf5cbe2126685f421cbc94565c56fcdc6a4a7789996e27c
MD5 f846c221cf69279aac5aee799ebfa94a
BLAKE2b-256 330b04195e7c3d962952b113cf0a15db041b2805997cfbe127919dc8dea1ffe4

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bffde57100266dfbf0f1ec00354aff174bdc946093c11bd894930e33f8189600
MD5 e46da46257cb05cb19ec43b35e530399
BLAKE2b-256 fe002e8f622d325fbd1887fad2b71323ce29e933851a60ce38d50dd27b136ae8

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8d2fe43e5ccf6e33337ad81aa37874440574e5dc3ce673388c7e051a598c5638
MD5 2d399b8a26bb886518e9a6cd3792f9c9
BLAKE2b-256 773ad8bf8055d1c5d1b25fe29745d050f1c14373d58a6a2ed3d375e2959f39f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 916aa59fea3307901c68e6d181c3fcd703f2f3170976ea4e4977aff5fbcc7a4e
MD5 d41c05d5ec5bedef82dafc9fdf45cfe1
BLAKE2b-256 7c2aeed5594e26ebc1ec186b813500ee9ec944154552c626ad5f1f1852e6c0c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7016d60abe7077f4f2f8243909ba444c99b4e1d2d72a34fcb0ec53725c1ef2d5
MD5 0105fd26fc3267aa9b3129ab732eca19
BLAKE2b-256 a179765fdd8680b2b314d4ce917aec5e0d73a3d95f5cd6137996310263dd1b41

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 02036902dea2939d2e92eda76141a0c7cc1175c198d5961a8a272dbb23cb189c
MD5 26dfb1b22ad1303e4d40d79a7464014e
BLAKE2b-256 e550d64df5b7e376d2b41edf5ff3679dca789547f67469b5d0b337f8e71c26d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a7deea6586d9c85a02ac1659ed4d6555ce361e694666f0ff6b403ba3e5ccaf87
MD5 c473da8385aee9bc90119aaf8a182224
BLAKE2b-256 91e411c6b1bea03b73cfe211fa1a8aa2c36125fc25c49fa5bbe87104e91b4261

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6eb29c7b40b88dfb0c4fa59f712ab9e868f6d23c8c18c725a9134eefdfef72a
MD5 6193bdc0325e8d374d2624d49b41b6f5
BLAKE2b-256 91702023f7460cd80b07700bafb3aaa566d2c710911be9502f7ce08d22743026

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 efa2fd393536e92098138bcf4bb61bdbf5579f2eafc0e793cb26c2d71e73126c
MD5 1e8cfd175c5f7b9667af9a1e5918fe54
BLAKE2b-256 c9dec2100d7fe7aba09365349869a02bda869806f53925a983d48f45065b6986

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 387456783aacdfdbd93478d1764bdd58a789377ca6088c24eda76f395d0015cf
MD5 c26b5ba5cdb24ebb42b736a64875685a
BLAKE2b-256 89845a62eb97956a5a2298ba29a2a475c9ae7572065435a2592591919cebdb29

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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.4.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f450deb310a61f80ed03a8487d5f972845a4dab931f2ba2413e9811079019903
MD5 0b3a2789ed4e56ce2802f14c74a79738
BLAKE2b-256 1bc1a758683f287720264bc90e951dcc8142c5643bb8db2ddf4398dfc27e6cd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper_rs-0.4.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