@oaysus/cli 0.1.1 → 0.1.3

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,56 +1,45 @@
1
1
  # @oaysus/cli
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@oaysus/cli.svg)](https://www.npmjs.com/package/@oaysus/cli)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
3
+ Official CLI for building and uploading frontend components to Oaysus.
5
4
 
6
- **Build components in React, Vue, or Svelte. Push with one command. Let your team create pages visually.**
5
+ ## Installation
7
6
 
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.
7
+ ### npm (recommended)
9
8
 
10
- ## What is Oaysus?
9
+ ```bash
10
+ npm install -g @oaysus/cli
11
+ ```
11
12
 
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.
13
+ ### Homebrew (macOS/Linux)
13
14
 
14
- **The workflow:**
15
- ```
16
- Developer builds component → Pushes to Oaysus → Marketing creates pages visually
15
+ ```bash
16
+ brew tap oaysus/tap
17
+ brew install oaysus
17
18
  ```
18
19
 
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
20
+ ### Verify installation
22
21
 
23
22
  ```bash
24
- npm install -g @oaysus/cli
23
+ oaysus --version
25
24
  ```
26
25
 
27
- Requires Node.js 20 or higher.
28
-
29
26
  ## Quick Start
30
27
 
31
28
  ```bash
32
- # 1. Authenticate with your Oaysus account
29
+ # Authenticate with Oaysus
33
30
  oaysus login
34
31
 
35
- # 2. Create a new theme pack project
36
- oaysus init my-components
37
-
38
- # 3. Navigate to the project
39
- cd my-components
40
-
41
- # 4. Push your components to Oaysus
42
- oaysus push
43
- ```
32
+ # Create a new theme pack project
33
+ oaysus init my-theme
44
34
 
45
- That's it. Your components are now available in the visual page builder.
35
+ # Navigate to project
36
+ cd my-theme
46
37
 
47
- ```
48
- Validated 1 component
49
- ✓ Built and bundled (2.1 KB)
50
- ✓ Uploaded to Oaysus
51
- ✓ Published!
38
+ # Add a component
39
+ oaysus create
52
40
 
53
- Install in dashboard: Content → Theme Packs
41
+ # Build and upload
42
+ oaysus push
54
43
  ```
55
44
 
56
45
  ## Commands
@@ -68,90 +57,109 @@ Install in dashboard: Content → Theme Packs
68
57
 
69
58
  ## Framework Support
70
59
 
71
- Build with the tools you already know:
60
+ The CLI supports multiple frontend frameworks:
72
61
 
73
- - **React** JSX/TSX components with full hooks support
74
- - **Vue** Single File Components (.vue)
75
- - **Svelte** Native Svelte components (.svelte)
62
+ - **React** - Full support with JSX/TSX components
63
+ - **Vue** - Single File Components (.vue)
64
+ - **Svelte** - Svelte components (.svelte)
76
65
 
77
66
  Framework is automatically detected from your `package.json` dependencies.
78
67
 
79
- ## How Components Work
68
+ ## Project Structure
80
69
 
81
- Each component has two files: the code and a schema that defines what's editable.
70
+ ### Single Component
82
71
 
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
- );
91
- }
92
72
  ```
93
-
94
- **Schema:**
95
- ```json
96
- {
97
- "displayName": "Announcement Bar",
98
- "props": {
99
- "message": {
100
- "type": "string",
101
- "default": "Free shipping on orders over $50"
102
- },
103
- "backgroundColor": {
104
- "type": "color",
105
- "default": "#2563eb"
106
- }
107
- }
108
- }
73
+ my-component/
74
+ ├── package.json
75
+ ├── index.tsx # Main component file
76
+ └── schema.json # Component props schema
109
77
  ```
110
78
 
111
- Marketing edits `message` and `backgroundColor` in the visual editor. You never touch the code again.
112
-
113
- ## Project Structure
79
+ ### Theme Pack (Multiple Components)
114
80
 
115
81
  ```
116
- my-components/
82
+ my-theme/
117
83
  ├── package.json
118
84
  └── components/
119
- ├── AnnouncementBar/
85
+ ├── Button/
120
86
  │ ├── index.tsx
121
87
  │ └── schema.json
122
- ├── Hero/
88
+ ├── Card/
123
89
  │ ├── index.tsx
124
90
  │ └── schema.json
125
- └── FeatureGrid/
91
+ └── Header/
126
92
  ├── index.tsx
127
93
  └── schema.json
128
94
  ```
129
95
 
130
- ## Documentation
96
+ ## Configuration
131
97
 
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
98
+ ### package.json
136
99
 
137
- ## Why Oaysus?
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
+ }
115
+ }
116
+ ```
138
117
 
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 |
118
+ ### schema.json
145
119
 
146
- ## Get Started
120
+ ```json
121
+ {
122
+ "type": "component",
123
+ "displayName": "My Component",
124
+ "description": "A reusable UI component",
125
+ "props": {
126
+ "title": {
127
+ "type": "string",
128
+ "default": "Hello",
129
+ "description": "The title text"
130
+ },
131
+ "variant": {
132
+ "type": "string",
133
+ "default": "primary",
134
+ "description": "Button variant"
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ ## Requirements
141
+
142
+ - Node.js 20 or higher
143
+ - Oaysus account
144
+
145
+ ## Authentication
146
+
147
+ The CLI uses device authorization flow for secure authentication:
148
+
149
+ 1. Run `oaysus login`
150
+ 2. A browser window opens for authentication
151
+ 3. Log in with your Oaysus account
152
+ 4. The CLI automatically receives your credentials
153
+
154
+ Credentials are stored securely in `~/.oaysus/credentials.json` with restricted file permissions.
155
+
156
+ ## Documentation
147
157
 
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)
158
+ For full documentation, visit [docs.oaysus.com](https://docs.oaysus.com)
151
159
 
152
160
  ## Contributing
153
161
 
154
- We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup.
162
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
155
163
 
156
164
  ## License
157
165
 
@@ -1,10 +1,13 @@
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 (NPM and Homebrew).
5
5
  * Contributors can override via environment variables or .env file.
6
6
  *
7
- * Install: npm install -g @oaysus/cli
7
+ * Compatible with:
8
+ * - NPM global install: npm install -g @oaysus/cli
9
+ * - Homebrew: brew install oaysus
10
+ * - Local development: bun run dev
8
11
  */
9
12
  /**
10
13
  * Environment configuration
@@ -1 +1 @@
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
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/lib/shared/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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,10 +1,13 @@
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 (NPM and Homebrew).
5
5
  * Contributors can override via environment variables or .env file.
6
6
  *
7
- * Install: npm install -g @oaysus/cli
7
+ * Compatible with:
8
+ * - NPM global install: npm install -g @oaysus/cli
9
+ * - Homebrew: brew install oaysus
10
+ * - Local development: bun run dev
8
11
  */
9
12
  import os from 'os';
10
13
  import path from 'path';
@@ -29,7 +32,7 @@ export const config = {
29
32
  DEVELOPER: process.env.DEVELOPER,
30
33
  // Debug mode (console logging, off by default)
31
34
  DEBUG: process.env.DEBUG === 'true',
32
- // Credentials storage path
35
+ // Credentials storage path (works for both NPM and Homebrew)
33
36
  CREDENTIALS_PATH: path.join(os.homedir(), '.oaysus', 'credentials.json'),
34
37
  // Config directory
35
38
  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;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,0CAA0C;AAC1C,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAC/C,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAClD,MAAM,WAAW,GAAG,qDAAqD,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,4BAA4B;IAC5B,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,YAAY;IAEpE,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,cAAc;IAErE,mCAAmC;IACnC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,WAAW;IAEnE,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAEzG,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;IAEhC,+CAA+C;IAC/C,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,MAAM;IAEnC,2BAA2B;IAC3B,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC;IAExE,mBAAmB;IACnB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,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CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,IAAe;IACtC,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,GAAG,IAAe;IAC3C,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaysus/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Oaysus CLI - Professional developer tool for component uploads",
5
5
  "type": "module",
6
6
  "bin": {