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.1.tar.gz (24.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.1-cp313-cp313-win_amd64.whl (582.8 kB view details)

Uploaded CPython 3.13Windows x86-64

repo_mapper_rs-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl (697.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.1-cp313-cp313-macosx_11_0_arm64.whl (593.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

repo_mapper_rs-0.4.1-cp312-cp312-win_amd64.whl (583.0 kB view details)

Uploaded CPython 3.12Windows x86-64

repo_mapper_rs-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl (697.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (593.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

repo_mapper_rs-0.4.1-cp311-cp311-win_amd64.whl (583.6 kB view details)

Uploaded CPython 3.11Windows x86-64

repo_mapper_rs-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl (698.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (594.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

repo_mapper_rs-0.4.1-cp310-cp310-win_amd64.whl (583.8 kB view details)

Uploaded CPython 3.10Windows x86-64

repo_mapper_rs-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl (698.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

repo_mapper_rs-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (594.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for repo_mapper_rs-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5295adaeba3d2acd91a1482779331add8c523e651224ccd1b243152015414228
MD5 4f70b68c36bbf7f014c421278e35f107
BLAKE2b-256 5ddc3e87cd74c9aff611e5f6cc5f1ab03e66656e9669523a03053b6fc2cc6328

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2aa8d336dcd5c656890bb9d0fd8995b013ff14336d4c9f14e41e6d1cb1e5ca5f
MD5 4d095ff8d02b530f6904ca05bf79b4e8
BLAKE2b-256 2fa965d5f268cbc7c37abd72590661682985930103cd8400aa66e0f83964ad71

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 733e25f7971ed2a7f14d30381cca46bdf7c35fa9c236ba1ac83178410326912d
MD5 43c7ded2f1ce053fae090d76f01037a3
BLAKE2b-256 ced27352a105b8252b502a32bdf06139231347d500e32470aa6293dabba65191

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 062158cf727eee7a1290da506139a5d468e0552148871481e00d976b12a7157b
MD5 6344eb7d6b5951ec1a53adab6fd912eb
BLAKE2b-256 d603f6ded0f6daad0f567ef2dec2376de79516cedbd3daf84a07652b219a2372

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c1c696b28e4bcc515b9a6b2426b1f218d1325a4c41db6469690d367a577fd60c
MD5 eef75d8d7f3fffd3dde6ae20b1b5ee6b
BLAKE2b-256 14c727a70a6bfa527e355a784b3d6be51af4786db13149b3954d1eb2c1bcea9f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ce0b20149126f04367689b22b831dc587043832910d124bb7a75145c8b0c224c
MD5 03899c5e4a08ad164b637b5761a5c3c8
BLAKE2b-256 c9f9a3517af5f1ad548c34791312bb6258132f603e7517c973087f9d2c02724a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f7953301db1926a48c90cef4136a1acb8c5a9cb28cf8ad049a74d10cc85c3fa
MD5 14a04b21c64e74b77b0929fc83406dc1
BLAKE2b-256 5002fc07c135242cd3c1eae5cda1fa48971fc4391110dc78186e7f8c232b14a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 84f0a363f57af9bbdd0940aa215356611d70327e9c2bac700c2f731155e9e755
MD5 334acbaf108d98b29142bfdbf454efed
BLAKE2b-256 5d39a901ec2a93094a5a4013a11a02eef69fe9d2252a51d33449e2bbee39fd40

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b388433706de5e0a33c1e50c900d95657301c10b36190edd5393c1118b8cbf4c
MD5 b4e06d8f8a2477b683a43dda2534f390
BLAKE2b-256 00bd6790f625db5f38f7b68b06b2faefe3222369b09e50e888f22506fe6dc99e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc4ee65c7707bcddf2487114704f74841f7fa25f175c870665798603f143d665
MD5 83a976bd74feaa5f769cadfd63212471
BLAKE2b-256 82a0b84746ecf0ff84fcaac77fe33191d78430cacd30f855e05e6f3514a76248

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b743d4e04a3d0de6be2fc17152908dd85fcd18faa1428898f83682188cb20c29
MD5 605db7ea5ad44f984809a16e716a602c
BLAKE2b-256 65527803e70b12adccfb697530fc75892b7bfb385bcdc836aa8788d34bc8cd95

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f074ec579b3f7235726ed2d63ee239ead921e9e073fdb6adb3586fea603d60c1
MD5 e9725de0bdd7624777aaaea889f1c4c5
BLAKE2b-256 072c4c5bc429952895e94a9870a7221cd3e3b1db8193ce63f5b94906a86a2547

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for repo_mapper_rs-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14bb1cdb0a387c9e70764376253917414e56c23f4276eb429df5b934892c2d59
MD5 2e9356e6449358ac0c5b8bbef6dc8eae
BLAKE2b-256 39014a73eafb0589fdba683290660cf3e8e8a46246bb332136f2089fb744aec9

See more details on using hashes here.

Provenance

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