Pure .NET CLI toolkit for scientific document generation, inspection, charts, OCR, semantic search, and package slicing.
Zero JavaScript. Modular architecture: one light router (17MB) plus 6 external dotnet tools. 179 commands.
dotnet tool install --global Angri450.Nong.Cli
nong commands --jsonThe main nong package is a light router (17MB with ONNX Runtime native) plus pure .NET built-in modules. Heavy groups are split into independent dotnet tools and are routed by the same user commands: nong chart ..., nong diagram ..., nong pdf ..., nong pptx ..., nong ocr ..., and imaging paths under nong word images. No Node.js, Docker, Python, Graphviz, or Mermaid runtime is required for core local features.
For local OCR, install the default PP-OCRv6 ONNX model once:
nong ocr install-model pp-ocrv6-medium --jsonPP-OCRv6 ONNX models (det+rec) are downloaded from ModelScope and run through ONNX Runtime. No PaddleInference, no native runtime packages needed. Microsoft.ML.OnnxRuntime is shared between embedding search and OCR — a single inference engine.
For semantic search, ensure an embedding model is in .nong/models/jina-v5-nano/:
git clone --depth 1 https://modelscope.cn/onnx-community/jina-embeddings-v5-omni-nano-ONNX.git .nong/models/jina-v5-nano
mv .nong/models/jina-v5-nano/onnx/text_model_q4f16.onnx .nong/models/jina-v5-nano/model.onnx
mv .nong/models/jina-v5-nano/onnx/text_model_q4f16.onnx_data .nong/models/jina-v5-nano/
nong search "your query"The CLI targets net8.0 and the packaged tool opts into major-version roll-forward, so current .NET 9/10 runtimes can run it.
┌─────────────┐
│ NongCli │ (main CLI, 332 commands)
└──┬──────────┘
┌─────────────┼─────────────┬──────────┐
┌────▼───┐ ┌────▼───┐ ┌─────▼────┐ │
│ Docx │ │ Excel │ │ Inspect │ ...│
│ Pptx │ │ Pdf │ │ Genre │ │
│ Chart │ │Diagram │ │ Bioicons │ │
│ Imaging│ │ OCR │ │Lit/Aminer│ │
└──┬──┬──┘ └──┬──┬──┘ └────┬─────┘ │
│ │ │ │ │ │
┌──▼──▼──┐ ┌──▼──▼──┐ ┌───▼────┐ │
│ThirdParty│ │Pandoc │ │ Data │ │
│(shared) │ │(AST) │ │(nong.db)│ │
└─────────┘ └────────┘ └────────┘ │
│
┌────────────────────────────────────────▼──┐
│ 外圈 dotnet tools (独立进程,首次用自动装) │
│ chart · diagram · pdf · pptx · ocr · imaging│
└─────────────────────────────────────────────┘| CLI Group | Commands | Skill | Notes |
|---|---|---|---|
word (+ add) | 125 | word | Document engine: create, dissect, format, fill, convert, to-pdf |
aminer | 44 | aminer | AMiner scholar/paper/patent/org API |
excel | 28 | excel | XLSX create, chart, formula evaluate, pivot |
inspect (+ genre) | 28 | inspect | Paper diagnosis & template discovery |
lit | 21 | literature | Literature search, cache, export |
pdf | 14 | PDF dissect, create, form-fields, compress | |
chart | 12 | chart | ANOVA, Duncan MRT, bar/line/pie/scatter |
ocr | 12 | ocr | Local ONNX OCR, cloud PaddleOCR, analyze-image |
pptx | 9 | pptx | PPTX create, edit-slide, remove-slide |
skill | 8 | skill-grader | Skill validate, scan, inventory, package |
slice | 8 | slice | NongPandoc package inspect |
nongcli (+ search) | 7 | nongcli | Workspace init, embedding model, semantic search |
metaso | 5 | metaso | Metaso AI search, reader, chat |
diagram | 4 | diagram | Flowchart, network, tree |
icons | 3 | icons | Bioicons scientific icon search |
export | 2 | export | EPUB, LaTeX, HTML, ODF export |
markdown | 2 | markdown | GFM ↔ NongMark bidirectional |
| Infrastructure (no Skill) | |||
commands | 1 | — | Command manifest export |
manifest-generate | 1 | — | Manifest source generator |
| Metric | Value |
|---|---|
All first-party + tool <Version> | 12.1.0 (24 csproj unified) |
| Tests | 216/216 PASS, 0 skip, 0 fail |
| NuGet packages | 18 published to nuget.org |
| Toolkit.Net skills | 17 skills (plugin v2.0) |
nong ocr local scan.png --ingest --json
nong lit parse --query "SU=('腐植酸'+'腐殖酸')*('稀土'+'微肥')" --json
nong lit plan --query "SU=('腐植酸'+'腐殖酸')*('稀土'+'微肥')" --sources openalex,crossref,unpaywall --json
nong lit search --query "SU=('采前'+'采前处理')*('保鲜'+'贮藏')*('果实'+'果品')" --ingest -o refs.json --json{
"status": "ok" | "error",
"command": "word read",
"summary": "...",
"data": {},
"issues": [],
"artifacts": { "docx": "out.docx" },
"metrics": {},
"errors": [],
"meta": { "durationMs": 42, "version": "12.1.0" }
}Error codes E001 through E009 cover file-not-found, unsupported format, missing argument, internal error, dependency missing, validation failed, read failed, write failed, and not implemented.
- .NET SDK 8.0 or later for development; installed tools can roll forward to current major runtimes.
- Windows is the validated native-rendering path for current Chart, Diagram, and Imaging tool packages.
- ONNX Runtime native DLL is bundled per-platform (17MB nupkg). No separate runtime install needed.
- No JavaScript, npm, Python, pip, Graphviz, or Mermaid runtime is required for core local workflows.
| 做什么 | 命令 |
|---|---|
| 同步全仓版本号 | ./sync-version.sh 12.2.0 — 24 csproj + CliVersion + UserAgent + README |
| 架构全景图 | nong-packages.html — 包依赖树、vendor 目录、运行时共享架构 |
| 同步 skills 到 Toolkit.Net | cp -r skills/* ../Nong.Toolkit.Net/(不含 sync-version.sh) |
| 清理编译产物 | find . -name bin -o -name obj | xargs rm -rf |
| 打包推送 NuGet | dotnet pack 各项目 → dotnet nuget push |
Apache-2.0. See LICENSE for details.
See README.zh-CN.md.