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.5.tar.gz (11.5 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.5-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repo_parser-0.0.5.tar.gz
  • Upload date:
  • Size: 11.5 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.5.tar.gz
Algorithm Hash digest
SHA256 83ab8d0d5ef1aa7c3cb980cd6523c2c0c3a8f88fb1ab3c855100415df0583384
MD5 6e5daae4ee31b935a4fbff0bc2d3cf7d
BLAKE2b-256 b46f8a27e471b5797ed814a0a24c74efdaf9ee4202cdd3047a019a67b686cb6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_parser-0.0.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: repo_parser-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3f5c5136e66dcfe706faa944ba7ebde2f6f037c216993cdeab9502dac93b64d5
MD5 da5ca4fbfb00db0c5de1f85e9ef71639
BLAKE2b-256 da3af3837efd978d8e961606dbbb623babd13359d73cd965ea951d16e060f94d

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_parser-0.0.5-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