inknote
by LiweiDonVee
README.md
# Inknote
[简体中文](README.zh-CN.md)
Inknote measures handwriting in locally held scans and generates labeled handwriting from a reviewed writing sample. A Windows CLI, a local stdio MCP server, and an agent Skill share the same workflow. Use it for personal notes and practice with your own non-signature writing or samples the writer has authorized.
- **Measure** stroke thickness, letter size, word gaps and line layout from visually reviewed regions.
- **Fit** PenGPT to approved word crops and exact transcriptions with local InkSight tracing. Eruku is an optional image backend.
- **Render** new English text as A4 PNG/PDF and, for vector backends, SVG. Formulas use a local parser and support conventional and matched handwriting-style glyphs.
- **Evaluate** text readability with local OCR and visually compare same-content crops. Record a whole-document holdout for style comparisons.
## Windows quick start
Install 64-bit CPython 3.10 with the Windows Python launcher and make `uv` available on PATH. Open PowerShell in this source directory. Setup fetches public package and model assets into a local cache.
```powershell
& .\setup.ps1 -Mcp
& .\inknote.cmd --json doctor
& .\inknote.cmd --json public-check --backend pengpt --out 'runs/public-pen'
& .\inknote.cmd --json render --profile 'runs/public-pen/profile.json' --text-file '.\examples\notes-with-math.txt' --math-style matched --seed 27 --out 'runs/demo'
```
Open `runs/demo/preview.pdf` and the page PNGs. The public check fits the verified upstream NIST sample on the local machine. Inference runs with pinned local assets and a Python network guard. For an existing PenGPT style use `-RenderOnly`. For an existing model cache use `-SkipModels -ModelCache <directory>`. Add `-Eruku` to install the second backend and its separate CUDA environment. [Installation and model details](skills/inknote/references/workflow.md) · [Third-party terms](THIRD_PARTY.md)
## Measure a sample
For a model-free first run, install with `-RenderOnly -Mcp -SkipModels`. The fixture generator draws a synthetic page and creates the matching region file.
```powershell
& .\.venv\Scripts\python.exe -I -B '.\examples\make_geometry_demo.py' --out 'runs/synthetic'
& .\inknote.cmd --json measure --pdf 'runs/synthetic/synthetic.pdf' --regions 'runs/synthetic/regions.json' --out 'runs/synthetic/measurements.json'
```
For an actual scan, render at the desired DPI and review the ink windows before marking the boxes. The report contains page coordinates, source hashes, measured sizes and spacings in millimeters, and the ink threshold. [Region format and measurement method](skills/inknote/references/handwriting-geometry.md)
## Fit a local style
```powershell
& .\inknote.cmd --json audit --input 'private-scans' --out 'private-audit'
& .\inknote.cmd --json shortlist --dataset 'private-audit' --out 'word-review'
```
Open the context sheet. In the matching review CSV row, enter the exact text under `transcription` and set `status` to `approved`. Select complete non-signature words with clean results after print masking. The audit holds out a whole PDF. Use `annotate` if you need to draw a region manually.
```powershell
& .\inknote.cmd --json fit --backend pengpt --dataset 'private-audit' --review 'word-review/priority-review.csv' --public-proof 'runs/public-pen' --out 'local-profile'
& .\inknote.cmd --json render --profile 'local-profile/profile.json' --text-file 'notes.txt' --seed 27 --out 'runs/notes'
```
The fitted profile and generated material are local artifacts. Keep private documents, crop reviews, weights and profiles outside the repository. Reproduce an issue with a synthetic or public sample. The current text interface supports validated English letters and punctuation. Put each formula on a separate `$$...$$` line. [Full workflow](skills/inknote/references/workflow.md)
## Use it from an agent
Load [the Inknote Skill](skills/inknote/SKILL.md) in a client that supports Skills, or read it as the operating guide. For a local stdio MCP client, configure the installed and pre-created working directories in this example.
```json
{
"mcpServers": {
"inknote": {
"command": "C:\\Tools\\inknote\\.venv\\Scripts\\inknote-mcp.exe",
"args": ["--workspace", "C:\\Inknote Work"]
}
}
}
```
Discover tools with the client's MCP tool list. Start with `inknote_doctor`, then use `inknote_measure`, `inknote_audit`, `inknote_fit`, `inknote_render` or `inknote_worksheet` as needed. Commands return structured receipts with local result paths. Add `--read-root` for an additional trusted input directory. [Worksheet and scan finishes](skills/inknote/references/worksheet.md)
## Verify an installation
```powershell
& .\.venv\Scripts\python.exe -I -B -m unittest discover -s tests
& .\.venv\Scripts\python.exe -I -B '.\examples\check_local_mcp.py' --out 'runs/mcp-check'
```
Add `--profile 'runs/public-pen/profile.json'` to the MCP check to verify same-seed page rendering alongside the model-free measurement.
[Public validation results and reproduction commands](VALIDATION.md)
## License
Project source uses AGPL-3.0-only. The bundled Kalam font and downloaded models have their own upstream terms. [License](LICENSE) · [Third-party terms](THIRD_PARTY.md)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues