@arizeai/phoenix-cli 0.8.0 → 0.9.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.
- package/README.md +23 -0
- package/build/cli.d.ts.map +1 -1
- package/build/cli.js +3 -1
- package/build/cli.js.map +1 -1
- package/build/commands/docs.d.ts +42 -0
- package/build/commands/docs.d.ts.map +1 -0
- package/build/commands/docs.js +337 -0
- package/build/commands/docs.js.map +1 -0
- package/build/commands/index.d.ts +1 -0
- package/build/commands/index.d.ts.map +1 -1
- package/build/commands/index.js +1 -0
- package/build/commands/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -256,6 +256,29 @@ $ px api graphql '{ projectCount datasetCount promptCount evaluatorCount }'
|
|
|
256
256
|
|
|
257
257
|
---
|
|
258
258
|
|
|
259
|
+
### `px docs fetch`
|
|
260
|
+
|
|
261
|
+
Download Phoenix documentation markdown files for use by coding agents. Fetches pages from the [llms.txt](https://arize.com/docs/phoenix/llms.txt) index, filtered by workflow category, and writes them to a local directory with auto-generated index files.
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
px docs fetch # fetch default workflows
|
|
265
|
+
px docs fetch --workflow tracing # fetch only tracing docs
|
|
266
|
+
px docs fetch --workflow tracing --workflow evaluation
|
|
267
|
+
px docs fetch --dry-run # preview without downloading
|
|
268
|
+
px docs fetch --refresh # clear output dir and re-download
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
| Option | Description | Default |
|
|
272
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
273
|
+
| `--workflow <name>` | Filter by workflow category (repeatable). Values: `tracing`, `evaluation`, `datasets`, `prompts`, `integrations`, `sdk`, `self-hosting`, `all` | `tracing`, `evaluation`, `datasets`, `prompts`, `integrations` |
|
|
274
|
+
| `--output-dir <dir>` | Output directory for downloaded docs | `.px/docs` |
|
|
275
|
+
| `--dry-run` | Discover links only; do not write files | `false` |
|
|
276
|
+
| `--refresh` | Clear output directory before downloading | `false` |
|
|
277
|
+
| `--strict` | Fail command if any page download fails | `false` |
|
|
278
|
+
| `--workers <n>` | Number of concurrent download workers | `10` |
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
259
282
|
## JSON output shape
|
|
260
283
|
|
|
261
284
|
All commands output JSON. Use `--format raw` for compact JSON and `--no-progress` to suppress stderr when piping:
|
package/build/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAwBA,wBAAgB,IAAI,SA8BnB"}
|
package/build/cli.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { printBanner } from "./banner.js";
|
|
4
|
-
import { createAnnotationConfigCommand, createApiCommand, createAuthCommand, createDatasetCommand, createDatasetsCommand, createExperimentCommand, createExperimentsCommand, createProjectsCommand, createPromptCommand, createPromptsCommand, createSessionCommand, createSessionsCommand, createTraceCommand, createTracesCommand, } from "./commands/index.js";
|
|
4
|
+
import { createAnnotationConfigCommand, createApiCommand, createAuthCommand, createDatasetCommand, createDatasetsCommand, createDocsCommand, createExperimentCommand, createExperimentsCommand, createProjectsCommand, createPromptCommand, createPromptsCommand, createSessionCommand, createSessionsCommand, createTraceCommand, createTracesCommand, } from "./commands/index.js";
|
|
5
5
|
// Phoenix CLI Main Logic
|
|
6
6
|
export function main() {
|
|
7
7
|
const program = new Command();
|
|
8
8
|
program.name("px");
|
|
9
|
+
program.enablePositionalOptions();
|
|
9
10
|
// Register commands
|
|
10
11
|
program.addCommand(createAnnotationConfigCommand());
|
|
11
12
|
program.addCommand(createAuthCommand());
|
|
@@ -21,6 +22,7 @@ export function main() {
|
|
|
21
22
|
program.addCommand(createPromptsCommand());
|
|
22
23
|
program.addCommand(createPromptCommand());
|
|
23
24
|
program.addCommand(createApiCommand());
|
|
25
|
+
program.addCommand(createDocsCommand());
|
|
24
26
|
// Show banner and help if no command provided
|
|
25
27
|
if (process.argv.length === 2) {
|
|
26
28
|
printBanner();
|
package/build/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,yBAAyB;AACzB,MAAM,UAAU,IAAI;IAClB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,yBAAyB;AACzB,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|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
export interface DocEntry {
|
|
3
|
+
title: string;
|
|
4
|
+
url: string;
|
|
5
|
+
description: string;
|
|
6
|
+
section: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Parse an llms.txt file into doc entries.
|
|
10
|
+
*
|
|
11
|
+
* The Phoenix llms.txt follows the llmstxt.org standard format:
|
|
12
|
+
* ## Section — top-level sections
|
|
13
|
+
* ### Subsection — subsections (inherit parent ## section)
|
|
14
|
+
* - [Title](url): Description
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseLlmsTxt(content: string): DocEntry[];
|
|
17
|
+
/**
|
|
18
|
+
* Filter doc entries by workflow categories. Returns all entries if
|
|
19
|
+
* workflows is empty or contains ALL_WORKFLOWS.
|
|
20
|
+
*/
|
|
21
|
+
export declare function filterByWorkflows(entries: DocEntry[], workflows: string[]): DocEntry[];
|
|
22
|
+
/**
|
|
23
|
+
* Convert a Phoenix docs URL to a local file path.
|
|
24
|
+
* Strips the common prefix and appends `.md`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function urlToFilePath(url: string, outputDir: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Group doc entries by their section name (lowercased).
|
|
29
|
+
*/
|
|
30
|
+
export declare function groupBySection(entries: DocEntry[]): Map<string, DocEntry[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Generate the content for the top-level README.md index file.
|
|
33
|
+
*/
|
|
34
|
+
export declare function generateReadme(entries: DocEntry[], grouped?: Map<string, DocEntry[]>): string;
|
|
35
|
+
/**
|
|
36
|
+
* Generate the content for a section-level _index.md file.
|
|
37
|
+
* Uses paths relative to the section directory (derived from the first
|
|
38
|
+
* entry's file path) so that links work from the _index.md location.
|
|
39
|
+
*/
|
|
40
|
+
export declare function generateSectionIndex(section: string, entries: DocEntry[]): string;
|
|
41
|
+
export declare function createDocsCommand(): Command;
|
|
42
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAyCD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CA6BxD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,QAAQ,EAAE,EACnB,SAAS,EAAE,MAAM,EAAE,GAClB,QAAQ,EAAE,CAuBZ;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAMpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAY3E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,QAAQ,EAAE,EACnB,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAChC,MAAM,CAmBR;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,QAAQ,EAAE,GAClB,MAAM,CAkBR;AAwOD,wBAAgB,iBAAiB,IAAI,OAAO,CAqB3C"}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import * as fsPromises from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
import { ExitCode, getExitCodeForError } from "../exitCodes.js";
|
|
5
|
+
import { writeError, writeOutput } from "../io.js";
|
|
6
|
+
const LLMS_TXT_URL = "https://arize.com/docs/phoenix/llms.txt";
|
|
7
|
+
const PHOENIX_DOCS_PREFIX = "https://arize.com/docs/phoenix/";
|
|
8
|
+
const DEFAULT_OUTPUT_DIR = ".px/docs";
|
|
9
|
+
const DEFAULT_WORKERS = 10;
|
|
10
|
+
const ALL_WORKFLOWS = "all";
|
|
11
|
+
/**
|
|
12
|
+
* Maps user-facing workflow names to the top-level `##` section headings
|
|
13
|
+
* in the llms.txt index. Entries under `###` subsections inherit their
|
|
14
|
+
* parent `##` section.
|
|
15
|
+
*/
|
|
16
|
+
const WORKFLOW_SECTION_MAP = {
|
|
17
|
+
tracing: ["tracing"],
|
|
18
|
+
evaluation: ["evaluation"],
|
|
19
|
+
datasets: ["datasets & experiments"],
|
|
20
|
+
prompts: ["prompt engineering"],
|
|
21
|
+
integrations: ["integrations"],
|
|
22
|
+
sdk: ["sdk & api reference"],
|
|
23
|
+
"self-hosting": ["self-hosting"],
|
|
24
|
+
};
|
|
25
|
+
const VALID_WORKFLOWS = Object.keys(WORKFLOW_SECTION_MAP);
|
|
26
|
+
/** The default set fetched when no --workflow is specified. */
|
|
27
|
+
const DEFAULT_WORKFLOWS = [
|
|
28
|
+
"tracing",
|
|
29
|
+
"evaluation",
|
|
30
|
+
"datasets",
|
|
31
|
+
"prompts",
|
|
32
|
+
"integrations",
|
|
33
|
+
];
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Pure functions (exported for testing)
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
/**
|
|
38
|
+
* Parse an llms.txt file into doc entries.
|
|
39
|
+
*
|
|
40
|
+
* The Phoenix llms.txt follows the llmstxt.org standard format:
|
|
41
|
+
* ## Section — top-level sections
|
|
42
|
+
* ### Subsection — subsections (inherit parent ## section)
|
|
43
|
+
* - [Title](url): Description
|
|
44
|
+
*/
|
|
45
|
+
export function parseLlmsTxt(content) {
|
|
46
|
+
const entries = [];
|
|
47
|
+
let currentSection = "";
|
|
48
|
+
for (const rawLine of content.split("\n")) {
|
|
49
|
+
const line = rawLine.trim();
|
|
50
|
+
// Track top-level ## section headings (subsections ### inherit the parent)
|
|
51
|
+
const topSectionMatch = line.match(/^##\s+(?!#)(.+)/);
|
|
52
|
+
if (topSectionMatch) {
|
|
53
|
+
currentSection = topSectionMatch[1].trim();
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
// Parse: - [Title](url): Description
|
|
57
|
+
const entryMatch = line.match(/^-\s+\[([^\]]+)\]\((https?:\/\/[^)]+)\)(?::\s+(.*))?$/);
|
|
58
|
+
if (entryMatch) {
|
|
59
|
+
entries.push({
|
|
60
|
+
title: entryMatch[1],
|
|
61
|
+
url: entryMatch[2],
|
|
62
|
+
description: entryMatch[3] ?? "",
|
|
63
|
+
section: currentSection,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return entries;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Filter doc entries by workflow categories. Returns all entries if
|
|
71
|
+
* workflows is empty or contains ALL_WORKFLOWS.
|
|
72
|
+
*/
|
|
73
|
+
export function filterByWorkflows(entries, workflows) {
|
|
74
|
+
if (workflows.length === 0) {
|
|
75
|
+
return entries;
|
|
76
|
+
}
|
|
77
|
+
const normalized = workflows.map((workflow) => workflow.toLowerCase());
|
|
78
|
+
if (normalized.includes(ALL_WORKFLOWS)) {
|
|
79
|
+
return entries;
|
|
80
|
+
}
|
|
81
|
+
const allowedSections = new Set();
|
|
82
|
+
for (const key of normalized) {
|
|
83
|
+
const mapped = WORKFLOW_SECTION_MAP[key];
|
|
84
|
+
if (mapped) {
|
|
85
|
+
for (const section of mapped) {
|
|
86
|
+
allowedSections.add(section);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return entries.filter((entry) => allowedSections.has(entry.section.toLowerCase()));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Convert a Phoenix docs URL to a local file path.
|
|
94
|
+
* Strips the common prefix and appends `.md`.
|
|
95
|
+
*/
|
|
96
|
+
export function urlToFilePath(url, outputDir) {
|
|
97
|
+
let relative = url.startsWith(PHOENIX_DOCS_PREFIX)
|
|
98
|
+
? url.slice(PHOENIX_DOCS_PREFIX.length)
|
|
99
|
+
: url;
|
|
100
|
+
relative = relative.replace(/^\/+|\/+$/g, "");
|
|
101
|
+
return path.join(outputDir, `${relative}.md`);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Group doc entries by their section name (lowercased).
|
|
105
|
+
*/
|
|
106
|
+
export function groupBySection(entries) {
|
|
107
|
+
const groups = new Map();
|
|
108
|
+
for (const entry of entries) {
|
|
109
|
+
const section = entry.section.toLowerCase();
|
|
110
|
+
const group = groups.get(section);
|
|
111
|
+
if (group) {
|
|
112
|
+
group.push(entry);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
groups.set(section, [entry]);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return groups;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Generate the content for the top-level README.md index file.
|
|
122
|
+
*/
|
|
123
|
+
export function generateReadme(entries, grouped) {
|
|
124
|
+
const lines = [
|
|
125
|
+
"# Phoenix Docs",
|
|
126
|
+
"",
|
|
127
|
+
"Generated by `px docs fetch`.",
|
|
128
|
+
"",
|
|
129
|
+
];
|
|
130
|
+
const sections = grouped ?? groupBySection(entries);
|
|
131
|
+
for (const [section, sectionEntries] of sections) {
|
|
132
|
+
lines.push(`## ${section}`);
|
|
133
|
+
for (const entry of sectionEntries) {
|
|
134
|
+
const filePath = urlToFilePath(entry.url, "").replace(/^\/+/, "");
|
|
135
|
+
lines.push(`- [${entry.title}](${filePath})`);
|
|
136
|
+
}
|
|
137
|
+
lines.push("");
|
|
138
|
+
}
|
|
139
|
+
return lines.join("\n");
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Generate the content for a section-level _index.md file.
|
|
143
|
+
* Uses paths relative to the section directory (derived from the first
|
|
144
|
+
* entry's file path) so that links work from the _index.md location.
|
|
145
|
+
*/
|
|
146
|
+
export function generateSectionIndex(section, entries) {
|
|
147
|
+
const lines = [`# ${section} Docs`, ""];
|
|
148
|
+
// Determine the section directory from the first entry
|
|
149
|
+
const firstFilePath = urlToFilePath(entries[0].url, "").replace(/^\/+/, "");
|
|
150
|
+
const sectionDir = firstFilePath.split(path.sep)[0];
|
|
151
|
+
for (const entry of entries) {
|
|
152
|
+
const filePath = urlToFilePath(entry.url, "").replace(/^\/+/, "");
|
|
153
|
+
// Strip the section directory prefix to get a relative path
|
|
154
|
+
const relativePath = filePath.startsWith(sectionDir + path.sep)
|
|
155
|
+
? filePath.slice(sectionDir.length + 1)
|
|
156
|
+
: filePath;
|
|
157
|
+
lines.push(`- [${entry.title}](${relativePath})`);
|
|
158
|
+
lines.push(` source: \`${entry.url}.md\``);
|
|
159
|
+
}
|
|
160
|
+
return lines.join("\n") + "\n";
|
|
161
|
+
}
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
// Fetch helpers
|
|
164
|
+
// ---------------------------------------------------------------------------
|
|
165
|
+
async function fetchAndSave(entry, outputDir) {
|
|
166
|
+
const markdownUrl = entry.url.endsWith(".md") ? entry.url : `${entry.url}.md`;
|
|
167
|
+
const response = await fetch(markdownUrl);
|
|
168
|
+
if (!response.ok) {
|
|
169
|
+
throw new Error(`HTTP ${response.status} for ${markdownUrl}`);
|
|
170
|
+
}
|
|
171
|
+
const content = await response.text();
|
|
172
|
+
const filePath = urlToFilePath(entry.url, outputDir);
|
|
173
|
+
await fsPromises.mkdir(path.dirname(filePath), { recursive: true });
|
|
174
|
+
await fsPromises.writeFile(filePath, content, "utf-8");
|
|
175
|
+
}
|
|
176
|
+
async function fetchWithConcurrency(entries, outputDir, workers) {
|
|
177
|
+
const succeeded = [];
|
|
178
|
+
const failed = [];
|
|
179
|
+
for (let offset = 0; offset < entries.length; offset += workers) {
|
|
180
|
+
const batch = entries.slice(offset, offset + workers);
|
|
181
|
+
const results = await Promise.allSettled(batch.map((entry) => fetchAndSave(entry, outputDir).then(() => entry)));
|
|
182
|
+
for (let index = 0; index < results.length; index++) {
|
|
183
|
+
const result = results[index];
|
|
184
|
+
if (result.status === "fulfilled") {
|
|
185
|
+
succeeded.push(result.value);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
failed.push({
|
|
189
|
+
entry: batch[index],
|
|
190
|
+
error: result.reason instanceof Error
|
|
191
|
+
? result.reason.message
|
|
192
|
+
: String(result.reason),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return { succeeded, failed };
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Write the README.md and per-section _index.md files.
|
|
201
|
+
*/
|
|
202
|
+
async function writeIndexFiles(entries, outputDir) {
|
|
203
|
+
const grouped = groupBySection(entries);
|
|
204
|
+
// Top-level README.md
|
|
205
|
+
const readmeContent = generateReadme(entries, grouped);
|
|
206
|
+
await fsPromises.writeFile(path.join(outputDir, "README.md"), readmeContent, "utf-8");
|
|
207
|
+
// Per-section _index.md files
|
|
208
|
+
for (const [section, sectionEntries] of grouped) {
|
|
209
|
+
const indexContent = generateSectionIndex(section, sectionEntries);
|
|
210
|
+
// Derive the section directory from the first entry's file path
|
|
211
|
+
const firstFilePath = urlToFilePath(sectionEntries[0].url, outputDir);
|
|
212
|
+
const sectionDir = path.dirname(firstFilePath);
|
|
213
|
+
await fsPromises.mkdir(sectionDir, { recursive: true });
|
|
214
|
+
await fsPromises.writeFile(path.join(sectionDir, "_index.md"), indexContent, "utf-8");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
// ---------------------------------------------------------------------------
|
|
218
|
+
// Handler
|
|
219
|
+
// ---------------------------------------------------------------------------
|
|
220
|
+
function formatEntryLine(entry, target) {
|
|
221
|
+
const section = entry.section.toLowerCase();
|
|
222
|
+
return ` - ${entry.title} [${section}] -> ${target}`;
|
|
223
|
+
}
|
|
224
|
+
async function docsFetchHandler(options) {
|
|
225
|
+
// Fetch llms.txt index
|
|
226
|
+
let response;
|
|
227
|
+
try {
|
|
228
|
+
response = await fetch(LLMS_TXT_URL);
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
const message = error instanceof Error ? error.message : "Unknown error occurred";
|
|
232
|
+
writeError({ message: `Error fetching llms.txt: ${message}` });
|
|
233
|
+
process.exit(getExitCodeForError(error));
|
|
234
|
+
}
|
|
235
|
+
if (!response.ok) {
|
|
236
|
+
writeError({
|
|
237
|
+
message: `Failed to fetch llms.txt: HTTP ${response.status}`,
|
|
238
|
+
});
|
|
239
|
+
process.exit(ExitCode.NETWORK_ERROR);
|
|
240
|
+
}
|
|
241
|
+
writeOutput({ message: `Fetched docs index: ${LLMS_TXT_URL}` });
|
|
242
|
+
const indexContent = await response.text();
|
|
243
|
+
// Parse and filter
|
|
244
|
+
let entries = parseLlmsTxt(indexContent);
|
|
245
|
+
const workflows = options.workflow && options.workflow.length > 0
|
|
246
|
+
? options.workflow
|
|
247
|
+
: DEFAULT_WORKFLOWS;
|
|
248
|
+
for (const workflow of workflows) {
|
|
249
|
+
const key = workflow.toLowerCase();
|
|
250
|
+
if (key !== ALL_WORKFLOWS && !VALID_WORKFLOWS.includes(key)) {
|
|
251
|
+
writeError({
|
|
252
|
+
message: `Warning: unknown workflow "${workflow}". Valid values: ${VALID_WORKFLOWS.join(", ")}, all`,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
entries = filterByWorkflows(entries, workflows);
|
|
257
|
+
writeOutput({ message: `Workflows: ${workflows.join(", ")}` });
|
|
258
|
+
if (entries.length === 0) {
|
|
259
|
+
writeOutput({ message: "No matching pages found." });
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
// Dry run — show what would be fetched
|
|
263
|
+
if (options.dryRun) {
|
|
264
|
+
writeOutput({
|
|
265
|
+
message: `Discovered ${entries.length} page(s), wrote 0 page(s) (dry-run)`,
|
|
266
|
+
});
|
|
267
|
+
for (const entry of entries) {
|
|
268
|
+
writeOutput({
|
|
269
|
+
message: formatEntryLine(entry, `${entry.url}.md`),
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
// Refresh — clear output dir
|
|
275
|
+
if (options.refresh) {
|
|
276
|
+
await fsPromises.rm(options.outputDir, { recursive: true, force: true });
|
|
277
|
+
}
|
|
278
|
+
await fsPromises.mkdir(options.outputDir, { recursive: true });
|
|
279
|
+
// Fetch and save
|
|
280
|
+
const { succeeded, failed } = await fetchWithConcurrency(entries, options.outputDir, options.workers);
|
|
281
|
+
// Write index files for successfully fetched entries
|
|
282
|
+
if (succeeded.length > 0) {
|
|
283
|
+
await writeIndexFiles(succeeded, options.outputDir);
|
|
284
|
+
}
|
|
285
|
+
writeOutput({
|
|
286
|
+
message: `Discovered ${entries.length} page(s), wrote ${succeeded.length} page(s)`,
|
|
287
|
+
});
|
|
288
|
+
for (const entry of succeeded) {
|
|
289
|
+
writeOutput({
|
|
290
|
+
message: formatEntryLine(entry, urlToFilePath(entry.url, options.outputDir)),
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
if (failed.length > 0) {
|
|
294
|
+
for (const { entry, error } of failed) {
|
|
295
|
+
writeError({
|
|
296
|
+
message: ` - ${entry.title} [${entry.section.toLowerCase()}] FAILED: ${error}`,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
if (options.strict) {
|
|
300
|
+
process.exit(ExitCode.FAILURE);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
305
|
+
// Shared option helpers
|
|
306
|
+
// ---------------------------------------------------------------------------
|
|
307
|
+
/** Add all docs-specific options to a command. */
|
|
308
|
+
function addDocsOptions(command) {
|
|
309
|
+
return command
|
|
310
|
+
.option("--workflow <name>", `Filter by workflow category (repeatable) [possible values: ${VALID_WORKFLOWS.join(", ")}, all] [default: ${DEFAULT_WORKFLOWS.join(", ")}]`, (value, previous) => previous.concat([value]), [])
|
|
311
|
+
.option("--output-dir <dir>", "Output directory for downloaded docs", DEFAULT_OUTPUT_DIR)
|
|
312
|
+
.option("--dry-run", "Discover links only; do not write files", false)
|
|
313
|
+
.option("--refresh", "Refresh docs by clearing output directory before download", false)
|
|
314
|
+
.option("--strict", "Fail command if any page download fails", false)
|
|
315
|
+
.option("--workers <n>", "Number of concurrent workers for docs downloads", parseInt, DEFAULT_WORKERS);
|
|
316
|
+
}
|
|
317
|
+
// ---------------------------------------------------------------------------
|
|
318
|
+
// Command factories
|
|
319
|
+
// ---------------------------------------------------------------------------
|
|
320
|
+
export function createDocsCommand() {
|
|
321
|
+
const command = new Command("docs");
|
|
322
|
+
command.description("Manage workflow docs for coding agents");
|
|
323
|
+
command.enablePositionalOptions();
|
|
324
|
+
command.passThroughOptions();
|
|
325
|
+
// All options live on the parent so `px docs --help` shows them
|
|
326
|
+
addDocsOptions(command);
|
|
327
|
+
command.action(docsFetchHandler);
|
|
328
|
+
// `fetch` is a convenience alias — it re-parses its own argv so
|
|
329
|
+
// `px docs fetch --workflow X` works identically to `px docs --workflow X`.
|
|
330
|
+
const fetchCommand = new Command("fetch");
|
|
331
|
+
fetchCommand.description("Download workflow docs markdown from llms.txt index");
|
|
332
|
+
addDocsOptions(fetchCommand);
|
|
333
|
+
fetchCommand.action(docsFetchHandler);
|
|
334
|
+
command.addCommand(fetchCommand);
|
|
335
|
+
return command;
|
|
336
|
+
}
|
|
337
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,WAAW,CA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":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
|