@oaysus/cli 0.1.0 → 0.1.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.
package/README.md
CHANGED
|
@@ -1,47 +1,58 @@
|
|
|
1
1
|
# @oaysus/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@oaysus/cli)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Build components in React, Vue, or Svelte. Push with one command. Let your team create pages visually.**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Stop building every landing page from scratch. Oaysus lets developers create reusable components that marketing teams can assemble into pages without writing code or waiting for deployments.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
npm install -g @oaysus/cli
|
|
11
|
-
```
|
|
10
|
+
## What is Oaysus?
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
[Oaysus](https://oaysus.com) is a visual page builder for developer-built components. You write components in your favorite framework, define what's editable via a simple schema, and push them to Oaysus. Your marketing team then uses a drag-and-drop editor to create pages instantly.
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
**The workflow:**
|
|
15
|
+
```
|
|
16
|
+
Developer builds component → Pushes to Oaysus → Marketing creates pages visually
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
No more "can you update the hero text?" tickets. No more waiting for deploys to change copy. Your team ships faster, and you get back to building features.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
|
-
oaysus
|
|
24
|
+
npm install -g @oaysus/cli
|
|
24
25
|
```
|
|
25
26
|
|
|
27
|
+
Requires Node.js 20 or higher.
|
|
28
|
+
|
|
26
29
|
## Quick Start
|
|
27
30
|
|
|
28
31
|
```bash
|
|
29
|
-
# Authenticate with Oaysus
|
|
32
|
+
# 1. Authenticate with your Oaysus account
|
|
30
33
|
oaysus login
|
|
31
34
|
|
|
32
|
-
# Create a new theme pack project
|
|
33
|
-
oaysus init my-
|
|
34
|
-
|
|
35
|
-
# Navigate to project
|
|
36
|
-
cd my-theme
|
|
35
|
+
# 2. Create a new theme pack project
|
|
36
|
+
oaysus init my-components
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
|
|
38
|
+
# 3. Navigate to the project
|
|
39
|
+
cd my-components
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# 4. Push your components to Oaysus
|
|
42
42
|
oaysus push
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
That's it. Your components are now available in the visual page builder.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
✓ Validated 1 component
|
|
49
|
+
✓ Built and bundled (2.1 KB)
|
|
50
|
+
✓ Uploaded to Oaysus
|
|
51
|
+
✓ Published!
|
|
52
|
+
|
|
53
|
+
Install in dashboard: Content → Theme Packs
|
|
54
|
+
```
|
|
55
|
+
|
|
45
56
|
## Commands
|
|
46
57
|
|
|
47
58
|
| Command | Description |
|
|
@@ -57,109 +68,90 @@ oaysus push
|
|
|
57
68
|
|
|
58
69
|
## Framework Support
|
|
59
70
|
|
|
60
|
-
|
|
71
|
+
Build with the tools you already know:
|
|
61
72
|
|
|
62
|
-
- **React**
|
|
63
|
-
- **Vue**
|
|
64
|
-
- **Svelte**
|
|
73
|
+
- **React** — JSX/TSX components with full hooks support
|
|
74
|
+
- **Vue** — Single File Components (.vue)
|
|
75
|
+
- **Svelte** — Native Svelte components (.svelte)
|
|
65
76
|
|
|
66
77
|
Framework is automatically detected from your `package.json` dependencies.
|
|
67
78
|
|
|
68
|
-
##
|
|
69
|
-
|
|
70
|
-
### Single Component
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
my-component/
|
|
74
|
-
├── package.json
|
|
75
|
-
├── index.tsx # Main component file
|
|
76
|
-
└── schema.json # Component props schema
|
|
77
|
-
```
|
|
79
|
+
## How Components Work
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
Each component has two files: the code and a schema that defines what's editable.
|
|
80
82
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
│ ├── index.tsx
|
|
90
|
-
│ └── schema.json
|
|
91
|
-
└── Header/
|
|
92
|
-
├── index.tsx
|
|
93
|
-
└── schema.json
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Configuration
|
|
97
|
-
|
|
98
|
-
### package.json
|
|
99
|
-
|
|
100
|
-
```json
|
|
101
|
-
{
|
|
102
|
-
"name": "my-theme",
|
|
103
|
-
"version": "1.0.0",
|
|
104
|
-
"dependencies": {
|
|
105
|
-
"react": "^18.0.0"
|
|
106
|
-
},
|
|
107
|
-
"oaysus": {
|
|
108
|
-
"theme": {
|
|
109
|
-
"name": "my-theme",
|
|
110
|
-
"displayName": "My Theme",
|
|
111
|
-
"category": "ui",
|
|
112
|
-
"tags": ["react", "components"]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
83
|
+
**Component (React example):**
|
|
84
|
+
```tsx
|
|
85
|
+
export default function AnnouncementBar({ message, backgroundColor }) {
|
|
86
|
+
return (
|
|
87
|
+
<div style={{ backgroundColor }} className="py-3 px-4 text-center text-white">
|
|
88
|
+
{message}
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
115
91
|
}
|
|
116
92
|
```
|
|
117
93
|
|
|
118
|
-
|
|
119
|
-
|
|
94
|
+
**Schema:**
|
|
120
95
|
```json
|
|
121
96
|
{
|
|
122
|
-
"
|
|
123
|
-
"displayName": "My Component",
|
|
124
|
-
"description": "A reusable UI component",
|
|
97
|
+
"displayName": "Announcement Bar",
|
|
125
98
|
"props": {
|
|
126
|
-
"
|
|
99
|
+
"message": {
|
|
127
100
|
"type": "string",
|
|
128
|
-
"default": "
|
|
129
|
-
"description": "The title text"
|
|
101
|
+
"default": "Free shipping on orders over $50"
|
|
130
102
|
},
|
|
131
|
-
"
|
|
132
|
-
"type": "
|
|
133
|
-
"default": "
|
|
134
|
-
"description": "Button variant"
|
|
103
|
+
"backgroundColor": {
|
|
104
|
+
"type": "color",
|
|
105
|
+
"default": "#2563eb"
|
|
135
106
|
}
|
|
136
107
|
}
|
|
137
108
|
}
|
|
138
109
|
```
|
|
139
110
|
|
|
140
|
-
|
|
111
|
+
Marketing edits `message` and `backgroundColor` in the visual editor. You never touch the code again.
|
|
141
112
|
|
|
142
|
-
|
|
143
|
-
- Oaysus account
|
|
113
|
+
## Project Structure
|
|
144
114
|
|
|
145
|
-
|
|
115
|
+
```
|
|
116
|
+
my-components/
|
|
117
|
+
├── package.json
|
|
118
|
+
└── components/
|
|
119
|
+
├── AnnouncementBar/
|
|
120
|
+
│ ├── index.tsx
|
|
121
|
+
│ └── schema.json
|
|
122
|
+
├── Hero/
|
|
123
|
+
│ ├── index.tsx
|
|
124
|
+
│ └── schema.json
|
|
125
|
+
└── FeatureGrid/
|
|
126
|
+
├── index.tsx
|
|
127
|
+
└── schema.json
|
|
128
|
+
```
|
|
146
129
|
|
|
147
|
-
|
|
130
|
+
## Documentation
|
|
148
131
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
132
|
+
- **[Quick Start Guide](https://oaysus.com/docs/quickstart)** — Build your first component in 5 minutes
|
|
133
|
+
- **[CLI Reference](https://oaysus.com/docs/cli)** — Complete command documentation
|
|
134
|
+
- **[Component Guide](https://oaysus.com/docs/components)** — Props, schemas, and best practices
|
|
135
|
+
- **[Theme Packs](https://oaysus.com/docs/theme-packs)** — Organize and distribute component collections
|
|
153
136
|
|
|
154
|
-
|
|
137
|
+
## Why Oaysus?
|
|
155
138
|
|
|
156
|
-
|
|
139
|
+
| Traditional Approach | With Oaysus |
|
|
140
|
+
|---------------------|-------------|
|
|
141
|
+
| Marketing files a ticket for every page change | Marketing creates pages themselves |
|
|
142
|
+
| Developers build one-off landing pages | Developers build reusable components |
|
|
143
|
+
| Every text change requires a deploy | Changes publish instantly |
|
|
144
|
+
| Locked into proprietary CMS themes | Standard React/Vue/Svelte you own |
|
|
145
|
+
|
|
146
|
+
## Get Started
|
|
157
147
|
|
|
158
|
-
|
|
148
|
+
1. **[Create an account](https://oaysus.com/pricing)** — Free tier available
|
|
149
|
+
2. **Install the CLI** — `npm install -g @oaysus/cli`
|
|
150
|
+
3. **Follow the quick start** — [oaysus.com/docs/quickstart](https://oaysus.com/docs/quickstart)
|
|
159
151
|
|
|
160
152
|
## Contributing
|
|
161
153
|
|
|
162
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup
|
|
154
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup.
|
|
163
155
|
|
|
164
156
|
## License
|
|
165
157
|
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized Configuration Module
|
|
3
3
|
*
|
|
4
|
-
* Production defaults are baked in for end users
|
|
4
|
+
* Production defaults are baked in for end users.
|
|
5
5
|
* Contributors can override via environment variables or .env file.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* - NPM global install: npm install -g @oaysus/cli
|
|
9
|
-
* - Homebrew: brew install oaysus
|
|
10
|
-
* - Local development: bun run dev
|
|
7
|
+
* Install: npm install -g @oaysus/cli
|
|
11
8
|
*/
|
|
12
9
|
/**
|
|
13
10
|
* Environment configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/lib/shared/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/lib/shared/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;CAwBT,CAAC;AAGX,eAAO,MACL,YAAY,UACZ,SAAS,UACT,aAAa,UACb,SAAS,UACT,SAAS,sBACT,KAAK,WACL,gBAAgB,UAChB,UAAU,QACF,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEnD,wBAAgB,cAAc,IAAI,WAAW,CAS5C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAI9C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAInD"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized Configuration Module
|
|
3
3
|
*
|
|
4
|
-
* Production defaults are baked in for end users
|
|
4
|
+
* Production defaults are baked in for end users.
|
|
5
5
|
* Contributors can override via environment variables or .env file.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* - NPM global install: npm install -g @oaysus/cli
|
|
9
|
-
* - Homebrew: brew install oaysus
|
|
10
|
-
* - Local development: bun run dev
|
|
7
|
+
* Install: npm install -g @oaysus/cli
|
|
11
8
|
*/
|
|
12
9
|
import os from 'os';
|
|
13
10
|
import path from 'path';
|
|
@@ -32,7 +29,7 @@ export const config = {
|
|
|
32
29
|
DEVELOPER: process.env.DEVELOPER,
|
|
33
30
|
// Debug mode (console logging, off by default)
|
|
34
31
|
DEBUG: process.env.DEBUG === 'true',
|
|
35
|
-
// Credentials storage path
|
|
32
|
+
// Credentials storage path
|
|
36
33
|
CREDENTIALS_PATH: path.join(os.homedir(), '.oaysus', 'credentials.json'),
|
|
37
34
|
// Config directory
|
|
38
35
|
CONFIG_DIR: path.join(os.homedir(), '.oaysus'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/shared/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/shared/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO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