create-dox 0.3.0 → 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/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/{chunk-UCHJJQVK.js → chunk-673L75C2.js} +41 -6
- package/dist/{chunk-HHVOU4Q2.js → chunk-AFJGDIXU.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/migrate/index.js +2 -2
- package/dist/scaffold.js +1 -1
- package/package.json +18 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ekene Eze
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# create-dox
|
|
2
|
+
|
|
3
|
+
Scaffold a new [Dox](https://github.com/kenny-io/Dox) documentation project — an
|
|
4
|
+
agent-native docs site that serves every page to humans as polished HTML and to
|
|
5
|
+
AI agents as structured JSON, JSON-LD, and Markdown from the same URL.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx create-dox my-docs
|
|
11
|
+
cd my-docs
|
|
12
|
+
npm run dev
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then open [http://localhost:3040](http://localhost:3040). A freshly scaffolded
|
|
16
|
+
site is agent-ready out of the box and scores 100/A on the built-in
|
|
17
|
+
[Agent Readiness Score](https://github.com/kenny-io/Dox).
|
|
18
|
+
|
|
19
|
+
Run non-interactively with smart defaults:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx create-dox my-docs --yes
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## What you get
|
|
26
|
+
|
|
27
|
+
- **MDX content** in `src/content/`, navigation in `docs.json`
|
|
28
|
+
- **Agent endpoints** — `/llms.txt`, `/ai.txt`, `/api/docs-index`, `/api/agent-readiness`
|
|
29
|
+
- **Hybrid search**, **retrieval-grounded AI chat**, and an **admin analytics** dashboard
|
|
30
|
+
- **Starter content** with keywords and structured pages, ready to edit
|
|
31
|
+
|
|
32
|
+
## Other commands
|
|
33
|
+
|
|
34
|
+
| Command | What it does |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `create-dox <dir>` | Scaffold a new project |
|
|
37
|
+
| `create-dox migrate <github-url> [dir]` | Import docs from a GitHub repo (Mintlify, Docusaurus, GitBook, Nextra, …) |
|
|
38
|
+
| `create-dox check [dir] [--fix]` | Lint content for orphan pages and missing frontmatter |
|
|
39
|
+
| `create-dox translate --locale <code>` | Translate content into another locale |
|
|
40
|
+
|
|
41
|
+
Prefer a single binary? Install [`@doxlabs/cli`](https://www.npmjs.com/package/@doxlabs/cli)
|
|
42
|
+
and use `dox init`, which delegates here.
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT
|
|
@@ -43,35 +43,70 @@ import { execSync } from "child_process";
|
|
|
43
43
|
var STARTER_PAGES = {
|
|
44
44
|
"introduction.mdx": `---
|
|
45
45
|
title: Introduction
|
|
46
|
-
description: Welcome to {NAME}
|
|
46
|
+
description: Welcome to {NAME} \u2014 learn what it does, how the docs are organized, and where to start.
|
|
47
|
+
keywords:
|
|
48
|
+
- {NAME}
|
|
49
|
+
- documentation
|
|
50
|
+
- overview
|
|
51
|
+
- getting started
|
|
47
52
|
---
|
|
48
53
|
|
|
49
54
|
## Welcome
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
Welcome to the **{NAME}** documentation. This is your home base for guides, API
|
|
57
|
+
references, and everything you need to build with {NAME}. The site is powered by
|
|
58
|
+
[Dox](https://github.com/kenny-io/Dox), an agent-native docs platform \u2014 every page
|
|
59
|
+
is served to humans as polished HTML and to AI agents as structured JSON, JSON-LD,
|
|
60
|
+
and Markdown from the same URL, so assistants can read your docs accurately.
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
## What you'll find here
|
|
63
|
+
|
|
64
|
+
- **Guides** \u2014 step-by-step walkthroughs of common tasks and workflows.
|
|
65
|
+
- **API reference** \u2014 generated from your OpenAPI spec, with a live "Try It" console.
|
|
66
|
+
- **Quickstart** \u2014 install {NAME} and make your first call in a few minutes.
|
|
67
|
+
|
|
68
|
+
## Next steps
|
|
69
|
+
|
|
70
|
+
Start with the [Quickstart](/quickstart) to get {NAME} running, then make this site
|
|
71
|
+
your own by editing \`src/content/introduction.mdx\` and updating the navigation in
|
|
72
|
+
\`docs.json\`. Every change you save is instantly reflected for both readers and agents.
|
|
54
73
|
`,
|
|
55
74
|
"quickstart.mdx": `---
|
|
56
75
|
title: Quickstart
|
|
57
|
-
description:
|
|
76
|
+
description: Install {NAME}, configure your API key, and make your first call in under five minutes.
|
|
77
|
+
keywords:
|
|
78
|
+
- {NAME}
|
|
79
|
+
- quickstart
|
|
80
|
+
- installation
|
|
81
|
+
- getting started
|
|
58
82
|
---
|
|
59
83
|
|
|
60
84
|
## Installation
|
|
61
85
|
|
|
86
|
+
Install {NAME} with your package manager of choice. We recommend pinning the
|
|
87
|
+
version in your project so builds stay reproducible across machines and CI:
|
|
88
|
+
|
|
62
89
|
\`\`\`bash
|
|
63
90
|
npm install {SLUG}
|
|
64
91
|
\`\`\`
|
|
65
92
|
|
|
66
93
|
## Basic usage
|
|
67
94
|
|
|
95
|
+
Import the client and initialize it with your API key. Keep the key in an
|
|
96
|
+
environment variable rather than committing it to source control, so it never
|
|
97
|
+
leaks into your repository or build logs:
|
|
98
|
+
|
|
68
99
|
\`\`\`ts
|
|
69
100
|
import { create } from '{SLUG}'
|
|
70
101
|
|
|
71
|
-
const client = create({ apiKey:
|
|
102
|
+
const client = create({ apiKey: process.env.API_KEY })
|
|
72
103
|
\`\`\`
|
|
73
104
|
|
|
74
|
-
|
|
105
|
+
## What's next
|
|
106
|
+
|
|
107
|
+
That's the basics \u2014 you're ready to build. Explore the guides for common workflows,
|
|
108
|
+
open the API reference to try endpoints against a live "Try It" console, or edit this
|
|
109
|
+
page at \`src/content/quickstart.mdx\` to document your own onboarding flow.
|
|
75
110
|
`
|
|
76
111
|
};
|
|
77
112
|
function buildStarterDocsJson({
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
initGit,
|
|
4
4
|
installDeps,
|
|
5
5
|
scaffold
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-673L75C2.js";
|
|
7
7
|
|
|
8
8
|
// src/migrate/index.ts
|
|
9
9
|
import { mkdirSync as mkdirSync2, copyFileSync as copyFileSync2, readFileSync as readFileSync3, writeFileSync, existsSync as existsSync3, mkdtempSync, rmSync } from "fs";
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
migrateDocs,
|
|
4
4
|
parseGitHubUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AFJGDIXU.js";
|
|
6
6
|
import {
|
|
7
7
|
logo,
|
|
8
8
|
scaffold,
|
|
9
9
|
slugify,
|
|
10
10
|
success
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-673L75C2.js";
|
|
12
12
|
|
|
13
13
|
// src/index.ts
|
|
14
14
|
import { existsSync as existsSync3, readdirSync as readdirSync2 } from "fs";
|
package/dist/migrate/index.js
CHANGED
package/dist/scaffold.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-dox",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Scaffold a new Dox documentation project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
19
21
|
],
|
|
20
22
|
"scripts": {
|
|
21
23
|
"build": "tsup",
|
|
@@ -33,5 +35,18 @@
|
|
|
33
35
|
"@types/tar": "^6.1.13",
|
|
34
36
|
"tsup": "^8.0.0",
|
|
35
37
|
"typescript": "^5.0.0"
|
|
36
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"keywords": [
|
|
41
|
+
"dox",
|
|
42
|
+
"documentation",
|
|
43
|
+
"docs",
|
|
44
|
+
"scaffold",
|
|
45
|
+
"mdx",
|
|
46
|
+
"nextjs",
|
|
47
|
+
"ai",
|
|
48
|
+
"agent-native",
|
|
49
|
+
"mcp",
|
|
50
|
+
"create"
|
|
51
|
+
]
|
|
37
52
|
}
|