The command line
Esc
Start typing to search...
reference
On this page

The command line

dogsbay-xml runs the same operations as the editor's menus. The editor installation includes the command. See The command line to find it or to run it on a machine where you cannot use an installer.

Most commands work on files and need nothing running. A few drive an editor that is already open, and those need the integration server.

Run dogsbay-xml --help for the full list, and dogsbay-xml <command> --help for one command's options.

Important

The refactoring commands print a plan and change nothing until you add --apply. The structural editors, edit-map and edit-reltable, work the other way round: they write unless you pass --dry-run.

Reading a document

CommandWhat it does
validateValidate against XSD, DTD, or RELAX NG, resolving catalogs. DITA files fall back to the bundled DITA grammars.
parsePrint the root element, namespace, and encoding.
infoReport encoding, grammar, root element and size.
queryRun an XPath expression over a file or a glob.
transformApply an XSLT stylesheet.
formatPretty-print using the project's house style.
reflowReflow prose to one sentence per line, leaving verbatim blocks alone.
previewRender the styled DITA preview to HTML.

Asking about the project

These commands answer questions about more than one file.

CommandWhat it answers
where-usedWhat references this file?
keysWhat keys does this root map define, and what do they resolve to?
check-linksWhich references point at something missing?
conref-auditWhich reuse references name an element ID that no longer exists?
healthBroken references, undefined and unused keys, and orphaned topics.
project-healthReport broken references, key problems, orphaned topics, grammar validation, metadata policy violations, and open proposals. With --schematron, also report the project's house rules.
project-graphHow do the maps, topics, keys, and DITAVAL files connect, and what does each deliverable ship? Prints JSON; see the project graph reference.
reportWrite a standalone HTML page from another command's output, such as a relationship map or a health report.

check-links, health, and project-health exit with a nonzero status when they find a problem, so they work as pipeline gates.

bash
dogsbay-xml project-health . --schematron house-style.sch

project-health prints every finding and then a summary of the counts, with the house rules and the metadata policy broken down by rule. Add --summary for the counts alone, --include to run only some of the checks (for example --include reuse,validation), and --severity error to leave out findings that do not block a clean result, such as unused keys. See validating a project.

To see the project as a page, see Mapping a project and writing reports.

Validating a set

CommandWhat it does
validate-projectValidate every file in a scope: a map's publication set, a glob, or a folder.
validate-deliverablesValidate each deliverable, with its own map and conditions.
validate-otRun DITA-OT preprocessing per deliverable, which catches key and conref resolution failures that static validation cannot. Requires DITA-OT.
schematronApply a Schematron schema to one document.
schematron-projectApply one across a scope.
validate-conditionsReport profiling values that the subject scheme does not allow.

Metadata

CommandWhat it does
metadata-auditReport where required metadata is missing or wrong.
metadata-setSet, fill, append, or remove fields in bulk, preserving the rest of the prolog.
metadata-export-schematronCompile the metadata policy to ISO Schematron, so the same rules run anywhere.

Surveying DITA features

Each of these reports on one DITA mechanism across the project: reltable-audit, list-branches, list-subjects, keyword-audit, index-audit, glossary-audit, conref-push-audit, chunk-audit, and specialization-info.

Changing files

Reference-safe edits. All are dry-run first.

CommandWhat it does
rename-fileRename a file and every reference to it.
rename-keyRename a key and every use of it.
rename-element-idRename an element ID, updating conrefs that point at it.
rename-profile-valueRename a profiling value, such as a platform or audience.
delete-fileDelete safely, reporting inbound references first.
retargetPoint every reference from one file at another.
keyifyConvert direct references to key references, adding the key definitions.
inline-keyThe reverse: turn a key reference back into a direct one.
extract-conrefMove an element into a reuse topic and leave a conref behind.
inline-conrefReplace a conref with a copy of the content it pulls in.
create-keydefAdd a text key definition.
merge-keydefsRemove duplicate key definitions that are shadowed anyway.
split-topicSplit a topic at its sections, adding the new topics to the map.

Structural editing of maps and relationship tables preserves formatting and keeps references intact: edit-map and edit-reltable. Both take an operation as their second argument, and both write unless you pass --dry-run.

Publishing

CommandWhat it does
buildBuild one deliverable or all of them with DITA-OT, using the transform type, conditions, and parameters that the project defines.

Driving a running editor

These need the integration server, which you turn on in File > Settings > Server.

CommandWhat it does
open, close, list, saveManage open documents.
selection, goto-line, cursor, select-element, wrapMove around and edit at the cursor.
authorDrive the Author view: outline, switch, insert, set-text, issues.
screenshotCapture the editor window.
statusReport whether the editor is reachable, and print MCP configuration for AI assistants.

Agents and review

CommandWhat it does
reviewList, accept, reject, or comment on agent proposals in a document.
sessionsList the agent sessions connected to the editor.
agentsList Agent Client Protocol agents and whether this machine can run them.
audit-logShow what agents changed in this project, newest first.

Projects

project create, project open, project list, and project info manage projects from the command line.