Generate Python docstrings automatically with LLM and syntax trees.
Project description
llm-docsmith
Generate Python docstrings automatically with LLM and syntax trees.
Installation
Install this plugin in the same environment as LLM.
llm install llm-docsmith
Usage
Pass a Python file as argument to llm docsmith:
llm docsmith ./scripts/main.py
The file will be edited to include the generated docstrings.
Options:
-m/--model: Use a model other than the configured LLM default model-o/--output: Only show the modified code, without modifying the file-v/--verbose: Verbose output of prompt and response--git: Only update docstrings for functions and classes that have been changed since the last commit--git-base: Git reference to compare against (default: HEAD)--only-missing: Only add docstrings to functions and classes that don't have them yet
Only Missing Mode
The --only-missing flag tells docsmith to only generate docstrings for functions and classes that don't already have one. This is useful when you want to preserve existing docstrings and only add documentation where it's missing:
# Only add docstrings where they are missing
llm docsmith ./scripts/main.py --only-missing
Git Integration
The --git flag enables Git integration, which will only update docstrings for functions and classes that have been changed since the last commit.
This is useful for large codebases where you only want to update docstrings for modified code.
# Update docstrings only for changed functions and classes
llm docsmith ./scripts/main.py --git
It's also possible to compare against a different git reference to find changed, for instance the main branch:
# Compare against a specific Git reference
llm docsmith ./scripts/main.py --git --git-base main
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_docsmith-0.3.1.tar.gz.
File metadata
- Download URL: llm_docsmith-0.3.1.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb83aa3729342d6cddbbd64b56d92f737a20fc9646a28e7ff5e80abc136e3cd3
|
|
| MD5 |
03f4a4a220b1948881aa4b23c6967e14
|
|
| BLAKE2b-256 |
b1d5c4a630390fdae47adcb7cf0b0dc1eb9ea65dc1b7bede6daf704a75e7cb5b
|
Provenance
The following attestation bundles were made for llm_docsmith-0.3.1.tar.gz:
Publisher:
publish.yml on mathpn/llm-docsmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_docsmith-0.3.1.tar.gz -
Subject digest:
fb83aa3729342d6cddbbd64b56d92f737a20fc9646a28e7ff5e80abc136e3cd3 - Sigstore transparency entry: 234742956
- Sigstore integration time:
-
Permalink:
mathpn/llm-docsmith@0f64dd540af3b0278517a131c7027a3a7cefe295 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/mathpn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0f64dd540af3b0278517a131c7027a3a7cefe295 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_docsmith-0.3.1-py3-none-any.whl.
File metadata
- Download URL: llm_docsmith-0.3.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae958366073aa335200e6cd85560aa96c595efc85167692bf89b907a0c8cefa
|
|
| MD5 |
0a36416bf92ce5678b320d7524f93b7e
|
|
| BLAKE2b-256 |
94578644ca52ef5077cf5ed2f05b17aa1cc88027da47983d1150a9ad3a90468d
|
Provenance
The following attestation bundles were made for llm_docsmith-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on mathpn/llm-docsmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_docsmith-0.3.1-py3-none-any.whl -
Subject digest:
1ae958366073aa335200e6cd85560aa96c595efc85167692bf89b907a0c8cefa - Sigstore transparency entry: 234742959
- Sigstore integration time:
-
Permalink:
mathpn/llm-docsmith@0f64dd540af3b0278517a131c7027a3a7cefe295 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/mathpn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0f64dd540af3b0278517a131c7027a3a7cefe295 -
Trigger Event:
release
-
Statement type: