@bytesbybrandon/living-docs 0.3.1 → 0.3.2
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.
- package/docs/guide/cli.md +1 -0
- package/package.json +1 -1
- package/src/axi/cli.js +6 -2
- package/src/mcp/server.js +2 -1
- package/src/version.js +5 -0
package/docs/guide/cli.md
CHANGED
|
@@ -5,6 +5,7 @@ The `living-docs-axi` command follows the AXI principles: compact TOON-style out
|
|
|
5
5
|
```text
|
|
6
6
|
living-docs-axi home: themes, built docs, next steps
|
|
7
7
|
living-docs-axi themes theme list with when to use each
|
|
8
|
+
living-docs-axi version print the version only, also --version or -v
|
|
8
9
|
living-docs-axi schema [--block figure] block fields and types
|
|
9
10
|
living-docs-axi ingest <path|url|-> outline, or --section <n|id> for one section
|
|
10
11
|
living-docs-axi ingest <path> --draft write a model, with a drafted timeline, from the source
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytesbybrandon/living-docs",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Turn a source document into a designed, self-contained living doc: academic paper, dark reading notes, or telemetry console. Ships an AXI CLI and an MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/axi/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ import { validateDoc, formatErrors } from '../model/validate.js';
|
|
|
9
9
|
import { BLOCKS, THEMES, META, STYLE, blockFieldSummary } from '../model/schema.js';
|
|
10
10
|
import { createPreviewServer } from '../server/preview.js';
|
|
11
11
|
import { exportVideo, FORMATS } from '../export/video.js';
|
|
12
|
+
import { VERSION } from '../version.js';
|
|
12
13
|
|
|
13
14
|
const HOME = os.homedir();
|
|
14
15
|
const BIN = fileURLToPath(new URL('../../bin/living-docs-axi.js', import.meta.url));
|
|
@@ -36,13 +37,14 @@ const FLAGS = {
|
|
|
36
37
|
'--size': 'value',
|
|
37
38
|
'--fps': 'value',
|
|
38
39
|
'--scale': 'value',
|
|
39
|
-
'--help': 'bool', '-h': 'bool'
|
|
40
|
+
'--help': 'bool', '-h': 'bool',
|
|
41
|
+
'--version': 'bool', '-v': 'bool'
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
function parseArgs(argv) {
|
|
43
45
|
const positionals = [];
|
|
44
46
|
const flags = {};
|
|
45
|
-
const canonical = { '-o': 'out', '-h': 'help' };
|
|
47
|
+
const canonical = { '-o': 'out', '-h': 'help', '-v': 'version' };
|
|
46
48
|
for (let i = 0; i < argv.length; i++) {
|
|
47
49
|
const token = argv[i];
|
|
48
50
|
if (!token.startsWith('-') || token === '-') { positionals.push(token); continue; }
|
|
@@ -394,6 +396,7 @@ const COMMAND_HELP = {
|
|
|
394
396
|
validate: 'validate <model.json|->',
|
|
395
397
|
preview: 'preview [file|dir] [--port <n>] [--no-open]',
|
|
396
398
|
themes: 'themes',
|
|
399
|
+
version: 'version',
|
|
397
400
|
schema: 'schema [--block <type>]'
|
|
398
401
|
};
|
|
399
402
|
|
|
@@ -417,6 +420,7 @@ export async function main(argv) {
|
|
|
417
420
|
return [`error: ${error.message}`, usage()].join('\n');
|
|
418
421
|
}
|
|
419
422
|
const { command, args, flags } = parsed;
|
|
423
|
+
if (flags.version || command === 'version') return VERSION;
|
|
420
424
|
if (flags.help || flags.h || command === 'help') return usage(command === 'help' ? args[0] : command);
|
|
421
425
|
|
|
422
426
|
try {
|
package/src/mcp/server.js
CHANGED
|
@@ -9,6 +9,7 @@ import { validateDoc, formatErrors } from '../model/validate.js';
|
|
|
9
9
|
import { BLOCKS, THEMES, STYLE, blockFieldSummary } from '../model/schema.js';
|
|
10
10
|
import { createPreviewServer } from '../server/preview.js';
|
|
11
11
|
import { exportVideo, FORMATS } from '../export/video.js';
|
|
12
|
+
import { VERSION } from '../version.js';
|
|
12
13
|
|
|
13
14
|
const quoteCell = value => {
|
|
14
15
|
const text = String(value ?? '');
|
|
@@ -256,7 +257,7 @@ async function handle(name, args = {}) {
|
|
|
256
257
|
|
|
257
258
|
export function createServer() {
|
|
258
259
|
const server = new Server(
|
|
259
|
-
{ name: 'living-docs', version:
|
|
260
|
+
{ name: 'living-docs', version: VERSION },
|
|
260
261
|
{
|
|
261
262
|
capabilities: { tools: {} },
|
|
262
263
|
instructions: 'Turn source documents into designed living docs. Ingest to get an outline, author a document model against the schema, then render with a theme from living_docs_themes. A draft without a theme picks a look from the source.'
|