skrypt-ai 0.3.4 → 0.4.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 (95) hide show
  1. package/README.md +1 -1
  2. package/dist/auth/index.d.ts +0 -1
  3. package/dist/auth/index.js +3 -5
  4. package/dist/autofix/index.js +15 -3
  5. package/dist/cli.js +19 -4
  6. package/dist/commands/check-links.js +164 -174
  7. package/dist/commands/deploy.js +5 -2
  8. package/dist/commands/generate.js +206 -199
  9. package/dist/commands/i18n.js +3 -20
  10. package/dist/commands/init.js +47 -40
  11. package/dist/commands/lint.js +3 -20
  12. package/dist/commands/mcp.js +125 -122
  13. package/dist/commands/monitor.js +125 -108
  14. package/dist/commands/review-pr.js +1 -1
  15. package/dist/commands/sdk.js +1 -1
  16. package/dist/config/loader.js +21 -2
  17. package/dist/generator/organizer.d.ts +3 -0
  18. package/dist/generator/organizer.js +4 -9
  19. package/dist/generator/writer.js +2 -10
  20. package/dist/github/pr-comments.js +21 -8
  21. package/dist/plugins/index.js +1 -0
  22. package/dist/scanner/index.js +8 -2
  23. package/dist/template/docs.json +2 -1
  24. package/dist/template/next.config.mjs +2 -1
  25. package/dist/template/package.json +17 -15
  26. package/dist/template/public/favicon.svg +4 -0
  27. package/dist/template/public/search-index.json +1 -1
  28. package/dist/template/scripts/build-search-index.mjs +120 -25
  29. package/dist/template/src/app/api/chat/route.ts +11 -3
  30. package/dist/template/src/app/docs/README.md +28 -0
  31. package/dist/template/src/app/docs/[...slug]/page.tsx +139 -16
  32. package/dist/template/src/app/docs/auth/page.mdx +589 -0
  33. package/dist/template/src/app/docs/autofix/page.mdx +624 -0
  34. package/dist/template/src/app/docs/cli/page.mdx +217 -0
  35. package/dist/template/src/app/docs/config/page.mdx +428 -0
  36. package/dist/template/src/app/docs/configuration/page.mdx +86 -0
  37. package/dist/template/src/app/docs/deployment/page.mdx +112 -0
  38. package/dist/template/src/app/docs/error.tsx +20 -0
  39. package/dist/template/src/app/docs/generator/generator.md +504 -0
  40. package/dist/template/src/app/docs/generator/organizer.md +779 -0
  41. package/dist/template/src/app/docs/generator/page.mdx +613 -0
  42. package/dist/template/src/app/docs/github/page.mdx +502 -0
  43. package/dist/template/src/app/docs/llm/anthropic-client.md +549 -0
  44. package/dist/template/src/app/docs/llm/index.md +471 -0
  45. package/dist/template/src/app/docs/llm/page.mdx +428 -0
  46. package/dist/template/src/app/docs/llms-full.md +256 -0
  47. package/dist/template/src/app/docs/llms.txt +2971 -0
  48. package/dist/template/src/app/docs/not-found.tsx +23 -0
  49. package/dist/template/src/app/docs/page.mdx +0 -3
  50. package/dist/template/src/app/docs/plugins/page.mdx +1793 -0
  51. package/dist/template/src/app/docs/pro/page.mdx +121 -0
  52. package/dist/template/src/app/docs/quickstart/page.mdx +93 -0
  53. package/dist/template/src/app/docs/scanner/content-type.md +599 -0
  54. package/dist/template/src/app/docs/scanner/index.md +212 -0
  55. package/dist/template/src/app/docs/scanner/page.mdx +307 -0
  56. package/dist/template/src/app/docs/scanner/python.md +469 -0
  57. package/dist/template/src/app/docs/scanner/python_parser.md +1056 -0
  58. package/dist/template/src/app/docs/scanner/rust.md +325 -0
  59. package/dist/template/src/app/docs/scanner/typescript.md +201 -0
  60. package/dist/template/src/app/error.tsx +3 -3
  61. package/dist/template/src/app/icon.tsx +29 -0
  62. package/dist/template/src/app/layout.tsx +42 -0
  63. package/dist/template/src/app/not-found.tsx +35 -0
  64. package/dist/template/src/app/page.tsx +62 -28
  65. package/dist/template/src/components/ai-chat.tsx +26 -21
  66. package/dist/template/src/components/breadcrumbs.tsx +46 -2
  67. package/dist/template/src/components/copy-button.tsx +17 -3
  68. package/dist/template/src/components/docs-layout.tsx +142 -8
  69. package/dist/template/src/components/feedback.tsx +4 -2
  70. package/dist/template/src/components/footer.tsx +42 -0
  71. package/dist/template/src/components/header.tsx +29 -5
  72. package/dist/template/src/components/mdx/accordion.tsx +7 -6
  73. package/dist/template/src/components/mdx/card.tsx +19 -7
  74. package/dist/template/src/components/mdx/code-block.tsx +17 -3
  75. package/dist/template/src/components/mdx/code-group.tsx +65 -18
  76. package/dist/template/src/components/mdx/code-playground.tsx +3 -0
  77. package/dist/template/src/components/mdx/go-playground.tsx +3 -0
  78. package/dist/template/src/components/mdx/highlighted-code.tsx +171 -76
  79. package/dist/template/src/components/mdx/python-playground.tsx +2 -0
  80. package/dist/template/src/components/mdx/tabs.tsx +74 -6
  81. package/dist/template/src/components/page-header.tsx +19 -0
  82. package/dist/template/src/components/scroll-to-top.tsx +33 -0
  83. package/dist/template/src/components/search-dialog.tsx +206 -52
  84. package/dist/template/src/components/sidebar.tsx +136 -77
  85. package/dist/template/src/components/table-of-contents.tsx +23 -7
  86. package/dist/template/src/lib/highlight.ts +90 -31
  87. package/dist/template/src/lib/search.ts +14 -4
  88. package/dist/template/src/lib/theme-utils.ts +140 -0
  89. package/dist/template/src/styles/globals.css +307 -166
  90. package/dist/template/src/types/remark-gfm.d.ts +2 -0
  91. package/dist/utils/files.d.ts +9 -0
  92. package/dist/utils/files.js +33 -0
  93. package/dist/utils/validation.d.ts +4 -0
  94. package/dist/utils/validation.js +38 -0
  95. package/package.json +1 -4
