@duffcloudservices/cli 0.1.0 → 0.1.2

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,158 +1,158 @@
1
- # @duffcloudservices/cli
2
-
3
- Command-line interface for initializing and managing DCS (Duff Cloud Services) customer sites.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install -g @duffcloudservices/cli
9
- # or
10
- pnpm add -g @duffcloudservices/cli
11
- ```
12
-
13
- ## Quick Start
14
-
15
- ```bash
16
- # 1. Authenticate with Google OAuth
17
- dcs login
18
-
19
- # 2. Initialize a new customer site
20
- cd /path/to/customer-site
21
- dcs init --site-slug my-site --site-name "My Site"
22
-
23
- # 3. Validate configuration
24
- dcs validate
25
-
26
- # 4. Generate integration plans
27
- dcs plans
28
- ```
29
-
30
- ## Commands
31
-
32
- ### Authentication
33
-
34
- ```bash
35
- # Login with Google OAuth (device flow)
36
- dcs login
37
-
38
- # Check current user
39
- dcs whoami
40
-
41
- # Logout and clear credentials
42
- dcs logout
43
- ```
44
-
45
- ### Site Management
46
-
47
- ```bash
48
- # List sites you have access to
49
- dcs sites list
50
-
51
- # Show details for a specific site
52
- dcs sites show my-site
53
- ```
54
-
55
- ### Initialization
56
-
57
- ```bash
58
- # Initialize DCS integration in current directory
59
- dcs init --site-slug my-site --site-name "My Site"
60
-
61
- # Specify target directory
62
- dcs init -s my-site -n "My Site" -t ./my-site
63
-
64
- # Specify framework (vue or astro)
65
- dcs init -s my-site -n "My Site" -f astro
66
-
67
- # Preview without creating files
68
- dcs init -s my-site -n "My Site" --dry-run
69
-
70
- # Overwrite existing files
71
- dcs init -s my-site -n "My Site" --force
72
- ```
73
-
74
- ### Validation
75
-
76
- ```bash
77
- # Validate .dcs configuration files
78
- dcs validate
79
-
80
- # Validate a specific directory
81
- dcs validate -t ./my-site
82
-
83
- # Show verbose output
84
- dcs validate -v
85
- ```
86
-
87
- ### Integration Plans
88
-
89
- ```bash
90
- # Generate AI-assisted integration plans
91
- dcs plans
92
-
93
- # Regenerate existing plans
94
- dcs plans --force
95
- ```
96
-
97
- ## Generated Files
98
-
99
- The `init` command creates the following structure:
100
-
101
- ```
102
- .dcs/
103
- ├── site.yaml # Site identity and Azure config
104
- ├── pages.yaml # Page registry for CMS
105
- ├── content.yaml # Text content (managed by Portal)
106
- ├── seo.yaml # SEO configuration (managed by Portal)
107
- └── SECTION-CONVENTIONS.md
108
-
109
- .github/
110
- └── copilot-instructions.md
111
-
112
- .plans/
113
- ├── README.md
114
- ├── 00-audit-site.md
115
- ├── 01-create-use-text-content.md
116
- ├── 02-integrate-home-page.md
117
- ├── 03-integrate-remaining-pages.md
118
- ├── 04-capture-snapshots.md
119
- └── 05-verify-deployment.md
120
- ```
121
-
122
- ## Authentication Flow
123
-
124
- The CLI uses OAuth 2.0 Device Authorization Grant (RFC 8628):
125
-
126
- 1. Run `dcs login`
127
- 2. CLI displays a URL and code
128
- 3. Open URL in browser, enter code
129
- 4. Sign in with Google
130
- 5. CLI receives and stores tokens securely
131
-
132
- Tokens are stored encrypted in your OS keychain/credential store.
133
-
134
- ## Site Access Validation
135
-
136
- Before creating configuration files, the CLI validates:
137
-
138
- 1. You're authenticated
139
- 2. You have access to the specified site (or can create it)
140
- 3. You have editor/admin permissions
141
-
142
- This prevents creating configs for sites you don't have access to.
143
-
144
- ## Next Steps After Init
145
-
146
- 1. **Install CMS package**: `pnpm add @duffcloudservices/cms`
147
- 2. **Configure Vite plugins** in your build config
148
- 3. **Follow the plans** in `.plans/` directory
149
- 4. **Register site** in DCS Portal
150
-
151
- ## Requirements
152
-
153
- - Node.js >= 18.0.0
154
- - DCS Portal account with Google OAuth
155
-
156
- ## License
157
-
158
- MIT © Duff Cloud Services
1
+ # @duffcloudservices/cli
2
+
3
+ Command-line interface for initializing and managing DCS (Duff Cloud Services) customer sites.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @duffcloudservices/cli
9
+ # or
10
+ pnpm add -g @duffcloudservices/cli
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # 1. Authenticate with Google OAuth
17
+ dcs login
18
+
19
+ # 2. Initialize a new customer site
20
+ cd /path/to/customer-site
21
+ dcs init --site-slug my-site --site-name "My Site"
22
+
23
+ # 3. Validate configuration
24
+ dcs validate
25
+
26
+ # 4. Generate integration plans
27
+ dcs plans
28
+ ```
29
+
30
+ ## Commands
31
+
32
+ ### Authentication
33
+
34
+ ```bash
35
+ # Login with Google OAuth (device flow)
36
+ dcs login
37
+
38
+ # Check current user
39
+ dcs whoami
40
+
41
+ # Logout and clear credentials
42
+ dcs logout
43
+ ```
44
+
45
+ ### Site Management
46
+
47
+ ```bash
48
+ # List sites you have access to
49
+ dcs sites list
50
+
51
+ # Show details for a specific site
52
+ dcs sites show my-site
53
+ ```
54
+
55
+ ### Initialization
56
+
57
+ ```bash
58
+ # Initialize DCS integration in current directory
59
+ dcs init --site-slug my-site --site-name "My Site"
60
+
61
+ # Specify target directory
62
+ dcs init -s my-site -n "My Site" -t ./my-site
63
+
64
+ # Specify framework (vue or astro)
65
+ dcs init -s my-site -n "My Site" -f astro
66
+
67
+ # Preview without creating files
68
+ dcs init -s my-site -n "My Site" --dry-run
69
+
70
+ # Overwrite existing files
71
+ dcs init -s my-site -n "My Site" --force
72
+ ```
73
+
74
+ ### Validation
75
+
76
+ ```bash
77
+ # Validate .dcs configuration files
78
+ dcs validate
79
+
80
+ # Validate a specific directory
81
+ dcs validate -t ./my-site
82
+
83
+ # Show verbose output
84
+ dcs validate -v
85
+ ```
86
+
87
+ ### Integration Plans
88
+
89
+ ```bash
90
+ # Generate AI-assisted integration plans
91
+ dcs plans
92
+
93
+ # Regenerate existing plans
94
+ dcs plans --force
95
+ ```
96
+
97
+ ## Generated Files
98
+
99
+ The `init` command creates the following structure:
100
+
101
+ ```
102
+ .dcs/
103
+ ├── site.yaml # Site identity and Azure config
104
+ ├── pages.yaml # Page registry for CMS
105
+ ├── content.yaml # Text content (managed by Portal)
106
+ ├── seo.yaml # SEO configuration (managed by Portal)
107
+ └── SECTION-CONVENTIONS.md
108
+
109
+ .github/
110
+ └── copilot-instructions.md
111
+
112
+ .plans/
113
+ ├── README.md
114
+ ├── 00-audit-site.md
115
+ ├── 01-create-use-text-content.md
116
+ ├── 02-integrate-home-page.md
117
+ ├── 03-integrate-remaining-pages.md
118
+ ├── 04-capture-snapshots.md
119
+ └── 05-verify-deployment.md
120
+ ```
121
+
122
+ ## Authentication Flow
123
+
124
+ The CLI uses OAuth 2.0 Device Authorization Grant (RFC 8628):
125
+
126
+ 1. Run `dcs login`
127
+ 2. CLI displays a URL and code
128
+ 3. Open URL in browser, enter code
129
+ 4. Sign in with Google
130
+ 5. CLI receives and stores tokens securely
131
+
132
+ Tokens are stored encrypted in your OS keychain/credential store.
133
+
134
+ ## Site Access Validation
135
+
136
+ Before creating configuration files, the CLI validates:
137
+
138
+ 1. You're authenticated
139
+ 2. You have access to the specified site (or can create it)
140
+ 3. You have editor/admin permissions
141
+
142
+ This prevents creating configs for sites you don't have access to.
143
+
144
+ ## Next Steps After Init
145
+
146
+ 1. **Install CMS package**: `pnpm add @duffcloudservices/cms`
147
+ 2. **Configure Vite plugins** in your build config
148
+ 3. **Follow the plans** in `.plans/` directory
149
+ 4. **Register site** in DCS Portal
150
+
151
+ ## Requirements
152
+
153
+ - Node.js >= 18.0.0
154
+ - DCS Portal account with Google OAuth
155
+
156
+ ## License
157
+
158
+ MIT © Duff Cloud Services