@documirror/cli
v0.2.0
Published
CLI for building translated mirrors of static documentation sites
Downloads
25
Maintainers
Readme
@documirror/cli
CLI for building translated mirrors of static documentation websites.
DocuMirror crawls a source docs site, extracts translatable HTML text and attributes, writes page-based translation task files, runs translation through an OpenAI-compatible API, verifies the results, and rebuilds a deployable translated static mirror.
Install
npm install --global @documirror/cli
documirror --helpFor a one-off run:
pnpm dlx @documirror/cli --helpQuick Start
Initialize a mirror repository:
documirror init --repo ./my-mirror
cd ./my-mirrorOnce you are inside the mirror repository root, --repo defaults to the
current directory and can be omitted.
Run the one-shot automatic pipeline:
documirror autoThis runs update, translate run, translate apply, and build in order. If translation leaves some tasks failed, auto still applies successful results and builds the site, but returns a non-zero exit code.
translate run keeps using the single ai.concurrency budget. It prioritizes page-level parallelism first, then lets runtime chunks from already-active pages borrow any spare request slots when fewer pages are active than the budget. Persisted task and result files stay page-based.
For manual control, you can still run the incremental update step directly:
documirror updateInspect current status:
documirror status
documirror doctor