detachLast updated on
Last updated on
Detach a layer or content reference from an artifact
Detach (remove) a layer or content reference from an artifact.
Usage
paradoc detach <artifact> [target] [options]Arguments
| Argument | Description |
|---|---|
artifact | Artifact file (JSON/YAML) to detach from |
target | Layer name, instructions, or agent-instructions (optional, will prompt if not provided) |
Options
| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--dry-run | Show what would be changed without modifying the file |
Description
Removes a layer definition or content reference from an artifact file. The target can be a layer name, instructions, or agent-instructions.
If no target is provided, you will be prompted to select from all available layers and content references interactively. In non-interactive mode (-y), the target argument is required.
The artifact file is rewritten in its original format (JSON or YAML) after removal. If the last layer is removed, the layers object is removed from the artifact entirely.
Examples
Detach a specific layer:
paradoc detach my-form.yaml pdfDetach instructions:
paradoc detach my-form.yaml instructionsDetach agent instructions:
paradoc detach my-form.yaml agent-instructionsInteractive selection (layers + content references):
paradoc detach my-form.yamlPreview changes without modifying:
paradoc detach my-form.yaml pdf --dry-runSkip confirmation:
paradoc detach my-form.yaml instructions -yOutput
When detaching a layer:
Layer to remove:
layers.pdf:
kind: file
path: ./lease-template.pdf
mimeType: application/pdf
Detached layer "pdf" from: my-form.yamlWhen detaching a content reference:
Content reference to remove:
instructions:
kind: file
path: ./instructions.md
mimeType: text/markdown
Detached content reference "instructions" from: my-form.yamlSee also
An artifact argument may be a file path or an installed @namespace/name reference from .paradoc/lock.json. An uninstalled reference fails with an error.
A layer cannot be detached while defaultLayer names it or another layer names it through bindingsFrom; update those references first. --dry-run previews the change, but still prompts unless combined with --yes.