Skip to main content

llm-devtale

llm-devtale is a plugin for Simon Willison's LLM tool llm command-line tool that automatically generates documentation ("dev tales") for your source code projects. It analyzes your project's files and folders, considering factors like file size, git commit effort, and excluded patterns, to produce a hierarchical, LLM-generated summary of your codebase.

The generated documentation includes:

  • A high-level overview of the entire repository.
  • Summaries for each analyzed folder.
  • Detailed "dev tales" for individual source code files.

To avoid analyzing too much boilerplate or non-important data, the program expects the folder to be a git repository, so it can order the files by number of commits to focus on the most important files (most commits) within the limits of the tokens configured

Taken inspiration (and some code) from https://github.com/tenxstudio/devtale and https://github.com/irthomasthomas/llm-cartographer

The tool uses threads to speed up the analysis, up to maximum 8 threads, only for file summarization.

Installation

First, ensure you have llm installed:

uv tool install llm

Then, install the llm-devtale plugin:

llm install llm-devtale

Usage

Once installed, the devtale command will be available through the llm CLI:

llm devtale [DIRECTORY] [OPTIONS]

By default, DIRECTORY is the current working directory (.).

Examples

Generate documentation for the current directory

This will output the generated documentation to your console.

llm devtale .

Output documentation to a file

Save the generated documentation to PROJECT_README.md.

llm devtale . -o PROJECT_README.md

Use a specific LLM model

Generate documentation using gpt-4:

llm devtale . -m gpt4

Exclude specific files or folders

Exclude all files under test/ directories and docs/ folders using gitignore-style patterns:

llm devtale . -e "**/test/*" -e "docs/"

Filter by file extension

Only include Python (.py) and JavaScript (.js) files in the analysis (do NOT forget the '*' before the extension):

llm devtale . -f *.py -f *.js

Filter by directory

Only include folders src/app and src/utils:

llm devtale . -k src/app -k src/utils

Limit token usage

Specify the maximum number of tokens to send to the LLM for the entire project and per file:

llm devtale . --max-tokens 50000 --max-tokens-per-file 5000

Perform a dry run

See which files and folders would be analyzed without actually calling the LLM. This shows the project hierarchy and token counts.

llm devtale . --dry-run

Add additional instructions to the prompt

Add additional instructions to the end of all LLM prompts.

llm devtale -p "All summaries should be in uppercase" .

Options

  • DIRECTORY: Path to the project directory (default: .)
  • -e, --exclude <PATTERN>: Patterns to exclude files/folders (gitignore format). Can be used multiple times.
  • --max-tokens <INT>: Maximum total tokens to send to the LLM for the entire project.
  • --max-tokens-per-file <INT>: Maximum tokens to process per individual file.
  • -o, --output <PATH>: Output file path or directory to save the generated documentation.
  • -m, --model <MODEL_NAME>: Specify the LLM model to use (e.g., gpt4). If not set uses the default model configured in the llm cli tool
  • -f, --filter-extension <EXTENSION>: Only include files with these extensions (e.g., *.py, *.md). Can be used multiple times.
  • -t, --dry-run: Show the hierarchy and files that will be analyzed without making LLM calls.
  • -d, --debug: Turn on verbose logging.
  • -k, --filter-folder: Only parse the specified folder(s)
  • -p, --prompt: Additional prompt to be added at the end of the program prompt

Debug

The program can be executed using an ad-hoc main.py file added for convenience:

python -m llm_devtale.main

Metadata

Release files for llm-devtale 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-devtale 0.2.3
File Size Uploaded
llm_devtale-0.2.3.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-devtale 0.2.3
File Interpreter ABI Platform
llm_devtale-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 24.0 kB

Release files / llm_devtale-0.2.3.tar.gz

Download URL llm_devtale-0.2.3.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
56f1f4c967018eb6926d877012d922b7c6a4b0c6e2f8bdd07b420eb059402639
BLAKE2b-256 checksum
How to use checksums
84e84650dabceca4dd0ed90c47158fb50f7a95fb9870be6f444866c1c1a4e082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2025.

Transparency log

Release files / llm_devtale-0.2.3-py3-none-any.whl

Download URL llm_devtale-0.2.3-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7f859fb3f96366345e8b0d8c5da87521aa4487774e6394caa79b66ec16aa017
BLAKE2b-256 checksum
How to use checksums
4ad0a667afec0f848fa62a9a07f589fc2e76b056db060dc63009a9e7e54382ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page