Skip to content

Instantly share code, notes, and snippets.

@dmc5179
Created June 25, 2026 15:52
Show Gist options
  • Select an option

  • Save dmc5179/727204e324adf40b045be8f96991c67f to your computer and use it in GitHub Desktop.

Select an option

Save dmc5179/727204e324adf40b045be8f96991c67f to your computer and use it in GitHub Desktop.
Pyragify for codebases into Notebooklm

Using pyragify to convert a code base into a NotebookLM source

  • clone the code repo
  • create a config.yaml using the template in this gist which likely does not need to be changed
  • Ensure there is an output directory like, mkdir output, inside the code repo directory
  • Run the pyragify command below
podman run --userns=keep-id --name pyragify --rm -ti \
    -v ${PWD}/config.yaml:/opt/app-root/src/config.yaml:z \
    -v ${PWD}:/opt/app-root/src/input:z \
    -v ${PWD}/pyragify-output:/opt/app-root/src/output:U \
    quay.io/danclark/pyragify:latest
  • Pyragify will generate files under the output directory/remaining/chunk_X.txt which can then be imported into a NotebookLM as a source
repo_path: /opt/app-root/src/input
output_dir: /opt/app-root/src/output
max_words: 495000
skip_patterns:
- ".log"
- "uv.lock"
- ".git"
- ".github"
skip_dirs:
- "__pycache__"
- ".claude"
- ".git"
- ".github"
verbose: true
max_file_size: 5242880 # Example: sets the limit to 5 MB 195000000 195MB?? 204472320
FROM registry.redhat.io/rhel9/python-312-minimal:latest
#USER root
#RUN microdnf -y install uv && \
# uv pip install pyragify && \
# dnf clean all && \
# rm -rf /var/cache/yum /var/cache/dnf
#USER 1001
RUN pip install --no-cache pyragify
#COPY config.yaml /opt/app-root/src/config.yaml
#dnf install python3 python3-pip
#python3 -m pip install --no-cache pyragify
ENTRYPOINT ["python"]
CMD ["-m", "pyragify", "--config-file", "/opt/app-root/src/config.yaml"]
#CMD ["-m", "pyragify.cli", "process-repo", "--repo-path", "/my/repo", "--output-dir", "/my/output"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment