KanjiVariants.Cli 1.2.0

dotnet tool install --global KanjiVariants.Cli --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local KanjiVariants.Cli --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=KanjiVariants.Cli&version=1.2.0
                    
nuke :add-package KanjiVariants.Cli --version 1.2.0
                    

KanjiVariants.Cli

教育漢字・常用漢字をチェックする.NET Toolです。UTF-8のTXTファイル全体、またはSRT字幕本文を診断します。.NET 10ランタイムが必要です。

インストール

NuGet.orgへの公開後は、次のコマンドでインストールできます。

dotnet tool install --global KanjiVariants.Cli

公開前のローカルパッケージは、リポジトリ直下から次のように検証できます。

dotnet pack KanjiVariants.Cli/KanjiVariants.Cli.csproj -c Release -o ./artifacts/nuget
dotnet tool install KanjiVariants.Cli --tool-path ./artifacts/tool-test --add-source ./artifacts/nuget --version 1.2.0
./artifacts/tool-test/kanjivariants.exe check sample.txt --grade 3

使用方法

kanjivariants check sample.txt --grade 3
kanjivariants check sample.txt --grade 3 --unique
kanjivariants check sample.txt --grade 3 --json
kanjivariants joyo sample.txt
kanjivariants joyo subtitle.srt --json
kanjivariants check subtitle.srt --grade 3 --unique --json

check は指定した小学学年までの教育漢字、joyo は常用漢字表の本表字を確認します。旧字体・異体字・IVS/SVSを自動変換しません。--unique は同じ判定の文字を集約し、--json はJSONだけを標準出力へ返します。SRTでは字幕番号・時間・本文内の位置も取得できます。

入力はBOMあり/なしのUTF-8だけに対応します。不正UTF-8は読込エラーです。改行を保持し、正規化や文字置換は行いません。

終了コードは、0:診断対象の問題なし、1:未習漢字または非常用漢字あり、2:引数・読込・SRT構文・入力異常です。引数・読込・構文エラーは標準エラーへ出力します。

更新・削除

dotnet tool update --global KanjiVariants.Cli
dotnet tool uninstall --global KanjiVariants.Cli

ライセンスと出典

CLIのコードはMIT Licenseです。同梱のKanjiVariantsには外部公開データ由来の表も含まれます。各データの出典・利用条件は同梱のLICENSE-NOTICES.md、詳細なデータバージョン・生成方法はリポジトリのREADMEを参照してください。

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.2.0 99 10/10/2026

KanjiVariants.Cli 1.2.0 初回リリース
     
     .NET 10対応のコマンドラインツールとして公開しました。
     
     - 教育漢字チェック:指定した小学1~6年生までに習う漢字かを診断
     - 常用漢字チェック:文章中に常用漢字表の本表字以外の漢字が含まれるかを診断
     - TXT・SRT対応:UTF-8テキストファイルとSRT字幕ファイルを解析
     - 位置情報の出力:問題のある漢字の位置を表示。SRTでは字幕番号・時間・行番号も取得可能
     - JSON出力:`--json` オプションに対応
     - 重複集約:`--unique` オプションに対応
     - CI連携:診断結果に応じた終了コード(0・1・2)を返却
     
     実行には.NET 10ランタイムが必要です。