@datalyr/wizard 1.0.0
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 +95 -0
- package/dist/bin/wizard.js +2580 -0
- package/dist/bin/wizard.js.map +1 -0
- package/dist/index.d.mts +64 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +1312 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1275 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @datalyr/wizard
|
|
2
|
+
|
|
3
|
+
AI-powered CLI to install Datalyr SDKs in your project.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @datalyr/wizard
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What it does
|
|
12
|
+
|
|
13
|
+
The wizard automatically:
|
|
14
|
+
|
|
15
|
+
1. Detects your framework (Next.js, React, Svelte, React Native, iOS, etc.)
|
|
16
|
+
2. Installs the appropriate Datalyr SDK(s)
|
|
17
|
+
3. Generates initialization code
|
|
18
|
+
4. Configures environment variables
|
|
19
|
+
|
|
20
|
+
## Supported Frameworks
|
|
21
|
+
|
|
22
|
+
| Framework | Client SDK | Server SDK |
|
|
23
|
+
|-----------|------------|------------|
|
|
24
|
+
| Next.js | `@datalyr/web` | `@datalyr/api` |
|
|
25
|
+
| React (Vite/CRA) | `@datalyr/web` | - |
|
|
26
|
+
| SvelteKit | `@datalyr/web` | `@datalyr/api` |
|
|
27
|
+
| React Native | `@datalyr/react-native` | - |
|
|
28
|
+
| Expo | `@datalyr/react-native` | - |
|
|
29
|
+
| iOS (Swift) | `DatalyrSDK` | - |
|
|
30
|
+
| Node.js | - | `@datalyr/api` |
|
|
31
|
+
|
|
32
|
+
## CLI Options
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx @datalyr/wizard [options]
|
|
36
|
+
|
|
37
|
+
Options:
|
|
38
|
+
--api-key, -k Your Datalyr API key (starts with dk_)
|
|
39
|
+
--framework, -f Framework to configure (auto-detected if not specified)
|
|
40
|
+
--yes, -y Skip confirmation prompts
|
|
41
|
+
--dry-run Show what would be done without making changes
|
|
42
|
+
--json Output plan as JSON (for programmatic use)
|
|
43
|
+
--debug Enable debug output
|
|
44
|
+
--cwd Working directory (defaults to current)
|
|
45
|
+
--help, -h Show help
|
|
46
|
+
--version, -v Show version
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Examples
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Interactive wizard
|
|
53
|
+
npx @datalyr/wizard
|
|
54
|
+
|
|
55
|
+
# Non-interactive (for CI/CD)
|
|
56
|
+
npx @datalyr/wizard --api-key dk_xxx --yes
|
|
57
|
+
|
|
58
|
+
# Preview changes
|
|
59
|
+
npx @datalyr/wizard --dry-run
|
|
60
|
+
|
|
61
|
+
# Force specific framework
|
|
62
|
+
npx @datalyr/wizard --framework nextjs
|
|
63
|
+
|
|
64
|
+
# JSON output for LLM agents
|
|
65
|
+
npx @datalyr/wizard --json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## LLM Agent Support
|
|
69
|
+
|
|
70
|
+
The wizard works with AI coding agents like Cursor and Bolt:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# In Cursor/Bolt prompt:
|
|
74
|
+
"Run npx @datalyr/wizard --api-key dk_xxx --yes to install Datalyr"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Development
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Install dependencies
|
|
81
|
+
pnpm install
|
|
82
|
+
|
|
83
|
+
# Build
|
|
84
|
+
pnpm build
|
|
85
|
+
|
|
86
|
+
# Run locally
|
|
87
|
+
node dist/bin/wizard.js
|
|
88
|
+
|
|
89
|
+
# Run in watch mode
|
|
90
|
+
pnpm dev
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|