kitfly 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +63 -16
  3. package/VERSION +1 -1
  4. package/dist/_raw/content/deployment/preflight.md +134 -0
  5. package/dist/_raw/content/deployment/recipes/aws-s3.md +128 -0
  6. package/dist/_raw/content/deployment/recipes/cloudflare-pages.md +73 -0
  7. package/dist/_raw/content/deployment/recipes/cloudflare-r2.md +156 -0
  8. package/dist/_raw/content/deployment/recipes/fly-io.md +57 -0
  9. package/dist/_raw/content/deployment/recipes/github-pages.md +112 -0
  10. package/dist/_raw/content/deployment/recipes/netlify.md +99 -0
  11. package/dist/_raw/content/deployment/recipes/vercel.md +88 -0
  12. package/dist/_raw/content/deployment/secrets-and-env-vars.md +75 -0
  13. package/dist/_raw/content/deployment.md +128 -0
  14. package/dist/_raw/content/guide/approaches.md +182 -0
  15. package/dist/_raw/content/guide/features.md +121 -0
  16. package/dist/_raw/content/guide/getting-started.md +112 -0
  17. package/dist/_raw/content/guide/kitfly-overview.md +209 -0
  18. package/dist/_raw/content/reference/configuration.md +259 -0
  19. package/dist/_raw/content/reference/design-catalog.md +167 -0
  20. package/dist/_raw/content/reference/environment-variables.md +66 -0
  21. package/dist/_raw/content/reference/glossary.md +92 -0
  22. package/dist/_raw/content/reference/key-concepts.md +118 -0
  23. package/dist/_raw/content/reference/plugins.md +220 -0
  24. package/dist/_raw/content/reference/slides-authoring-guidelines.md +129 -0
  25. package/dist/_raw/content/reference/structure.md +166 -0
  26. package/dist/_raw/content/reference.md +20 -0
  27. package/dist/_raw/content/templates/crucible.md +192 -0
  28. package/dist/_raw/content/templates/handbook.md +83 -0
  29. package/dist/_raw/content/templates/minimal.md +138 -0
  30. package/dist/_raw/content/templates/overview.md +187 -0
  31. package/dist/_raw/content/templates/pipeline.md +151 -0
  32. package/dist/_raw/content/templates/productbook.md +187 -0
  33. package/dist/_raw/content/templates/runbook.md +193 -0
  34. package/dist/_raw/content/templates/servicebook.md +163 -0
  35. package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
  36. package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
  37. package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
  38. package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
  39. package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
  40. package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
  41. package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
  42. package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
  43. package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
  44. package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
  45. package/dist/_raw/docs/userguide/cli/build.md +85 -0
  46. package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
  47. package/dist/_raw/docs/userguide/cli/dev.md +92 -0
  48. package/dist/_raw/docs/userguide/cli/init.md +116 -0
  49. package/dist/_raw/docs/userguide/cli/servers.md +69 -0
  50. package/dist/_raw/docs/userguide/cli/stop.md +76 -0
  51. package/dist/_raw/docs/userguide/cli/update.md +78 -0
  52. package/dist/_raw/docs/userguide/cli/version.md +65 -0
  53. package/dist/_raw/docs/userguide/cli.md +34 -0
  54. package/dist/_raw/docs/userguide/sharing.md +94 -0
  55. package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
  56. package/dist/_raw/schemas.md +42 -0
  57. package/dist/assets/brand/kitfly-favicon-32.png +0 -0
  58. package/dist/assets/brand/kitfly-icon-64.png +0 -0
  59. package/dist/assets/brand/kitfly-logo-128.png +0 -0
  60. package/dist/assets/brand/kitfly-logo-512.png +0 -0
  61. package/dist/assets/brand/kitfly-logo.svg +12132 -0
  62. package/dist/assets/brand/kitfly-neon-128.png +0 -0
  63. package/dist/assets/brand/kitfly-neon-192.png +0 -0
  64. package/dist/assets/brand/kitfly-neon-256.png +0 -0
  65. package/dist/assets/brand/kitfly-neon.png +0 -0
  66. package/dist/assets/brand/palette.md +75 -0
  67. package/dist/content/deployment/index.html +11 -0
  68. package/dist/content/deployment/preflight.html +418 -0
  69. package/dist/content/deployment/recipes/aws-s3.html +421 -0
  70. package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
  71. package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
  72. package/dist/content/deployment/recipes/fly-io.html +356 -0
  73. package/dist/content/deployment/recipes/github-pages.html +414 -0
  74. package/dist/content/deployment/recipes/index.html +11 -0
  75. package/dist/content/deployment/recipes/netlify.html +394 -0
  76. package/dist/content/deployment/recipes/vercel.html +382 -0
  77. package/dist/content/deployment/secrets-and-env-vars.html +380 -0
  78. package/dist/content/deployment.html +426 -0
  79. package/dist/content/guide/approaches.html +501 -0
  80. package/dist/content/guide/features.html +436 -0
  81. package/dist/content/guide/getting-started.html +403 -0
  82. package/dist/content/guide/index.html +11 -0
  83. package/dist/content/guide/kitfly-overview.html +544 -0
  84. package/dist/content/index.html +11 -0
  85. package/dist/content/reference/configuration.html +580 -0
  86. package/dist/content/reference/design-catalog.html +449 -0
  87. package/dist/content/reference/environment-variables.html +367 -0
  88. package/dist/content/reference/glossary.html +368 -0
  89. package/dist/content/reference/index.html +11 -0
  90. package/dist/content/reference/key-concepts.html +399 -0
  91. package/dist/content/reference/plugins.html +491 -0
  92. package/dist/content/reference/slides-authoring-guidelines.html +418 -0
  93. package/dist/content/reference/structure.html +463 -0
  94. package/dist/content/reference.html +335 -0
  95. package/dist/content/templates/crucible.html +546 -0
  96. package/dist/content/templates/handbook.html +405 -0
  97. package/dist/content/templates/index.html +11 -0
  98. package/dist/content/templates/minimal.html +447 -0
  99. package/dist/content/templates/overview.html +558 -0
  100. package/dist/content/templates/pipeline.html +494 -0
  101. package/dist/content/templates/productbook.html +540 -0
  102. package/dist/content/templates/runbook.html +543 -0
  103. package/dist/content/templates/servicebook.html +523 -0
  104. package/dist/content-index.json +549 -0
  105. package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
  106. package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
  107. package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
  108. package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
  109. package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
  110. package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
  111. package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
  112. package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
  113. package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
  114. package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
  115. package/dist/docs/decisions/index.html +11 -0
  116. package/dist/docs/userguide/cli/build.html +408 -0
  117. package/dist/docs/userguide/cli/bundle.html +419 -0
  118. package/dist/docs/userguide/cli/dev.html +428 -0
  119. package/dist/docs/userguide/cli/index.html +11 -0
  120. package/dist/docs/userguide/cli/init.html +436 -0
  121. package/dist/docs/userguide/cli/servers.html +393 -0
  122. package/dist/docs/userguide/cli/stop.html +408 -0
  123. package/dist/docs/userguide/cli/update.html +406 -0
  124. package/dist/docs/userguide/cli/version.html +406 -0
  125. package/dist/docs/userguide/cli.html +386 -0
  126. package/dist/docs/userguide/index.html +11 -0
  127. package/dist/docs/userguide/sharing.html +465 -0
  128. package/dist/index.html +387 -0
  129. package/dist/llms.txt +18 -0
  130. package/dist/provenance.json +7 -0
  131. package/dist/schemas/index.html +11 -0
  132. package/dist/schemas/plugin-registry.schema.html +327 -0
  133. package/dist/schemas/plugin-schemas-notes.html +364 -0
  134. package/dist/schemas/plugin.schema.html +327 -0
  135. package/dist/schemas/plugins.schema.html +327 -0
  136. package/dist/schemas/v0/common.schema.html +386 -0
  137. package/dist/schemas/v0/index.html +11 -0
  138. package/dist/schemas/v0/plugin-registry.schema.html +547 -0
  139. package/dist/schemas/v0/plugin.schema.html +497 -0
  140. package/dist/schemas/v0/plugins.schema.html +406 -0
  141. package/dist/schemas/v0/site.schema.html +541 -0
  142. package/dist/schemas/v0/theme.schema.html +615 -0
  143. package/dist/schemas.html +351 -0
  144. package/dist/styles.css +1262 -0
  145. package/package.json +4 -2
  146. package/plugins-dist/callouts.css +32 -0
  147. package/plugins-dist/callouts.js +46 -0
  148. package/plugins-dist/slides-visuals.css +390 -0
  149. package/plugins-dist/slides-visuals.js +689 -0
  150. package/registry/plugins.yaml +35 -0
  151. package/schemas/README.md +10 -0
  152. package/schemas/plugin-registry.schema.json +5 -0
  153. package/schemas/plugin-schemas-notes.md +71 -0
  154. package/schemas/plugin.schema.json +5 -0
  155. package/schemas/plugins.schema.json +5 -0
  156. package/schemas/v0/common.schema.json +64 -0
  157. package/schemas/v0/plugin-registry.schema.json +225 -0
  158. package/schemas/v0/plugin.schema.json +175 -0
  159. package/schemas/v0/plugins.schema.json +84 -0
  160. package/schemas/v0/site.schema.json +56 -9
  161. package/schemas/v0/theme.schema.json +105 -22
  162. package/scripts/build.ts +158 -3
  163. package/scripts/bundle.ts +261 -95
  164. package/scripts/dev.ts +301 -11
  165. package/src/__tests__/build.test.ts +220 -1
  166. package/src/__tests__/bundle.test.ts +31 -0
  167. package/src/__tests__/cli.test.ts +14 -3
  168. package/src/__tests__/dev-plugin-errors.test.ts +20 -0
  169. package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
  170. package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
  171. package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
  172. package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-branching-no-source.md +5 -0
  173. package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-converging-no-target.md +6 -0
  174. package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
  175. package/src/__tests__/fixtures/fences/slides-visuals/invalid/staircase-empty-steps.md +3 -0
  176. package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
  177. package/src/__tests__/fixtures/fences/slides-visuals/invalid/timeline-horizontal-no-events.md +2 -0
  178. package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
  179. package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
  180. package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
  181. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching-no-split.md +7 -0
  182. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching.md +8 -0
  183. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging-no-merge.md +7 -0
  184. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging.md +8 -0
  185. package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
  186. package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
  187. package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
  188. package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
  189. package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
  190. package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
  191. package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase-down.md +7 -0
  192. package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase.md +8 -0
  193. package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
  194. package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-horizontal.md +9 -0
  195. package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-vertical.md +10 -0
  196. package/src/__tests__/init.test.ts +35 -0
  197. package/src/__tests__/plugin-loader.test.ts +221 -0
  198. package/src/__tests__/shared.test.ts +451 -0
  199. package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
  200. package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +147 -0
  201. package/src/__tests__/styles.test.ts +35 -0
  202. package/src/cli.ts +9 -4
  203. package/src/plugin-loader.ts +245 -0
  204. package/src/shared.ts +650 -7
  205. package/src/site/styles.css +331 -0
  206. package/src/site/template.html +66 -5
  207. package/src/templates/deck.ts +186 -0
  208. package/src/templates/driver.ts +11 -1
  209. package/src/templates/minimal.ts +1 -0
