Skip to main content

llm-tools-shodo

PyPI Changelog Tests License

An llm plugin that proofreads Japanese text with the Shodo AI proofreading API. We use this plugin to proofread Japanese text in our Kafkai Blog, Kafkai AI Media and PuchiDen Blog as part of our editorial pipeline.

The plugin is a simple Python script that uses the llm API to add a new command and tool.

Features

It adds two things:

  • llm shodo: a command that reads text and prints the corrected text. No model is involved, so only Shodo's fixes change the text. Every other byte, including CRLF line endings, stays as it was.
  • shodo_proofread: an llm tool, for when you want a model to proofread and then discuss or rework the text.

Both apply every Shodo suggestion that has a replacement and a score of at least 0.5. The official shodo lint command hides suggestions below 0.5, so the plugin lists them as issues instead of applying them. Both also list the issues that have no automatic fix. Empty input never reaches the API.

Installation

Install this plugin in the same environment as LLM. You need LLM 0.27 or newer and Python 3.10 or newer.

llm install llm-tools-shodo

To install the latest code from GitHub before a release reaches PyPI:

llm install https://github.com/kafkaigiken/llm-tools-shodo/archive/refs/heads/main.zip

Credentials

  1. In Shodo, open the project, then API連携 (API settings), and create a token.
  2. Store the token and set the API root:
llm keys set shodo        # paste the token
export SHODO_API_ROOT="https://api.shodo.ink/@your-org/your-project/"

The root and the token always come from the same source, so a token is never sent to another project's root. The plugin uses the first complete pair it finds:

  1. SHODO_API_ROOT and SHODO_API_TOKEN, both set. These override a stored key.
  2. SHODO_API_ROOT and the token stored with llm keys set shodo.
  3. The default profile in ~/.config/shodo/credentials, the file that the official shodo login command writes. The plugin reads ~/.shodo/credentials when that file does not exist.

Usage

To fix a file, run llm shodo. The input must be UTF-8. The corrected text goes to stdout, and the fix report goes to stderr:

cat article.md | llm shodo > fixed.md
llm shodo article.md -q          # -q: no report
llm shodo page.html --html       # HTML input

To proofread inside a model conversation, use the tool:

cat article.md | llm -T shodo_proofread "Proofread this, then explain the main issues." --td

(Omit --td if you don't want to see the tool call details.)

This repository also ships a template, templates/shodo.yaml. It tells the model to call the tool and return the corrected text unchanged. To install it as the shodo template:

cp templates/shodo.yaml "$(llm templates path)/shodo.yaml"
cat article.md | llm -t shodo

Development

To set up this plugin locally, first check out the code. Then create a new virtual environment:

cd llm-tools-shodo
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

python -m pytest

The tests use httpx2.MockTransport in place of the real API, so they need no Shodo token.

Metadata

Release files for llm-tools-shodo 0.1

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-tools-shodo 0.1
File Size Uploaded
llm_tools_shodo-0.1.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-tools-shodo 0.1
File Interpreter ABI Platform
llm_tools_shodo-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / llm_tools_shodo-0.1.tar.gz

Download URL llm_tools_shodo-0.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f1770e30a3d2357752078807ba06d237e5f3246d84152f28c3b6fcfc3a9ccede
BLAKE2b-256 checksum
How to use checksums
bd77412d3cc17a577f1c3d47b8840fd0fe8b61073c232891e539252cd18f6a62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / llm_tools_shodo-0.1-py3-none-any.whl

Download URL llm_tools_shodo-0.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fb82b9dfcdd8193a4e987d917b86118b1878e3a5172ed50a2212a79f06fa6c7
BLAKE2b-256 checksum
How to use checksums
e7c0ac4e3e51dd1b24ddd8de40c69394cc537978cdd519bac50afdfe68fff820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1 This release

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