Choose the installation method that fits your workflow. Node.js 18 or higher is required.
1. Project-Local Install (Recommended)
Install @docmd/core locally as a development dependency. This locks the version in your package.json and ensures consistent builds across teams and CI/CD.
Install the Package
npm install -D @docmd/core
pnpm add -D @docmd/core
yarn add -D @docmd/core
bun add -D @docmd/core
Initialise the Project
Create the standard folder structure, initial page, and config file automatically.
npx @docmd/core init
pnpm dlx @docmd/core init
yarn dlx @docmd/core init
bunx @docmd/core init
Once installed locally, you can use npx @docmd/core dev or add it directly to your package.json scripts.
2. Global Install
Install the package globally to create or preview sites anywhere on your system.
npm install -g @docmd/core
pnpm add -g @docmd/core
yarn global add @docmd/core
bun add -g @docmd/core
Once installed globally, the docmd binary is available everywhere. You can also always use npx @docmd/core without a global install.
docmd dev # Start a dev server locally
docmd build # Build static output
3. Browser-Only Integration
Embed the engine directly inside an existing web application via CDN.
This bypasses the CLI and loads the parsing engine in the reader’s browser. Use this for dynamic portals, not static SEO websites.
Add the stylesheet and JavaScript engine to your HTML.
<!-- Core Stylesheet -->
<link rel="stylesheet" href="https://unpkg.com/@docmd/ui/assets/css/docmd-main.css">
<!-- Isomorphic Rendering Engine -->
<script src="https://unpkg.com/@docmd/live/dist/docmd-live.js"></script>
See the Browser API for full integration details.
4. Troubleshooting
Permission Denied (EACCES Errors)
Do not use sudo for global installs on macOS or Linux. Fix permission conflicts using a Node.js version manager like nvm or fnm.
PowerShell Execution Policies (Windows)
If Windows blocks execution, open PowerShell as administrator and enable current-user script execution.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser