Commands Overview
| Command | Technical Function |
|---|---|
npx @docmd/core init |
Initialise a new documentation workspace. |
npx @docmd/core dev |
Launch local development server with hot-reloading. |
npx @docmd/core build |
Compile production-ready static site. |
npx @docmd/core live |
Launch browser-based Live Editor environment. |
npx @docmd/core stop |
Terminate active development servers. |
npx @docmd/core deploy |
Generate deployment manifests and container files. |
npx @docmd/core migrate |
Upgrade legacy configurations or migrate from third-party tools. |
npx @docmd/core validate |
Run link validation and check Markdown document integrity. |
npx @docmd/core doctor |
Run pre-flight environment diagnostics and inspect dependencies. |
npx @docmd/core mcp |
Execute Model Context Protocol (MCP) server over stdio. |
npx @docmd/core add <plugin> |
Install and configure docmd plugins. |
npx @docmd/core remove <plugin> |
Uninstall plugins and remove configuration entries. |
Global Options
| Parameter Flag | Alias | Technical Description |
|---|---|---|
--config <path> |
-c |
Specify custom path to configuration file (default: docmd.config.json). |
--verbose |
-V |
Output detailed execution logs. |
--version |
-v |
Output installed package version. |
--help |
-h |
Output command CLI help instructions. |
--cwd <path> |
- | Override target working directory path. |
npx @docmd/core init
Initialise a documentation repository layout inside the working directory.
npx @docmd/core init
Generates:
docs/index.md— Default landing page.docmd.config.json— Standard configuration options.- Updated
package.jsonbuild scripts.
npx @docmd/core dev
Launch local development server with real-time hot-reloading.
npx @docmd/core dev [options]
| Parameter Flag | Alias | Technical Description |
|---|---|---|
--port <number> |
-p |
Specify web server port (default: 3000). |
--config <path> |
-c |
Custom path to configuration file. |
npx @docmd/core build
Compile a production static site into your configured output directory (site/).
npx @docmd/core build [options]
| Parameter Flag | Alias | Technical Description |
|---|---|---|
--offline |
- | Rewrite asset and link paths to .html relative files for local file system browsing. |
--config <path> |
-c |
Custom path to configuration file. |
npx @docmd/core live
Launch browser-based Live Editor environment.
npx @docmd/core live [options]
| Parameter Flag | Technical Description |
|---|---|
--build-only |
Compile standalone Live Editor bundle without starting preview web server. |
npx @docmd/core stop
Terminate running development servers.
npx @docmd/core stop [options]
| Parameter Flag | Alias | Technical Description |
|---|---|---|
--port <number> |
-p |
Terminate process running on specified port. |
--force |
-f |
Kill processes running on standard ports (3000, 3001, 8080, 8081). |
npx @docmd/core deploy
Generate deployment manifests and configuration files.
npx @docmd/core deploy [options]
| Parameter Flag | Technical Description |
|---|---|
--docker |
Emit multi-stage Dockerfile and .dockerignore. |
--nginx |
Emit production nginx.conf. |
--caddy |
Emit Caddyfile. |
--github-pages |
Emit .github/workflows/deploy.yml. |
--vercel |
Emit vercel.json. |
--netlify |
Emit netlify.toml. |
--force |
Overwrite existing deployment manifests. |
npx @docmd/core migrate
Migrate configurations from legacy versions or third-party engines.
npx @docmd/core migrate [options]
Option flags:
--upgrade: Translate legacy pre-0.7.x configuration keys in place.--dry-run: Preview migration changes without modifying disk contents.
npx @docmd/core validate
Validate internal link targets and document structure across Markdown sources.
npx @docmd/core validate [options]
| Parameter Flag | Technical Description |
|---|---|
--json |
Output validation errors as machine-readable JSON for CI integration. |
npx @docmd/core doctor
Run pre-flight environment diagnostics and inspect plugin/template installation states.
npx @docmd/core doctor [options]
| Parameter Flag | Technical Description |
|---|---|
--config <path> |
Path to non-default configuration file. |
--fix |
Auto-install missing official plugins or templates identified during check. |
--json |
Output diagnostic report in machine-readable JSON format. |
npx @docmd/core mcp
Execute Model Context Protocol (MCP) server over stdio for agentic integrations.
npx @docmd/core mcp
{
"mcpServers": {
"docmd": {
"command": "npx",
"args": ["-y", "@docmd/core", "mcp"]
}
}
}
npx @docmd/core add <plugin>
Install and configure official or third-party plugins.
npx @docmd/core add <plugin-name>
| Command Example | Technical Function |
|---|---|
npx @docmd/core add analytics |
Install @docmd/plugin-analytics. |
npx @docmd/core add search |
Install @docmd/plugin-search. |
npx @docmd/core remove <plugin>
Uninstall plugins and clean up corresponding docmd.config.json configuration blocks.
npx @docmd/core remove <plugin-name>
docmd formats CLI output using structured terminal logging to simplify parsing by automated CI jobs and AI dev agents.