@42ws/cli 0.0.43 → 0.0.44
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 +47 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,10 +17,10 @@ Authenticate with your 42ws token.
|
|
|
17
17
|
|
|
18
18
|
```
|
|
19
19
|
42ws login --token ws_xxx
|
|
20
|
-
42ws login
|
|
20
|
+
42ws login # no token → browser-based device login
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
If `--token` is omitted,
|
|
23
|
+
If `--token` is omitted, a browser-based login flow starts (device code). The CLI talks to `https://api.42ws.com` by default; set `FORTYTWO_WS_API_URL` only if you need a different environment.
|
|
24
24
|
|
|
25
25
|
### `42ws publish`
|
|
26
26
|
|
|
@@ -85,6 +85,50 @@ Options:
|
|
|
85
85
|
- `--site` mode: re-publishes the page
|
|
86
86
|
- `--file` mode: overwrites the local file
|
|
87
87
|
|
|
88
|
+
### `42ws collections import`
|
|
89
|
+
|
|
90
|
+
Turn a list/blog/works page into a CMS collection (Claude generates the index/detail templates). Entries are then added with `42ws collections entries add`.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
42ws collections import --site my-site --page news.html --inject
|
|
94
|
+
42ws collections entries add coll_xxx --title "新着" --main-image ./hero.jpg --tags お知らせ --status published
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- `--inject` replaces the list area with the embed and re-publishes
|
|
98
|
+
- Entry fields are fixed: `title / slug / body / mainImage / subImages / publishedAt / status / tags`. Categories are expressed as a tag.
|
|
99
|
+
|
|
100
|
+
### `42ws dev`
|
|
101
|
+
|
|
102
|
+
Local preview server with an AI page inspector. Serves your site at `localhost:4242` and injects a "検証する" toolbar; clicking an element copies a diagnostic pack (selector / outerHTML / recent errors) for pasting into your AI.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
42ws dev # serve current dir at localhost:4242
|
|
106
|
+
42ws dev errors [site] # show recent client JS/HTTP errors
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### `42ws domains`
|
|
110
|
+
|
|
111
|
+
Attach a custom domain to a site (Personal plan or higher). Two modes:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
42ws domains add example.com --site my-site # おまかせ DNS (recommended): point NS to 42ws, everything automatic
|
|
115
|
+
42ws domains add www.example.com --site my-site --cname # manual CNAME: keep your NS, add records yourself
|
|
116
|
+
42ws domains verify example.com --site my-site # check status / show next steps
|
|
117
|
+
42ws domains list --site my-site
|
|
118
|
+
42ws domains rm example.com --site my-site
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
- **おまかせ DNS (default):** set your registrar's nameservers to the 4 returned by `add`; the cert and DNS records (apex included) are then managed automatically.
|
|
122
|
+
- **manual CNAME (`--cname`):** for domains already using email etc. — you add the validation CNAME and final CNAME yourself.
|
|
123
|
+
|
|
124
|
+
### `42ws prompts get <name>`
|
|
125
|
+
|
|
126
|
+
Print an AI-facing guide. `cli` (overall), `context` (site build conventions), `sitecard`, `inspector` (page diagnostics), `migrate` (move an existing site to 42ws).
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
42ws prompts get migrate
|
|
130
|
+
```
|
|
131
|
+
|
|
88
132
|
### `42ws whoami`
|
|
89
133
|
|
|
90
134
|
Show the currently logged-in user.
|
|
@@ -124,7 +168,7 @@ Use `--json` for machine-readable output (useful in CI / AI agents):
|
|
|
124
168
|
|
|
125
169
|
**Success:**
|
|
126
170
|
```json
|
|
127
|
-
{"ok":true,"status":"published","url":"https://my-site.
|
|
171
|
+
{"ok":true,"status":"published","url":"https://my-site.42ws.com","site":"my-site","version":"pub_xxx"}
|
|
128
172
|
```
|
|
129
173
|
|
|
130
174
|
**Failure:**
|