@@ -0,0 +1,92 @@
1
+ # kitfly dev
2
+
3
+ Start development server with hot reload.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ kitfly dev [folder] [options]
9
+ ```
10
+
11
+ ## Description
12
+
13
+ Launches a local development server that renders your markdown files and automatically reloads when content changes. This is the primary command for authoring documentation.
14
+
15
+ ## Arguments
16
+
17
+ | Argument | Description |
18
+ | -------- | -------------------------------------------------------------------------------- |
19
+ | `folder` | Content folder to serve (default: current directory or `docroot` from site.yaml) |
20
+
21
+ ## Options
22
+
23
+ | Option | Environment Variable | Default | Description |
24
+ | ---------------- | -------------------- | --------- | ------------------------------------- |
25
+ | `--port <n>` | `KITFLY_DEV_PORT` | 3333 | Server port |
26
+ | `--host <h>` | `KITFLY_DEV_HOST` | localhost | Server host |
27
+ | `--daemon`, `-d` | - | false | Run in background, return immediately |
28
+ | `--json` | - | false | Output JSON (implies --daemon) |
29
+ | `--no-open` | - | false | Don't open browser automatically |
30
+
31
+ ## Examples
32
+
33
+ ### Basic usage
34
+
35
+ ```bash
36
+ # Serve current directory
37
+ kitfly dev
38
+
39
+ # Serve specific folder
40
+ kitfly dev ./docs
41
+
42
+ # Custom port
43
+ kitfly dev --port 8080
44
+ ```
45
+
46
+ ### Background mode
47
+
48
+ ```bash
49
+ # Run as daemon
50
+ kitfly dev --daemon
51
+
52
+ # Get JSON output for scripting
53
+ kitfly dev --json
54
+ ```
55
+
56
+ ### Output (JSON mode)
57
+
58
+ ```json
59
+ {
60
+ "pid": 12345,
61
+ "port": 3333,
62
+ "url": "http://localhost:3333"
63
+ }
64
+ ```
65
+
66
+ ## Port Conflict Detection
67
+
68
+ If the specified port is already in use, kitfly will report an error rather than silently choosing another port. Use `kitfly servers` to see what's running.
69
+
70
+ ## Hot Reload
71
+
72
+ The dev server watches for changes to:
73
+
74
+ - Markdown files (`.md`)
75
+ - Configuration (`site.yaml`, `theme.yaml`)
76
+ - Template files
77
+
78
+ Changes are reflected immediately without manual refresh.
79
+
80
+ ## Plugin validation errors (triple-colon fences)
81
+
82
+ Some plugins add special block syntax (for example, `slides-visuals` uses `:::` fences).
83
+
84
+ When a plugin is enabled, kitfly may validate your content before rendering. If validation fails, `kitfly dev` will exit with a clear error message so you can fix the content and restart.
85
+
86
+ See the exact contract (with examples): `../../../content/reference/plugins.html#triple-colon-fence-contract-slides-visuals`.
87
+
88
+ ## See Also
89
+
90
+ - [kitfly build](build.md) - Build static site
91
+ - [kitfly servers](servers.md) - List running servers
92
+ - [kitfly stop](stop.md) - Stop servers
@@ -0,0 +1,116 @@
1
+ # kitfly init
2
+
3
+ Create new project from template.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ kitfly init [name] [options]
9
+ ```
10
+
11
+ ## Description
12
+
13
+ Initializes a new kitfly project with all necessary files and folder structure. Creates a standalone site that you own and can customize.
14
+
15
+ ## Arguments
16
+
17
+ | Argument | Description |
18
+ | -------- | --------------------------------------------------- |
19
+ | `name` | Project directory name (default: current directory) |
20
+
21
+ ## Options
22
+
23
+ | Option | Description |
24
+ | ------------------- | -------------------------------------------------------------------- |
25
+ | `--template <name>` | Template to use: `minimal`, `handbook`, `runbook` (default: minimal) |
26
+ | `--standalone` | Create self-contained site with rendering code (default: true) |
27
+ | `--brand <name>` | Set brand name |
28
+ | `--brand-url <url>` | Set brand URL |
29
+
30
+ ## Templates
31
+
32
+ ### minimal
33
+
34
+ Basic documentation site with simple structure:
35
+
36
+ - Single content section
37
+ - Clean starting point
38
+ - Minimal example content
39
+
40
+ ### handbook
41
+
42
+ Team/company handbook template:
43
+
44
+ - Multiple sections (About, Policies, Guides, Resources)
45
+ - Onboarding-focused structure
46
+ - Sample policies and guides
47
+
48
+ ### runbook
49
+
50
+ Operations runbook template:
51
+
52
+ - Procedures, Troubleshooting, Reference, Incidents sections
53
+ - Operations-focused structure
54
+ - Incident response templates
55
+
56
+ ## Examples
57
+
58
+ ### Basic usage
59
+
60
+ ```bash
61
+ # Create in new directory
62
+ kitfly init my-docs
63
+
64
+ # Create in current directory
65
+ kitfly init .
66
+
67
+ # Use handbook template
68
+ kitfly init company-handbook --template handbook
69
+ ```
70
+
71
+ ### With branding
72
+
73
+ ```bash
74
+ kitfly init my-docs --brand "Acme Corp" --brand-url "https://acme.com"
75
+ ```
76
+
77
+ ## Output Structure
78
+
79
+ ```
80
+ my-docs/
81
+ ├── content/
82
+ │ └── index.md
83
+ ├── scripts/
84
+ │ ├── dev.ts
85
+ │ ├── build.ts
86
+ │ └── bundle.ts
87
+ ├── src/
88
+ │ └── ...
89
+ ├── site.yaml
90
+ ├── theme.yaml
91
+ ├── package.json
92
+ └── README.md
93
+ ```
94
+
95
+ ## After Initialization
96
+
97
+ ```bash
98
+ cd my-docs
99
+ bun install
100
+ bun run dev
101
+ ```
102
+
103
+ ## Standalone Mode
104
+
105
+ By default, `kitfly init` creates a standalone site with its own copy of:
106
+
107
+ - Rendering scripts (dev, build, bundle)
108
+ - Engine and theme code
109
+ - Configuration schemas
110
+
111
+ This means your site is independent - no kitfly CLI required after setup.
112
+
113
+ ## See Also
114
+
115
+ - [kitfly update](update.md) - Update site code
116
+ - [kitfly dev](dev.md) - Start development
@@ -0,0 +1,69 @@
1
+ # kitfly servers
2
+
3
+ List running dev servers.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ kitfly servers [options]
9
+ ```
10
+
11
+ ## Description
12
+
13
+ Displays all kitfly dev servers currently running on this machine. Useful for managing multiple documentation projects or finding orphaned servers.
14
+
15
+ ## Options
16
+
17
+ | Option | Description |
18
+ | -------- | -------------- |
19
+ | `--json` | Output as JSON |
20
+
21
+ ## Examples
22
+
23
+ ### Basic usage
24
+
25
+ ```bash
26
+ $ kitfly servers
27
+ PORT PID PROJECT
28
+ 3333 12345 /Users/me/docs/handbook
29
+ 3340 12346 /Users/me/docs/runbook
30
+ ```
31
+
32
+ ### JSON output
33
+
34
+ ```bash
35
+ $ kitfly servers --json
36
+ [
37
+ {"port": 3333, "pid": 12345, "project": "/Users/me/docs/handbook"},
38
+ {"port": 3340, "pid": 12346, "project": "/Users/me/docs/runbook"}
39
+ ]
40
+ ```
41
+
42
+ ### No servers running
43
+
44
+ ```bash
45
+ $ kitfly servers
46
+ No kitfly servers running
47
+ ```
48
+
49
+ ## Output Fields
50
+
51
+ | Field | Description |
52
+ | --------- | ---------------------- |
53
+ | `PORT` | Server port number |
54
+ | `PID` | Process ID |
55
+ | `PROJECT` | Project directory path |
56
+
57
+ ## Server Registry
58
+
59
+ Kitfly maintains a registry of running servers at:
60
+
61
+ - macOS/Linux: `~/.kitfly/servers.json`
62
+ - Windows: `%USERPROFILE%\.kitfly\servers.json`
63
+
64
+ The registry is automatically cleaned up when servers stop normally.
65
+
66
+ ## See Also
67
+
68
+ - [kitfly dev](dev.md) - Start a server
69
+ - [kitfly stop](stop.md) - Stop servers
@@ -0,0 +1,76 @@
1
+ # kitfly stop
2
+
3
+ Stop dev server(s).
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ kitfly stop <port|all> [options]
9
+ ```
10
+
11
+ ## Description
12
+
13
+ Stops one or more running kitfly dev servers. Can target a specific port or stop all servers at once.
14
+
15
+ ## Arguments
16
+
17
+ | Argument | Description |
18
+ | -------- | ------------------------------- |
19
+ | `port` | Port number of server to stop |
20
+ | `all` | Stop all running kitfly servers |
21
+
22
+ ## Options
23
+
24
+ | Option | Description |
25
+ | --------- | ---------------------------------------- |
26
+ | `--force` | Skip graceful shutdown, kill immediately |
27
+
28
+ ## Examples
29
+
30
+ ### Stop specific server
31
+
32
+ ```bash
33
+ # Stop server on port 3333
34
+ kitfly stop 3333
35
+ ```
36
+
37
+ ### Stop all servers
38
+
39
+ ```bash
40
+ # Graceful shutdown of all servers
41
+ kitfly stop all
42
+ ```
43
+
44
+ ### Force stop
45
+
46
+ ```bash
47
+ # Immediate termination (use if graceful fails)
48
+ kitfly stop 3333 --force
49
+ kitfly stop all --force
50
+ ```
51
+
52
+ ## Graceful vs Force Shutdown
53
+
54
+ **Graceful** (default):
55
+
56
+ - Sends SIGTERM signal
57
+ - Allows server to clean up
58
+ - Waits briefly for process to exit
59
+
60
+ **Force** (`--force`):
61
+
62
+ - Sends SIGKILL signal
63
+ - Immediate termination
64
+ - Use when graceful shutdown hangs
65
+
66
+ ## Exit Codes
67
+
68
+ | Code | Meaning |
69
+ | ---- | ------------------------------------------------- |
70
+ | 0 | Server(s) stopped successfully |
71
+ | 1 | Error (server not found, permission denied, etc.) |
72
+
73
+ ## See Also
74
+
75
+ - [kitfly servers](servers.md) - List running servers
76
+ - [kitfly dev](dev.md) - Start a server
@@ -0,0 +1,78 @@
1
+ # kitfly update
2
+
3
+ Update standalone site code.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ kitfly update [version] [options]
9
+ ```
10
+
11
+ ## Description
12
+
13
+ Updates the kitfly rendering code in a standalone site to a newer version. Preserves your content and configuration while upgrading the engine.
14
+
15
+ > **Note**: This command is planned for v0.2.0 and may not be fully implemented yet.
16
+
17
+ ## Arguments
18
+
19
+ | Argument | Description |
20
+ | --------- | -------------------------------- |
21
+ | `version` | Target version (default: latest) |
22
+
23
+ ## Options
24
+
25
+ | Option | Description |
26
+ | ----------- | ------------------------------------------- |
27
+ | `--dry-run` | Preview changes without applying |
28
+ | `--force` | Update even if local modifications detected |
29
+
30
+ ## Examples
31
+
32
+ ### Basic usage
33
+
34
+ ```bash
35
+ # Update to latest version
36
+ kitfly update
37
+
38
+ # Update to specific version
39
+ kitfly update 0.2.0
40
+
41
+ # Preview changes first
42
+ kitfly update --dry-run
43
+ ```
44
+
45
+ ## What Gets Updated
46
+
47
+ - `scripts/dev.ts`, `scripts/build.ts`, `scripts/bundle.ts`
48
+ - `src/engine.ts`, `src/theme.ts`
49
+ - `src/site/template.html`, `src/site/styles.css`
50
+ - Schema files in `schemas/`
51
+
52
+ ## What Is Preserved
53
+
54
+ - `content/` - Your documentation
55
+ - `site.yaml` - Site configuration
56
+ - `theme.yaml` - Theme customization
57
+ - Custom modifications (with warning)
58
+
59
+ ## Modification Detection
60
+
61
+ Kitfly tracks file checksums to detect local modifications. If you've customized engine files:
62
+
63
+ 1. Update will warn about modifications
64
+ 2. Use `--force` to overwrite
65
+ 3. Or manually merge changes
66
+
67
+ ## Version Compatibility
68
+
69
+ Updates follow semantic versioning:
70
+
71
+ - **Patch** (0.1.x): Safe, backward-compatible fixes
72
+ - **Minor** (0.x.0): New features, may need config updates
73
+ - **Major** (x.0.0): Breaking changes, migration may be required
74
+
75
+ ## See Also
76
+
77
+ - [kitfly init](init.md) - Create new project
78
+ - [kitfly version](version.md) - Check current version
@@ -0,0 +1,65 @@
1
+ # kitfly version
2
+
3
+ Show version information.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ kitfly version [extended]
9
+ kitfly version --extended
10
+ kitfly --version
11
+ kitfly -v
12
+ ```
13
+
14
+ ## Description
15
+
16
+ Displays the current kitfly version. Use `extended` for detailed provenance information useful for debugging and support.
17
+
18
+ ## Options
19
+
20
+ | Option | Description |
21
+ | ------------ | ------------------------------------------------ |
22
+ | `extended` | Show extended version with git and platform info |
23
+ | `--extended` | Same as `extended` subcommand |
24
+
25
+ ## Output
26
+
27
+ ### Basic Version
28
+
29
+ ```bash
30
+ $ kitfly version
31
+ 0.1.0
32
+ ```
33
+
34
+ ### Extended Version
35
+
36
+ ```bash
37
+ $ kitfly version extended
38
+ kitfly 0.1.0
39
+ Git commit: b95c6a8
40
+ Git branch: main
41
+ Git status: clean
42
+ Bun: 1.3.7
43
+ Platform: darwin/arm64
44
+ ```
45
+
46
+ ## Extended Output Fields
47
+
48
+ | Field | Description |
49
+ | ------------ | --------------------------------------------------- |
50
+ | `kitfly` | Current version from VERSION file |
51
+ | `Git commit` | Short SHA of current commit |
52
+ | `Git branch` | Current git branch name |
53
+ | `Git status` | "clean" or "dirty (uncommitted changes)" |
54
+ | `Bun` | Bun runtime version |
55
+ | `Platform` | OS and architecture (e.g., darwin/arm64, linux/x64) |
56
+
57
+ ## Use Cases
58
+
59
+ - **Bug reports**: Include `kitfly version extended` output
60
+ - **Debugging**: Verify which version and commit is running
61
+ - **Support**: Confirm runtime environment
62
+
63
+ ## See Also
64
+
65
+ - [kitfly help](README.md)
@@ -0,0 +1,34 @@
1
+ # Kitfly CLI Reference
2
+
3
+ Command-line interface for kitfly - turn your writing into a website.
4
+
5
+ ## Quick Reference
6
+
7
+ | Command | Description |
8
+ | ---------------- | ---------------------------------------- |
9
+ | `kitfly dev` | Start development server with hot reload |
10
+ | `kitfly build` | Build static site to dist/ |
11
+ | `kitfly bundle` | Build single-file HTML bundle |
12
+ | `kitfly init` | Create new project from template |
13
+ | `kitfly update` | Update standalone site code |
14
+ | `kitfly servers` | List running dev servers |
15
+ | `kitfly stop` | Stop dev server(s) |
16
+ | `kitfly version` | Show version information |
17
+ | `kitfly help` | Show help message |
18
+
19
+ ## Global Behavior
20
+
21
+ - All commands read configuration from `site.yaml` if present
22
+ - Environment variables can override most options (prefixed with `KITFLY_`)
23
+ - Exit codes: 0 = success, 1 = error
24
+
25
+ ## Command Documentation
26
+
27
+ - [dev](dev.md) - Development server
28
+ - [build](build.md) - Static site generation
29
+ - [bundle](bundle.md) - Single-file HTML output
30
+ - [init](init.md) - Project initialization
31
+ - [update](update.md) - Site code updates
32
+ - [servers](servers.md) - Server management
33
+ - [stop](stop.md) - Stop servers
34
+ - [version](version.md) - Version information
@@ -0,0 +1,94 @@
1
+ ---
2
+ title: "Sharing Your Docs"
3
+ description: "How to send, host, and deploy kitfly output"
4
+ last_updated: "2026-02-09"
5
+ ---
6
+
7
+ # Sharing Your Docs
8
+
9
+ Kitfly has two export modes that serve different sharing needs.
10
+
11
+ ## Send It — Single HTML File
12
+
13
+ Use `kitfly bundle` when you need to share docs without hosting.
14
+
15
+ ```bash
16
+ kitfly bundle --name my-docs.html
17
+ ```
18
+
19
+ This produces one self-contained HTML file with everything inlined: content, styles, images (as base64), syntax highlighting, and diagrams. No server needed — just open the file.
20
+
21
+ ### When to use bundle
22
+
23
+ | Scenario | Example |
24
+ | ------------------- | --------------------------------------- |
25
+ | Email attachment | Send docs to a client or reviewer |
26
+ | Slack/Teams upload | Drop into a channel for quick reference |
27
+ | Shared drive | Put on Google Drive, Dropbox, OneDrive |
28
+ | USB/offline handoff | Works without internet |
29
+ | Review cycle | Stakeholders open in any browser |
30
+ | Archival | Point-in-time snapshot of your docs |
31
+
32
+ ### Bundle tips
33
+
34
+ - **File size**: Typical docs produce 100KB–1MB bundles. Image-heavy sites will be larger (base64 adds ~33% overhead per image).
35
+ - **Custom name**: Use `--name` to give the file a meaningful name for recipients (`--name q1-review.html`).
36
+ - **Strip raw markdown**: Use `--no-raw` if you don't want source `.md` accessible inside the bundle.
37
+
38
+ ## Host It — Static Site
39
+
40
+ Use `kitfly build` when you want to deploy to a web server.
41
+
42
+ ```bash
43
+ kitfly build --out ./dist
44
+ ```
45
+
46
+ This produces a `dist/` directory with standard HTML, CSS, and assets. Deploy it anywhere that serves static files.
47
+
48
+ ### Deployment targets
49
+
50
+ | Platform | How |
51
+ | ------------------ | --------------------------------------------------------------------------- |
52
+ | **GitHub Pages** | Push `dist/` to `gh-pages` branch or configure Pages to serve from a folder |
53
+ | **Netlify** | Set build command to `kitfly build`, publish directory to `dist` |
54
+ | **Vercel** | Same pattern — build command + output directory |
55
+ | **AWS S3** | Sync `dist/` to an S3 bucket with static hosting enabled |
56
+ | **Any web server** | Copy `dist/` contents to your server's document root |
57
+ | **Local preview** | `open dist/index.html` in your browser |
58
+
59
+ ### Build tips
60
+
61
+ - **Custom output**: `--out ./public` if your host expects a different directory name.
62
+ - **Raw markdown included**: By default, `.md` source files are copied alongside HTML for transparency. Use `--no-raw` to exclude them.
63
+ - **AI accessibility**: Build output includes `content-index.json`, `llms.txt`, and a `_raw/` directory so AI agents can read your docs. Use `--no-raw` to opt out.
64
+
65
+ ## Choosing Between Bundle and Build
66
+
67
+ | Need | Use |
68
+ | ----------------------------- | -------- |
69
+ | Share with one person | `bundle` |
70
+ | Share with a team (no server) | `bundle` |
71
+ | Publish to the web | `build` |
72
+ | Need search engine indexing | `build` |
73
+ | Must work offline (no setup) | `bundle` |
74
+ | CI/CD pipeline | `build` |
75
+ | Email attachment | `bundle` |
76
+ | GitHub Pages / Netlify | `build` |
77
+
78
+ You can use both — `bundle` for quick reviews, `build` for the published site.
79
+
80
+ ## Development Preview
81
+
82
+ During writing, use the dev server instead of building:
83
+
84
+ ```bash
85
+ kitfly dev
86
+ ```
87
+
88
+ This starts a local server at `http://localhost:3333` with hot reload. Edit any `.md` file and see changes instantly. When you're ready to share, switch to `bundle` or `build`.
89
+
90
+ ## See Also
91
+
92
+ - [kitfly build](cli/build.md) — Build command reference
93
+ - [kitfly bundle](cli/bundle.md) — Bundle command reference
94
+ - [kitfly dev](cli/dev.md) — Development server
@@ -0,0 +1,71 @@
1
+ ---
2
+ title: "Plugin Schema Notes"
3
+ description: "Rationale and validation rules for plugin.yaml and registry/plugins.yaml schemas"
4
+ last_updated: "2026-02-12"
5
+ status: "draft"
6
+ tags:
7
+ - plugins
8
+ - schemas
9
+ - supply-chain
10
+ ---
11
+
12
+ # Plugin Schema Notes (v0.2.0)
13
+
14
+ This note accompanies the draft schemas:
15
+
16
+ - `schemas/plugin.schema.json` → `schemas/v0/plugin.schema.json` (plugin.yaml)
17
+ - `schemas/plugin-registry.schema.json` → `schemas/v0/plugin-registry.schema.json` (registry/plugins.yaml)
18
+
19
+ ## Hook validation rules (plugin.yaml)
20
+
21
+ The `hooks` block is validated as a strict object:
22
+
23
+ - Allowed keys: `marked-extension`, `template-head`, `template-body-end`
24
+ - Value type: boolean (`true`/`false`) only
25
+ - Unknown keys: **invalid** (schema rejects via `additionalProperties: false`)
26
+
27
+ Rationale: Contract-first + minimal loader. Unknown hooks should be caught at validation time rather than ignored at runtime.
28
+
29
+ ## Supply chain constraints
30
+
31
+ - `dependencies.cdn[]` requires both `url` and `integrity`.
32
+ - `integrity` must be an SRI string (`sha256|sha384|sha512` + base64).
33
+ - Registry entries use **per-asset** SHA256 checksums: `assets.assetSha256.js` and/or `assets.assetSha256.css`.
34
+
35
+ Rationale: The brief mandates SRI on all CDN resources; the schema encodes this as required fields, not optional hints.
36
+
37
+ Rationale (checksums): Release-time `CHECKSUMS.yaml` is per-asset, and install-time verification should validate each fetched asset independently (JS and CSS can be cached and verified separately). Using an algorithm-specific field name (`assetSha256`) keeps room for future parallel algorithms without overloading a generic `checksums` structure.
38
+
39
+ ## Registry asset types
40
+
41
+ The registry schema intentionally only supports `assets.js` and `assets.css` in v0.2.0.
42
+
43
+ Rationale: Keep the contract minimal; add additional asset types only when a concrete plugin requires them.
44
+
45
+ ## Local registries (`baseUrl: ""`)
46
+
47
+ For offline/local registries that only reference on-disk assets (e.g. `plugins-dist/...`), `baseUrl` may be an empty string.
48
+
49
+ ## Mode allowlisting (`modes`)
50
+
51
+ Both plugin manifests (`plugin.yaml`) and registry entries may include an optional `modes` field.
52
+
53
+ Semantics:
54
+
55
+ - Omitted: allowed in **all** Kitfly modes
56
+ - Present with values (e.g. `["docs"]`): allowed only in those modes
57
+ - Present but empty (`[]`): blocked in **all** modes (useful for temporarily disabling a plugin without removing it from `kitfly.plugins.yaml`)
58
+
59
+ Rationale: Kitfly has two primary rendering modes (`docs` and `slides`). Mode allowlisting is an intentionally small mechanism to keep plugins predictable and easy to dogfood across both surfaces.
60
+
61
+ ## Version range validation
62
+
63
+ The `kitfly` field is required and validated as a simple “space-separated comparator” string (e.g. `>=0.2.0 <1.0.0`).
64
+
65
+ Rationale: JSON Schema cannot fully validate npm/semver range syntax without embedding a custom parser. This pattern check is intentionally minimal: it enforces “looks like comparator(s) + semver” while leaving exact semantics to the loader.
66
+
67
+ ## Atomic plugins (no plugin-to-plugin dependencies)
68
+
69
+ The schema defines `dependencies` with `additionalProperties: false` and only allows a `cdn` field.
70
+
71
+ Rationale: This makes `dependencies.plugins` (or any other dependency category) invalid by construction, matching the “atomic plugins” decision.