sdd export
Exports specs to various formats.
Usage
bash
sdd export [specId...] [options]Arguments
| Argument | Description |
|---|---|
specId | Spec IDs to export (multiple allowed) |
Options
| Option | Description |
|---|---|
--all | Export all specs |
-f, --format <format> | Format (html, json, markdown) |
-o, --output <path> | Output path |
--theme <theme> | Theme (light, dark) |
--no-toc | Exclude table of contents |
Formats
HTML
Responsive styling, table of contents, RFC 2119 keyword highlighting included:
bash
sdd export user-auth --format htmlJSON
Structured requirements/scenarios data:
bash
sdd export user-auth --format jsonMarkdown
Merge multiple specs into a single file:
bash
sdd export --all --format markdownExamples
Single Spec HTML
bash
sdd export user-authExport All Specs
bash
sdd export --allDark Theme
bash
sdd export user-auth --theme darkSpecify Output Path
bash
sdd export --all -o ./docs/specs.htmlExclude Table of Contents
bash
sdd export user-auth --no-tocOutput Examples
HTML Structure
html
<!DOCTYPE html>
<html lang="en">
<head>
<title>SDD Spec: user-auth</title>
<style>/* embedded styles */</style>
</head>
<body>
<nav class="toc">Table of Contents</nav>
<main>
<h1>user-auth</h1>
<section id="requirements">Requirements</section>
<section id="scenarios">Scenarios</section>
</main>
</body>
</html>JSON Structure
json
{
"id": "user-auth",
"title": "User Authentication",
"requirements": [
{
"id": "REQ-001",
"title": "Login",
"keyword": "SHALL"
}
],
"scenarios": [
{
"id": "scenario-1",
"given": ["Valid account"],
"when": ["Login attempt"],
"then": ["Success"]
}
]
}