maket_doc
Manage design documents: create, duplicate, rename, delete, list, update metadata, and export/import portable .maket bundles.
Instructions
When to use: every persistent document-lifecycle operation — create, clone, rename, delete, list, update metadata, or move bundles in/out. For session-level actions (open a doc/page in the preview, inspect state, lock), use maket_workspace. For per-page edits use maket_page and for content use maket_html.
doc is the doc in scope for every action except list. name only appears when you need a NEW name (duplicate, rename).
Manage design documents (the workspace unit: canvas + pages + meta).
new — create a blank document at doc; sets it active. Previous unsaved work is lost.
list — enumerate saved documents grouped by category.
delete — remove doc permanently; refused if it's the only document left.
duplicate — clone doc → name (format variants, A/B copies).
rename — rename doc → name.
meta — update doc's metadata: designNotes, teamNotes, rating, category, charte.
export — write a portable .maket bundle to EXPORTS_DIR. By default the bundle embeds referenced asset binaries (images, SVGs) so it survives transfer to another machine or a fresh datadir. Pass include_assets=false for a lighter structure-only snapshot. Include doc for a single document, docs for a list, or omit both to export every document. Referenced chartes are embedded automatically. Override the filename with output.
import — load a .maket bundle from input (absolute path or EXPORTS_DIR-relative). Documents land with conflict-renamed names; chartes skip names that already exist so your current brand isn't overwritten. Assets in the bundle are restored to ASSETS_DIR with the same collision-renaming rule.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | No | The doc in scope. Required for every action except list. For new: the new doc's name (must be unique). For delete/meta: the doc to act on. For duplicate/rename: the source doc. | |
| docs | No | For export: list of doc names to include in the bundle. Omit to export all documents. Ignored by other actions. | |
| name | No | The new name. Only used by duplicate (clone's name) and rename (new name). | |
| input | No | For import: absolute or EXPORTS_DIR-relative path to a .maket file to load. | |
| action | Yes | Operation to run. See the tool description for the action table. | |
| charte | No | For new/meta: name of an existing charte to associate with this document. The charte itself is applied later via maket_charte view. | |
| format | No | For new: paper/screen format. Default A3. Paper sizes are mm; DESKTOP/TABLET/MOBILE are screen aspect ratios scaled to mm. | |
| output | No | For export: output filename (defaults to <doc>.maket or maket-bundle.maket). Absolute paths are honoured; bare names land in EXPORTS_DIR. | |
| rating | No | For meta: 0–5 star rating (clamped). | |
| margins | No | For new: per-side safe-zone insets in mm {top, right, bottom, left}. Optional. | |
| category | No | For new/meta: category tag used for grouping in list (default general). | |
| teamNotes | No | For meta: team-facing notes (visible in the UI). | |
| background | No | For new: canvas background colour (CSS). Default #ffffff. | |
| designNotes | No | For meta: designer-facing notes (visible in the UI). | |
| orientation | No | For new: page orientation. Default portrait. | |
| include_assets | No | For export: embed referenced asset binaries (images, SVGs) in the bundle. Default true — produces a portable .maket that survives transfer to another machine or datadir. Set false for a structure-only snapshot (smaller, git-friendly). |