docworks 0.11.0-next.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 (72) hide show
  1. package/README.md +200 -0
  2. package/dist/commands/check.d.ts +7 -0
  3. package/dist/commands/check.d.ts.map +1 -0
  4. package/dist/commands/check.js +61 -0
  5. package/dist/commands/check.js.map +1 -0
  6. package/dist/commands/init.d.ts +5 -0
  7. package/dist/commands/init.d.ts.map +1 -0
  8. package/dist/commands/init.js +165 -0
  9. package/dist/commands/init.js.map +1 -0
  10. package/dist/commands/test.d.ts +5 -0
  11. package/dist/commands/test.d.ts.map +1 -0
  12. package/dist/commands/test.js +45 -0
  13. package/dist/commands/test.js.map +1 -0
  14. package/dist/core/ai.d.ts +2 -0
  15. package/dist/core/ai.d.ts.map +1 -0
  16. package/dist/core/ai.js +29 -0
  17. package/dist/core/ai.js.map +1 -0
  18. package/dist/core/cache.d.ts +3 -0
  19. package/dist/core/cache.d.ts.map +1 -0
  20. package/dist/core/cache.js +31 -0
  21. package/dist/core/cache.js.map +1 -0
  22. package/dist/core/validator.d.ts +4 -0
  23. package/dist/core/validator.d.ts.map +1 -0
  24. package/dist/core/validator.js +47 -0
  25. package/dist/core/validator.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +32 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/providers/anthropic.d.ts +10 -0
  31. package/dist/providers/anthropic.d.ts.map +1 -0
  32. package/dist/providers/anthropic.js +51 -0
  33. package/dist/providers/anthropic.js.map +1 -0
  34. package/dist/providers/base.d.ts +12 -0
  35. package/dist/providers/base.d.ts.map +1 -0
  36. package/dist/providers/base.js +14 -0
  37. package/dist/providers/base.js.map +1 -0
  38. package/dist/providers/openai.d.ts +10 -0
  39. package/dist/providers/openai.d.ts.map +1 -0
  40. package/dist/providers/openai.js +42 -0
  41. package/dist/providers/openai.js.map +1 -0
  42. package/dist/sources/base.d.ts +3 -0
  43. package/dist/sources/base.d.ts.map +1 -0
  44. package/dist/sources/base.js +17 -0
  45. package/dist/sources/base.js.map +1 -0
  46. package/dist/sources/llms-txt.d.ts +7 -0
  47. package/dist/sources/llms-txt.d.ts.map +1 -0
  48. package/dist/sources/llms-txt.js +43 -0
  49. package/dist/sources/llms-txt.js.map +1 -0
  50. package/dist/sources/mcp.d.ts +9 -0
  51. package/dist/sources/mcp.d.ts.map +1 -0
  52. package/dist/sources/mcp.js +33 -0
  53. package/dist/sources/mcp.js.map +1 -0
  54. package/dist/types/config.d.ts +26 -0
  55. package/dist/types/config.d.ts.map +1 -0
  56. package/dist/types/config.js +2 -0
  57. package/dist/types/config.js.map +1 -0
  58. package/dist/utils/config.d.ts +3 -0
  59. package/dist/utils/config.d.ts.map +1 -0
  60. package/dist/utils/config.js +18 -0
  61. package/dist/utils/config.js.map +1 -0
  62. package/dist/utils/reporter.d.ts +4 -0
  63. package/dist/utils/reporter.d.ts.map +1 -0
  64. package/dist/utils/reporter.js +111 -0
  65. package/dist/utils/reporter.js.map +1 -0
  66. package/package.json +84 -0
  67. package/templates/api.yml +21 -0
  68. package/templates/default.yml +19 -0
  69. package/templates/gitbook.yml +13 -0
  70. package/templates/library.yml +21 -0
  71. package/templates/mintlify.yml +18 -0
  72. package/templates/readme.yml +13 -0
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "docworks",
3
+ "version": "0.11.0-next.1",
4
+ "description": "Ensure your docs work for developers and AI",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "docworks": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "test": "echo \"Error: no test specified\" && exit 1",
13
+ "dev": "tsc --watch",
14
+ "prepublishOnly": "npm run build",
15
+ "format": "prettier --write .",
16
+ "format:check": "prettier --check .",
17
+ "lint": "eslint . --ext .ts,.tsx",
18
+ "lint:fix": "eslint . --ext .ts,.tsx --fix",
19
+ "type-check": "tsc --noEmit",
20
+ "check:all": "pnpm run build && pnpm run format && pnpm run lint && pnpm run type-check"
21
+ },
22
+ "dependencies": {
23
+ "@anthropic-ai/sdk": "^0.20.0",
24
+ "chalk": "^5.0.0",
25
+ "commander": "^11.0.0",
26
+ "glob": "^10.0.0",
27
+ "openai": "^4.0.0",
28
+ "yaml": "^2.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@eslint/js": "^9.35.0",
32
+ "@semantic-release/changelog": "^6.0.3",
33
+ "@semantic-release/exec": "^7.1.0",
34
+ "@semantic-release/git": "^10.0.1",
35
+ "@types/js-yaml": "^4.0.9",
36
+ "@types/node": "^20.0.0",
37
+ "@typescript-eslint/eslint-plugin": "^8.42.0",
38
+ "@typescript-eslint/parser": "^8.42.0",
39
+ "eslint": "^9.35.0",
40
+ "eslint-config-prettier": "^10.1.8",
41
+ "husky": "^9.1.7",
42
+ "lint-staged": "^16.1.6",
43
+ "node": "link:@@types/node",
44
+ "prettier": "^3.6.2",
45
+ "semantic-release": "^24.2.7",
46
+ "typescript": "^5.0.0",
47
+ "typescript-eslint": "^8.42.0"
48
+ },
49
+ "files": [
50
+ "dist",
51
+ "templates"
52
+ ],
53
+ "engines": {
54
+ "node": ">=16.0.0"
55
+ },
56
+ "lint-staged": {
57
+ "*.{ts,tsx}": [
58
+ "eslint --fix",
59
+ "prettier --write"
60
+ ],
61
+ "*.{json,md,yml,yaml}": [
62
+ "prettier --write"
63
+ ]
64
+ },
65
+ "keywords": [
66
+ "documentation",
67
+ "regression",
68
+ "testing",
69
+ "ci",
70
+ "api-docs"
71
+ ],
72
+ "author": "caiopizzol",
73
+ "license": "MIT",
74
+ "homepage": "https://github.com/caiopizzol/docworks",
75
+ "bugs": "https://github.com/caiopizzol/docworks/issues",
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "https://github.com/caiopizzol/docworks.git",
79
+ "directory": "packages/cli"
80
+ },
81
+ "publishConfig": {
82
+ "access": "public"
83
+ }
84
+ }
@@ -0,0 +1,21 @@
1
+ # DocWorks Configuration - API Documentation
2
+ source: ./llms.txt
3
+
4
+ journeys:
5
+ authentication:
6
+ - How do I authenticate?
7
+ - Where do I get API keys?
8
+ - What auth methods are supported?
9
+
10
+ integration:
11
+ - What are the endpoints?
12
+ - How do I handle errors?
13
+ - What are the rate limits?
14
+
15
+ production:
16
+ - How do I monitor usage?
17
+ - Where are status pages?
18
+ - How do I get support?
19
+
20
+ provider: openai
21
+ model: gpt-4o-mini
@@ -0,0 +1,19 @@
1
+ # DocWorks Configuration
2
+ source: ./llms.txt
3
+
4
+ journeys:
5
+ getting_started:
6
+ - How do I install this?
7
+ - How do I get started?
8
+ - Where are examples?
9
+
10
+ development:
11
+ - How do I run tests?
12
+ - How do I debug issues?
13
+ - Where can I get help?
14
+
15
+ # AI Provider (openai or anthropic)
16
+ provider: openai
17
+ model: gpt-4o-mini
18
+ # Optional: Set API key here instead of environment variable
19
+ # api_key: sk-...
@@ -0,0 +1,13 @@
1
+ # DocWorks Configuration - GitBook
2
+ source:
3
+ type: mcp
4
+ server: '@gitbook/mcp-server'
5
+
6
+ journeys:
7
+ knowledge_base:
8
+ - Is content organized logically?
9
+ - Can I search effectively?
10
+ - Are guides comprehensive?
11
+
12
+ provider: openai
13
+ model: gpt-4o-mini
@@ -0,0 +1,21 @@
1
+ # DocWorks Configuration - Library/Package
2
+ source: ./llms.txt
3
+
4
+ journeys:
5
+ setup:
6
+ - How do I install this package?
7
+ - How do I import it?
8
+ - What are the requirements?
9
+
10
+ basic_usage:
11
+ - What's a hello world example?
12
+ - What are the main functions?
13
+ - How do I configure options?
14
+
15
+ typescript:
16
+ - Does it have TypeScript support?
17
+ - Where are the type definitions?
18
+ - How do I use with TypeScript?
19
+
20
+ provider: openai
21
+ model: gpt-4o-mini
@@ -0,0 +1,18 @@
1
+ # DocWorks Configuration - Mintlify
2
+ source:
3
+ type: mcp
4
+ server: '@mintlify/mcp-server'
5
+
6
+ journeys:
7
+ api_reference:
8
+ - Where is the API reference?
9
+ - Are all endpoints documented?
10
+ - Do examples work?
11
+
12
+ getting_started:
13
+ - Is there a quickstart guide?
14
+ - How do I authenticate?
15
+ - What SDKs are available?
16
+
17
+ provider: openai
18
+ model: gpt-4o-mini
@@ -0,0 +1,13 @@
1
+ # DocWorks Configuration - ReadMe
2
+ source:
3
+ type: mcp
4
+ server: '@readme/mcp-server'
5
+
6
+ journeys:
7
+ developer_experience:
8
+ - Can I try the API interactively?
9
+ - Are there code examples?
10
+ - Is versioning documented?
11
+
12
+ provider: openai
13
+ model: gpt-4o-mini