@oaysus/cli 0.1.16 → 0.1.17
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/docs/README.md +30 -0
- package/docs/ai-workflows.md +207 -0
- package/docs/components.md +210 -0
- package/docs/getting-started.md +90 -0
- package/docs/schemas.md +300 -0
- package/docs/site-commands.md +267 -0
- package/docs/theme-commands.md +259 -0
- package/llms.txt +94 -0
- package/package.json +20 -4
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# Theme Pack Commands
|
|
2
|
+
|
|
3
|
+
Theme packs are collections of reusable components that can be installed on any Oaysus website.
|
|
4
|
+
|
|
5
|
+
## oaysus theme init
|
|
6
|
+
|
|
7
|
+
Create a new theme pack project.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
oaysus theme init [name]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Options
|
|
14
|
+
|
|
15
|
+
| Option | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `[name]` | Optional project name (prompted if not provided) |
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
oaysus theme init marketing-starter
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Output
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
? Select framework: React
|
|
29
|
+
? Project name: marketing-starter
|
|
30
|
+
? Description: Landing page components
|
|
31
|
+
? Author: Your Name
|
|
32
|
+
? Create project? Yes
|
|
33
|
+
|
|
34
|
+
✓ Created package.json
|
|
35
|
+
✓ Created components/
|
|
36
|
+
✓ Created shared/
|
|
37
|
+
✓ Added Hero component
|
|
38
|
+
✓ Project ready!
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Generated Files
|
|
42
|
+
|
|
43
|
+
- `package.json` - Project configuration with Oaysus metadata
|
|
44
|
+
- `components/` - Directory for your components
|
|
45
|
+
- `components/Hero/` - Example component with schema
|
|
46
|
+
- `shared/` - Directory for shared utilities
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## oaysus theme create
|
|
51
|
+
|
|
52
|
+
Add a new component to an existing theme pack.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
oaysus theme create [name] [path]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Options
|
|
59
|
+
|
|
60
|
+
| Option | Description |
|
|
61
|
+
|--------|-------------|
|
|
62
|
+
| `[name]` | Component name (converted to PascalCase) |
|
|
63
|
+
| `[path]` | Optional path to theme pack directory |
|
|
64
|
+
|
|
65
|
+
### Example
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
oaysus theme create FeatureGrid
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Output
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
? Component name: FeatureGrid
|
|
75
|
+
? Description: Feature grid component
|
|
76
|
+
? Category: marketing
|
|
77
|
+
? Create component? Yes
|
|
78
|
+
|
|
79
|
+
✓ Created components/FeatureGrid/index.tsx
|
|
80
|
+
✓ Created components/FeatureGrid/schema.json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## oaysus theme validate
|
|
86
|
+
|
|
87
|
+
Check your theme pack for errors before pushing.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
oaysus theme validate [path]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Options
|
|
94
|
+
|
|
95
|
+
| Option | Description |
|
|
96
|
+
|--------|-------------|
|
|
97
|
+
| `[path]` | Optional path to theme pack directory |
|
|
98
|
+
| `--dry-run` | Validate without creating build artifacts |
|
|
99
|
+
|
|
100
|
+
### Example
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
oaysus theme validate
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Output
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Validating package...
|
|
110
|
+
✓ package.json valid
|
|
111
|
+
✓ components/ directory found
|
|
112
|
+
✓ 3 components discovered
|
|
113
|
+
✓ All schemas valid
|
|
114
|
+
|
|
115
|
+
Ready to push!
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Common Errors
|
|
119
|
+
|
|
120
|
+
- **Missing package.json** - Run from a theme pack directory
|
|
121
|
+
- **Invalid schema** - Check JSON syntax in schema.json files
|
|
122
|
+
- **Missing component file** - Each component needs index.tsx/vue/svelte
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## oaysus theme build
|
|
127
|
+
|
|
128
|
+
Build components locally without uploading.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
oaysus theme build [path]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Options
|
|
135
|
+
|
|
136
|
+
| Option | Description |
|
|
137
|
+
|--------|-------------|
|
|
138
|
+
| `[path]` | Optional path to theme pack directory |
|
|
139
|
+
|
|
140
|
+
### Example
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
oaysus theme build
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Output
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Building components...
|
|
150
|
+
✓ Validated package
|
|
151
|
+
✓ Built client components
|
|
152
|
+
✓ Built server components
|
|
153
|
+
✓ Bundled dependencies
|
|
154
|
+
✓ Generated import map
|
|
155
|
+
|
|
156
|
+
Build complete → .oaysus-build/
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Build Output
|
|
160
|
+
|
|
161
|
+
The `.oaysus-build/` directory contains:
|
|
162
|
+
- Compiled client-side components
|
|
163
|
+
- Server-side rendered versions
|
|
164
|
+
- Dependency bundle
|
|
165
|
+
- Import map for the runtime
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## oaysus theme push
|
|
170
|
+
|
|
171
|
+
Build and upload components to Oaysus.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
oaysus theme push [path]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Requires authentication.**
|
|
178
|
+
|
|
179
|
+
### Options
|
|
180
|
+
|
|
181
|
+
| Option | Description |
|
|
182
|
+
|--------|-------------|
|
|
183
|
+
| `[path]` | Optional path to theme pack directory |
|
|
184
|
+
|
|
185
|
+
### Example
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
oaysus theme push
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Output
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
Authenticating...
|
|
195
|
+
✓ Authenticated
|
|
196
|
+
|
|
197
|
+
Building components...
|
|
198
|
+
✓ Validated package
|
|
199
|
+
✓ Built client components
|
|
200
|
+
✓ Built server components
|
|
201
|
+
✓ Bundled dependencies
|
|
202
|
+
✓ Generated manifest
|
|
203
|
+
|
|
204
|
+
Uploading to Oaysus...
|
|
205
|
+
████████████████████ 100%
|
|
206
|
+
|
|
207
|
+
✓ Upload complete
|
|
208
|
+
✓ Theme Pack ID: abc123
|
|
209
|
+
✓ 3 components published
|
|
210
|
+
|
|
211
|
+
Install in dashboard: Content → Theme Packs
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### After Pushing
|
|
215
|
+
|
|
216
|
+
1. Open your Oaysus dashboard
|
|
217
|
+
2. Go to Content → Theme Packs
|
|
218
|
+
3. Click Install on your theme pack
|
|
219
|
+
4. Components appear in the page builder
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## oaysus theme delete
|
|
224
|
+
|
|
225
|
+
Delete a theme pack from Oaysus.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
oaysus theme delete [name]
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Requires authentication.**
|
|
232
|
+
|
|
233
|
+
### Options
|
|
234
|
+
|
|
235
|
+
| Option | Description |
|
|
236
|
+
|--------|-------------|
|
|
237
|
+
| `[name]` | Theme pack name to delete |
|
|
238
|
+
|
|
239
|
+
### Example
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
oaysus theme delete my-old-theme
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Output
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
? Select theme pack to delete:
|
|
249
|
+
❯ my-old-theme (v1.2.0)
|
|
250
|
+
another-theme (v2.0.0)
|
|
251
|
+
|
|
252
|
+
? Are you sure you want to delete "my-old-theme"? Yes
|
|
253
|
+
|
|
254
|
+
✓ Theme pack deleted
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Warning
|
|
258
|
+
|
|
259
|
+
Deleting a theme pack removes all components. Pages using these components will need to be updated.
|
package/llms.txt
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Oaysus CLI
|
|
2
|
+
|
|
3
|
+
> Command-line tool for building and pushing components to the Oaysus visual page builder platform. Supports React, Vue, and Svelte.
|
|
4
|
+
|
|
5
|
+
The Oaysus CLI enables developers to create reusable UI components, bundle them into theme packs, and push them to the cloud where marketing teams can use them in a visual page builder. It also supports local page management for version control and AI-assisted content workflows.
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
- [Getting Started](./docs/getting-started.md): Installation and quick start guide
|
|
10
|
+
- [Theme Pack Commands](./docs/theme-commands.md): Building and managing component libraries
|
|
11
|
+
- [Site Commands](./docs/site-commands.md): Managing website pages locally
|
|
12
|
+
- [Component Guide](./docs/components.md): Building components in React, Vue, and Svelte
|
|
13
|
+
- [Schema Reference](./docs/schemas.md): Complete prop type reference
|
|
14
|
+
- [AI Workflows](./docs/ai-workflows.md): Using CLI with AI assistants for bulk content editing
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g @oaysus/cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Requires Node.js 20 or higher.
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
oaysus login # Authenticate with your account
|
|
28
|
+
oaysus theme init my-components # Create a new theme pack
|
|
29
|
+
cd my-components
|
|
30
|
+
oaysus theme push # Push components to Oaysus
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Command Reference
|
|
34
|
+
|
|
35
|
+
### Theme Pack Commands
|
|
36
|
+
|
|
37
|
+
- `oaysus theme init [name]` - Create a new theme pack project with React, Vue, or Svelte
|
|
38
|
+
- `oaysus theme create [name]` - Add a new component to your theme pack
|
|
39
|
+
- `oaysus theme validate` - Validate theme pack structure and schemas
|
|
40
|
+
- `oaysus theme build` - Build components locally without uploading
|
|
41
|
+
- `oaysus theme push` - Build and upload components to Oaysus
|
|
42
|
+
- `oaysus theme delete [name]` - Delete a theme pack from Oaysus
|
|
43
|
+
|
|
44
|
+
### Site Commands
|
|
45
|
+
|
|
46
|
+
- `oaysus site init [name]` - Create a website project for local page management
|
|
47
|
+
- `oaysus site validate` - Validate pages against installed components
|
|
48
|
+
- `oaysus site publish [file?]` - Publish pages from local JSON files
|
|
49
|
+
- `oaysus site pull` - Download pages from server to local files
|
|
50
|
+
|
|
51
|
+
### Global Commands
|
|
52
|
+
|
|
53
|
+
- `oaysus login` - Authenticate via magic link
|
|
54
|
+
- `oaysus switch` - Switch between your websites
|
|
55
|
+
- `oaysus logout` - Clear stored credentials
|
|
56
|
+
- `oaysus whoami` - Show current user and session info
|
|
57
|
+
- `oaysus telemetry status|enable|disable` - Manage anonymous usage analytics
|
|
58
|
+
|
|
59
|
+
## Component Structure
|
|
60
|
+
|
|
61
|
+
Each component requires two files:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
components/
|
|
65
|
+
└── Hero/
|
|
66
|
+
├── index.tsx # Component code (React/Vue/Svelte)
|
|
67
|
+
└── schema.json # Editable props definition
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Schema Types
|
|
71
|
+
|
|
72
|
+
- `string` - Single line text input
|
|
73
|
+
- `text` - Multi-line textarea
|
|
74
|
+
- `number` - Numeric value with optional min/max/step
|
|
75
|
+
- `boolean` - True/false toggle
|
|
76
|
+
- `color` - Hex color picker
|
|
77
|
+
- `image` - Image from media library
|
|
78
|
+
- `array` - Repeatable list of items
|
|
79
|
+
- `select` - Dropdown with options
|
|
80
|
+
|
|
81
|
+
## Framework Support
|
|
82
|
+
|
|
83
|
+
- React (JSX/TSX with hooks)
|
|
84
|
+
- Vue 3 (Single File Components)
|
|
85
|
+
- Svelte (native .svelte files)
|
|
86
|
+
|
|
87
|
+
Framework is auto-detected from package.json dependencies.
|
|
88
|
+
|
|
89
|
+
## Optional
|
|
90
|
+
|
|
91
|
+
- [Contributing](./CONTRIBUTING.md): Development setup and contribution guidelines
|
|
92
|
+
- [GitHub Repository](https://github.com/oaysus/cli): Source code and issues
|
|
93
|
+
- [npm Package](https://www.npmjs.com/package/@oaysus/cli): Published package
|
|
94
|
+
- [Full Documentation](https://oaysus.com/docs): Complete platform documentation
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oaysus/cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.17",
|
|
4
|
+
"description": "Build React, Vue, or Svelte components and push them to a visual page builder. Empower marketing teams to create pages without code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"oaysus": "./bin/oaysus.js"
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"bin",
|
|
14
|
-
"
|
|
14
|
+
"docs",
|
|
15
|
+
"src/templates",
|
|
16
|
+
"llms.txt"
|
|
15
17
|
],
|
|
16
18
|
"scripts": {
|
|
17
19
|
"build": "tsc",
|
|
@@ -84,7 +86,21 @@
|
|
|
84
86
|
"oaysus",
|
|
85
87
|
"cli",
|
|
86
88
|
"components",
|
|
87
|
-
"developer-tools"
|
|
89
|
+
"developer-tools",
|
|
90
|
+
"page-builder",
|
|
91
|
+
"visual-editor",
|
|
92
|
+
"cms",
|
|
93
|
+
"headless-cms",
|
|
94
|
+
"react-components",
|
|
95
|
+
"vue-components",
|
|
96
|
+
"svelte-components",
|
|
97
|
+
"landing-pages",
|
|
98
|
+
"marketing-pages",
|
|
99
|
+
"no-code",
|
|
100
|
+
"low-code",
|
|
101
|
+
"theme-pack",
|
|
102
|
+
"component-library",
|
|
103
|
+
"website-builder"
|
|
88
104
|
],
|
|
89
105
|
"author": "Oaysus Team",
|
|
90
106
|
"license": "MIT",
|