@@ -0,0 +1,86 @@
1
+ ---
2
+ title: Configuration
3
+ description: Configure Skrypt with skrypt.config.yaml
4
+ ---
5
+
6
+ Configure Skrypt behavior with a `skrypt.config.yaml` file.
7
+
8
+ ## Basic Configuration
9
+
10
+ ```yaml
11
+ source: ./src
12
+ output: ./docs/src/app/docs
13
+ provider: openai
14
+ model: gpt-4o
15
+ ```
16
+
17
+ ## Full Reference
18
+
19
+ ```yaml
20
+ output: ./docs
21
+
22
+ model: gpt-4o # Model name
23
+ baseUrl: null # Custom API URL (for Ollama/proxies)
24
+
25
+ publicOnly: true # Only document exported/public APIs
26
+ multiLang: false # Generate TypeScript + Python examples
27
+ byTopic: false # Organize by topic instead of file structure
28
+ llmsTxt: true # Generate llms.txt for AEO
29
+ projectName: "My Project"
30
+
31
+ - "**/*.test.ts"
32
+ - "**/__tests__/**"
33
+ - "name:internal*"
34
+ - "name:_*"
35
+
36
+ ```
37
+
38
+ ## Environment Variables
39
+
40
+ ```bash
41
+ export OPENAI_API_KEY=sk-...
42
+ export ANTHROPIC_API_KEY=sk-ant-...
43
+ export DEEPSEEK_API_KEY=sk-...
44
+ ```
45
+
46
+ ## Provider Examples
47
+
48
+ ### OpenAI
49
+
50
+ ```yaml
51
+ provider: openai
52
+ model: gpt-4o
53
+ ```
54
+
55
+ ### Anthropic
56
+
57
+ ```yaml
58
+ provider: anthropic
59
+ model: claude-sonnet-4-6
60
+ ```
61
+
62
+ ### Ollama (Local)
63
+
64
+ ```yaml
65
+ provider: ollama
66
+ model: llama3.2
67
+ baseUrl: http://localhost:11434
68
+ ```
69
+
70
+ ## Exclusion Patterns
71
+
72
+ ### File Patterns
73
+
74
+ ```yaml
75
+ exclude:
76
+ - "**/*.test.ts"
77
+ - "**/internal/**"
78
+ ```
79
+
80
+ ### Name Patterns
81
+
82
+ ```yaml
83
+ exclude:
84
+ - "name:_*" # Private
85
+ - "name:internal*" # Internal functions
86
+ ```
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: Deployment Guide
3
+ description: Deploy your Skrypt documentation site
4
+ ---
5
+
6
+ ## Quick Deploy (Skrypt Cloud)
7
+
8
+ ```bash
9
+ skrypt deploy
10
+ ```
11
+
12
+ Your docs will be live at `https://your-project.skrypt.sh`.
13
+
14
+ ## Self-Hosted Setup
15
+
16
+ ### Prerequisites
17
+
18
+ - Node.js 18+
19
+ - Supabase account
20
+ - Cloudflare account
21
+ - Vercel account
22
+
23
+ ### 1. Clone and Install
24
+
25
+ ```bash
26
+ git clone https://github.com/debgotwired/skrypt
27
+ cd skrypt
28
+ npm install
29
+ npm run build
30
+ ```
31
+
32
+ ### 2. Supabase Setup
33
+
34
+ ```bash
35
+ cd landing
36
+ npx supabase login
37
+ npx supabase link --project-ref YOUR_PROJECT_REF
38
+ npx supabase db push
39
+ ```
40
+
41
+ ### 3. Environment Variables
42
+
43
+ Create `.env.local`:
44
+
45
+ ```bash
46
+ NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
47
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
48
+ SUPABASE_SERVICE_ROLE_KEY=eyJ...
49
+
50
+ STRIPE_SECRET_KEY=sk_live_...
51
+ OPENAI_API_KEY=sk-...
52
+
53
+ NEXT_PUBLIC_APP_URL=https://skrypt.sh
54
+ ```
55
+
56
+ ### 4. Deploy Landing
57
+
58
+ ```bash
59
+ cd landing
60
+ vercel
61
+ ```
62
+
63
+ ### 5. Cloudflare Pages
64
+
65
+ For user docs hosting:
66
+
67
+ 1. Create Cloudflare Pages project
68
+ 2. Configure wildcard DNS: `*.skrypt.sh`
69
+
70
+ ### 6. Stripe Webhooks
71
+
72
+ URL: `https://skrypt.sh/api/webhooks/stripe`
73
+
74
+ Events:
75
+ - `checkout.session.completed`
76
+ - `customer.subscription.updated`
77
+ - `customer.subscription.deleted`
78
+
79
+ ---
80
+
81
+ ## CLI Installation
82
+
83
+ ### npm
84
+
85
+ ```bash
86
+ npm install -g skrypt-ai
87
+ ```
88
+
89
+ ### Homebrew
90
+
91
+ ```bash
92
+ brew tap debgotwired/tap
93
+ brew install skrypt
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Troubleshooting
99
+
100
+ ### "API_KEY required"
101
+
102
+ ```bash
103
+ export OPENAI_API_KEY=sk-...
104
+ ```
105
+
106
+ ### Build Errors
107
+
108
+ ```bash
109
+ rm -rf node_modules
110
+ npm install
111
+ npm run build
112
+ ```
@@ -0,0 +1,20 @@
1
+ 'use client'
2
+
3
+ export default function DocsError({ error, reset }: { error: Error; reset: () => void }) {
4
+ return (
5
+ <div className="flex-1 flex items-center justify-center min-h-[50vh]">
6
+ <div className="text-center max-w-md">
7
+ <h2 className="text-xl font-semibold text-[var(--color-text)] mb-2">Something went wrong</h2>
8
+ <p className="text-[0.875rem] text-[var(--color-text-secondary)] mb-4">
9
+ {error.message || 'An error occurred while loading this page.'}
10
+ </p>
11
+ <button
12
+ onClick={reset}
13
+ className="px-4 py-2 bg-[var(--color-primary)] text-[var(--color-primary-foreground)] rounded-lg text-[0.875rem] font-medium hover:opacity-90 transition-opacity"
14
+ >
15
+ Try again
16
+ </button>
17
+ </div>
18
+ </div>
19
+ )
20
+ }