CLI

Overview

Last updated on

Command-line interface for managing Asterdoc artifacts

The Asterdoc CLI (asterdoc) is a command-line tool for working with Asterdoc artifacts — structured definitions of forms, documents, checklists, and bundles. It takes a registry-first approach: discover and install pre-built artifacts from shared registries, then validate, render, and manage them locally. It's also an authoring tool for creating new artifacts from scratch.

Key capabilities

  • Install artifacts from public or private registries
  • Create new artifacts (forms, documents, checklists, bundles)
  • Validate artifacts against the Asterdoc JSON Schema
  • Render layers to PDF, DOCX, or Markdown
  • Diff and patch artifacts
  • Build and host your own registries
  • Generate TypeScript types from artifacts

Installation

The CLI requires Node.js 22 or newer.

npm install -g asterdoc

Verify the installation:

asterdoc --version

The package registers one command, asterdoc.

The CLI is published as two packages with the same version and behavior: asterdoc and @asterdoc/cli. Install one of them, not both. Each registers the asterdoc command, so a second global install fails with EEXIST. These docs use asterdoc.

To run it once without a global install:

npx asterdoc --version

Next steps

  • Projects - Project structure, manifest, lock file, and output formats
  • Configuration - Global and project settings, environment variables and cache
  • Registries - Consuming and creating artifact registries
  • Command reference - Full list of available commands

On this page