@paradoc/cli
v0.1.1
Published
CLI tool for Paradoc framework
Maintainers
Readme
Paradoc is documents as code. The CLI provides a registry-first workflow for installing, managing, and creating Paradoc artifacts — forms, documents, checklists, and bundles.
Package overview
- 📦 Registry-first — Install artifacts from public or private registries
- 🔍 Search & discover — Find artifacts by name, kind, or tags
- 🏗️ Project management — Initialize projects with proper configuration
- ✏️ Authoring tools — Create and validate your own artifacts
- 🔒 Lock file support — Reproducible installations across environments
- 🌐 Private registries — Authenticate with custom headers and tokens
Installation
npm install -g @paradoc/cliOr use with npx:
npx @paradoc/cli --helpQuick start
# Initialize a new project
para init my-project
cd my-project
# Search for artifacts
para search "lease agreement"
# Install an artifact
para add @acme/residential-lease
# List installed artifacts
para list
# View artifact details
para view @acme/residential-leaseCommands
Registry commands
| Command | Description |
|---------|-------------|
| para add <artifact> | Install an artifact from a registry |
| para list | List installed artifacts |
| para view <artifact> | View details of an installed artifact |
| para search [query] | Search for artifacts in a registry |
Registry management
| Command | Description |
|---------|-------------|
| para registry add <namespace> <url> | Add a registry |
| para registry remove <namespace> | Remove a registry |
| para registry list | List configured registries |
| para registry info <namespace> | Show registry details |
Authoring commands
| Command | Description |
|---------|-------------|
| para new form <name> | Create a new form |
| para new document <name> | Create a new document |
| para new checklist <name> | Create a new checklist |
| para new bundle <name> | Create a new bundle |
| para validate <artifact> | Validate an artifact |
| para fix <artifact> | Fix artifact metadata |
Project commands
| Command | Description |
|---------|-------------|
| para init [directory] | Initialize a new project |
| para render <artifact> | Render an artifact layer |
| para show <artifact> | Display artifact structure |
| para diff <file1> <file2> | Compare two artifacts |
Installing artifacts
Install artifacts from any configured registry:
# Basic install
para add @acme/residential-lease
# Install with layers (templates, PDFs, etc.)
para add @acme/residential-lease --layers all
# Install specific layers
para add @acme/residential-lease --layers default,pdf-template
# Choose output format
para add @acme/residential-lease --format json
# Force reinstall
para add @acme/residential-lease --forceArtifacts are referenced using scoped names: @namespace/artifact-name
Searching registries
# Search by keyword
para search "lease agreement"
# Search a specific registry
para search --registry @acme
# Filter by artifact kind
para search --kind form
# Filter by tags
para search --tags real-estate,california
# Output as JSON (for scripting)
para search --jsonManaging registries
Add registries to your global or project configuration:
# Add a public registry (prompts for location when in a project)
para registry add @acme https://registry.acme.com
# Add to global config explicitly
para registry add @acme https://registry.acme.com --global
# Add to project config explicitly
para registry add @acme https://registry.acme.com --project
# Add with authentication
para registry add @private https://registry.private.com \
--header "Authorization: Bearer \${PRIVATE_TOKEN}"
# List all registries
para registry list
# Remove a registry
para registry remove @acmeConfiguration
Project configuration
Created when you run para init. Located at paradoc.json in your project root.
{
"$schema": "https://schema.paradoc.dev/manifest.json",
"name": "@myorg/my-project",
"title": "My Paradoc Project",
"visibility": "private",
"registries": {
"@acme": "https://registry.acme.com"
},
"artifacts": {
"dir": "artifacts",
"format": "yaml"
}
}Global configuration
User-level settings at ~/.paradoc/config.json. Applies to all projects.
{
"$schema": "https://schema.paradoc.dev/config.json",
"registries": {
"@acme": "https://registry.acme.com",
"@private": {
"url": "https://registry.private.com",
"headers": {
"Authorization": "Bearer ${PRIVATE_TOKEN}"
}
}
},
"defaults": {
"format": "yaml",
"artifactsDir": "artifacts"
}
}Environment variables in ${VAR_NAME} format are automatically expanded.
Configuration precedence
- Project config — checked first
- Global config — fallback
- Built-in defaults
Project structure
my-project/
├── paradoc.json # Project manifest
├── .paradoc/
│ └── lock.json # Lock file (commit this)
└── artifacts/
└── @acme/
├── residential-lease.yaml
└── commercial-lease.yamlLock file
The .paradoc/lock.json file tracks installed artifacts with their versions and integrity hashes. This ensures reproducible installations. Commit this file to version control.
Related packages
@paradoc/sdk— All-in-one SDK package@paradoc/core— Core artifacts and builders@paradoc/schemas— JSON Schema definitions@paradoc/renderers— PDF, DOCX, Text renderers
Contributing
We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines and code of conduct.
License
This project is licensed under the MIT license.
See LICENSE for more information.
