docs7-cli
v0.1.1
Published
Build, preview, and import Docs7 documentation sites.
Maintainers
Readme
docs7-cli
The Docs7 command line. Preview, build, and import documentation projects that use docs.json (or legacy mint.json).
npx docs7-cli dev ./docsOr install it once and use the docs7 command:
npm install --global docs7-cli
docs7 dev ./docsRequires Node.js 20.19 or newer.
Commands
docs7 dev <docs-dir>
Start a local preview with hot reload at http://localhost:3333. Pages reload as you edit them.
docs7 dev ./docs --port 4000| Option | Default | Description |
| --- | --- | --- |
| -p, --port <port> | 3333 | Port for the preview server. |
| --base-path <path> | none | Mount path, such as /docs. |
The API playground works in the preview. Ask AI is only available on hosted Docs7 sites.
docs7 build <docs-dir>
Create the same static release that hosted Docs7 deploys.
docs7 build ./docs --out ./dist --site-url https://docs.example.com| Option | Default | Description |
| --- | --- | --- |
| -o, --out <dir> | dist | Output directory. |
| --site-url <url> | http://localhost | Public URL of the site. Sets canonical URLs, social cards, and structured data. |
| --base-path <path> | none | Mount path, such as /docs. |
| --search-index <name> | generated | Name of the search index written into the release. |
docs7 import <url>
Convert a public Mintlify site into a local Docs7 project, and optionally build it.
docs7 import https://docs.example.com --out ./imported-docs --build| Option | Default | Description |
| --- | --- | --- |
| -o, --out <dir> | required | Directory for the imported project. |
| --build | off | Build the imported project after import. |
| --build-out <dir> | <out>-build | Output directory for --build. |
| --base-path <path> | from URL | Mount path for --build. For https://docs.example.com/guides the default is /guides. |
| --dry-run | off | Show what would be imported without writing files. |
Project format
Docs7 accepts current docs.json projects and legacy mint.json projects. mint.json is converted in memory with Mintlify's published conversion library; the source repository is not changed.
How it works
The package contains a small launcher and a compiled runtime. On first run, the launcher verifies the runtime checksum and extracts it into ~/.docs7. Set DOCS7_CACHE_DIR to use a different directory.
License
Elastic License 2.0. You can install and use docs7-cli freely. You may not offer it to third parties as a hosted or managed service.
