Skip to main content

A library for extracting metadata out of a source repository.

Project description

repo-parser

This is a set of python scripts and tools for extracting metadata and structure out of a monorepo, for the purposes of generating a service registry, unified documentation, or other types of data out of the contents. It also contains some tooling designed around a new concept called "Implementation Decision Records" (idrs), designed to aid both implementation (especially where assisted by LLMs) and later code archaeology efforts.

It should be considered an experiment, rather than production software. It is inspired by my experiences in the software industry and being frustrated with current solutions being some combination of:

  • Time consuming to configure and maintain
  • Requiring the specification of redundant metadata (which is bound to get out of date)

Current assumptions:

  • The files you want to process fit into memory
  • You don't care about history (repo-parser gives a snapshot in time)

You can see a demo of a documentation site generated from this repo at:

https://repo-parser-demo.netlify.app/

[!NOTE] repo-parser is partly created with LLMs (specifically, Claude Code and ChatGPT), with heavy human curation.

Usage

Creating IDRs (Implementation Decision Records)

repo-parser includes a CLI tool (rp) for creating Implementation Decision Records (IDRs). IDRs are lightweight documents that capture both the intent and implementation details of code changes, designed to be committed alongside your code.

They are intended to be useful for both humans and computational agents (LLMs).

Why IDRs? Traditional design docs are too heavyweight for implementation. ADRs are great for decisions but lack implementation detail. IDRs bridge the gap—detailed enough to guide implementation, ephemeral enough to not become stale documentation.

Create a new IDR:

rp idr new "Your Feature Title"

This will create a new markdown file in the idrs/ directory with:

  • A UTC timestamp prefix (e.g., 202512301600)
  • A slugified version of your title
  • Pre-filled template with your git author name

Example:

rp idr new "Add last modified metadata"
# Creates: idrs/202512301600-add-last-modified-metadata.md

The IDR template includes sections for:

  • Problem Statement
  • Context
  • Goals and Non-Goals
  • Proposed Solution
  • Detailed Design
  • Implementation notes (ephemeral)

This feature was itself implemented using an IDR—see idrs/202512301631-idrs.md for more about the IDR format and philosophy.

Using repo-parser as a Library

For documentation generation and metadata extraction, see the example in example/example_parser.py.

An early version of repo-parser is available on pypi as https://pypi.org/project/repo-parser. Use at your own risk!

Local development

You can experiment with the local demo by running make example. It should live-reload as you make changes in the example/repo directory.

For other tasks, look at the (very simple) Makefile in the root directory.

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_parser-0.0.3.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

repo_parser-0.0.3-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file repo_parser-0.0.3.tar.gz.

File metadata

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

File hashes

Hashes for repo_parser-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8cef7f316a1986c50f910092d7bc69fe8f9320148f7bbf112af5da2642b0ed91
MD5 4ff6d73042326b6bd1f1f6a299658f18
BLAKE2b-256 69c9d15b5939bc47bb184b3d38b6e74f072b3bb9e3fe699ea26c512d6f6bef89

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_parser-0.0.3.tar.gz:

Publisher: publish-to-pypi.yml on wlach/repo-parser

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_parser-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: repo_parser-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for repo_parser-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e6058db4ff0d8cef0941cf5fca233dcf466dcfcad67f1d51c66f6b6f8542c123
MD5 29190eb6d0d6665ecab6fd5c282aaffc
BLAKE2b-256 89d1d12d0ca430d2e3c67eb94621cb023ab416788bdd3b0932bc59e0d80cdc61

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_parser-0.0.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on wlach/repo-parser

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