@workover/cli 0.15.0 → 0.25.0
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 +109 -2
- package/bin/workover.mjs +810 -37
- package/feedback.mjs +123 -0
- package/lib.mjs +332 -2
- package/package.json +5 -1
- package/site-folder.mjs +778 -0
- package/site-proxy.mjs +77 -0
- package/site-setup.mjs +925 -0
- package/skill/SKILL.md +46 -3
package/README.md
CHANGED
|
@@ -16,7 +16,15 @@ workover login --publish # ...and also request permission to publish to WordPre
|
|
|
16
16
|
workover login --draft # ...and also request permission to write drafts with AI
|
|
17
17
|
workover login --write # ...and also allow direct edits, with no suggestions to review
|
|
18
18
|
workover login --rules # ...and also allow changing the style guide
|
|
19
|
-
workover
|
|
19
|
+
workover login --site # ...and also allow setting up and publishing a Help Center
|
|
20
|
+
workover login --no-wait # print the code and link and return at once (for agents)
|
|
21
|
+
workover login --resume # ...then finish that sign-in once the person has approved
|
|
22
|
+
workover projects # the projects you can reach, with their ids and workspaces
|
|
23
|
+
workover status 11 # where project 11's setup has got to, and what is left
|
|
24
|
+
workover project create --name "Acme Docs" --start empty # a project with a Help Center
|
|
25
|
+
workover site import --project 11 --url https://docs.example.com
|
|
26
|
+
workover site domain --project 11 --set docs.example.com # prints every DNS record to add
|
|
27
|
+
workover site publish --project 11
|
|
20
28
|
workover doc list --project 11
|
|
21
29
|
workover doc get https://workover.io/app/acme/docs/<id> # a document, from its link
|
|
22
30
|
workover doc read 1234 # ...or its UUID, or its number
|
|
@@ -24,12 +32,14 @@ workover rules list --project 11 # the style guide agents should write by
|
|
|
24
32
|
workover comments list 1234 # the feedback people left on a document
|
|
25
33
|
workover doc images 1234 # image file names and alt text (set them with `doc image`)
|
|
26
34
|
workover draft --org 3 --project 11 "Document the billing flow"
|
|
27
|
-
workover whoami #
|
|
35
|
+
workover whoami # who is signed in, where, and their workspaces
|
|
28
36
|
workover logout # sign out and revoke this device's token
|
|
29
37
|
```
|
|
30
38
|
|
|
31
39
|
`workover login` uses the browser device-authorization flow: it prints a short code, opens your browser, and you approve the connection while signed in to Workover. The token is stored at `~/.workover/config.json` (owner-only) and can be revoked anytime in **Workover → Settings → Developer**.
|
|
32
40
|
|
|
41
|
+
On a machine with no display (a container, a server, an SSH session) it prints the link instead of opening a browser. `workover login` waits up to ten minutes for the approval, which is longer than most agents' shells allow, so an agent runs `workover login --no-wait` (add `--json` for the code, link and expiry as JSON), sends the person the link, and runs `workover login --resume` once they have approved. `workover whoami` then shows which account and workspaces the sign-in belongs to.
|
|
42
|
+
|
|
33
43
|
A connected tool can read your documents, create new ones, and propose changes as suggestions you review. By default it **cannot** publish to WordPress, and it **cannot** edit an existing document without leaving you something to accept.
|
|
34
44
|
|
|
35
45
|
Pass `--publish` if you want the tool to be able to publish to your connected WordPress sites — useful for an agent building out a documentation set rather than editing one. The browser shows exactly what is being granted before you approve, and even a publishing token **cannot** override a "WordPress is newer" conflict: forcing past someone else's edit needs a person who can go and look.
|
|
@@ -37,8 +47,78 @@ Pass `--publish` if you want the tool to be able to publish to your connected Wo
|
|
|
37
47
|
Pass `--write` if you want the tool to edit documents directly rather than suggesting changes — see
|
|
38
48
|
[Editing directly](#editing-directly) below for when that is the right call.
|
|
39
49
|
|
|
50
|
+
Pass `--site` to let the tool set up and publish a hosted Workover Help Center: create it, import
|
|
51
|
+
docs into it, connect its custom domain and publish it. See [Setting up a Help Center](#setting-up-a-help-center).
|
|
52
|
+
|
|
40
53
|
Whatever you grant, a token can never change your account security, your billing, or your other tokens.
|
|
41
54
|
|
|
55
|
+
## Setting up a Help Center
|
|
56
|
+
|
|
57
|
+
With a sign-in from `workover login --site`, an agent can do the whole setup of a hosted Help
|
|
58
|
+
Center from a terminal. What stays with the person is paying for a plan, approving the sign-in, and
|
|
59
|
+
adding DNS records at their DNS provider.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
workover project create --name "Acme Docs" --start empty # a new project that publishes to a Help Center
|
|
63
|
+
workover site create --project 11 # ...or give an existing project one
|
|
64
|
+
workover site import --project 11 --url https://docs.example.com
|
|
65
|
+
workover site import --project 11 --dir ./docs # ...or a folder: _site.json or docs.json
|
|
66
|
+
workover site appearance --project 11 --from ./docs --logo logo.svg --favicon favicon.png
|
|
67
|
+
workover site redirects --project 11 --from ./docs # adds the config's redirects
|
|
68
|
+
workover site api add --project 11 --spec https://api.example.com/openapi.json # an API reference tab
|
|
69
|
+
workover site api sync --project 11 # "the spec changed": sync it now
|
|
70
|
+
workover site publish --project 11 # live at <address>.workover.site
|
|
71
|
+
workover site domain --project 11 --set docs.example.com # or --set example.com/docs
|
|
72
|
+
workover site check --project 11 # records found, verified, certificate, live
|
|
73
|
+
workover site proxy --project 11 --write # under a path: add the proxy setup to this repo
|
|
74
|
+
workover site unpublish --project 11 --yes # take it offline; publish restores it
|
|
75
|
+
workover site index --project 11 on # let search engines index it
|
|
76
|
+
workover site status --project 11
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- `project create` makes the project, its site at `<address>.workover.site` and its first pages
|
|
80
|
+
(`--start blank`, `starter`, or `empty` for an import). `--address <name>` picks the address,
|
|
81
|
+
`--workspace <slug>` the workspace when the account has more than one.
|
|
82
|
+
- `site import` brings in a public docs site, up to 500 pages with their navigation, and reports
|
|
83
|
+
progress. It waits just under two minutes (`--wait <seconds>` changes that); a larger site keeps
|
|
84
|
+
importing, and `--status` checks on it.
|
|
85
|
+
`site publish` waits the same way. `--dir` imports a docs folder instead: Workover's
|
|
86
|
+
`_site.json` with `<tab>/<slug>.md` pages, or Mintlify's `docs.json`, with the tabs, groups and
|
|
87
|
+
order the config gives. Pages the site already has are kept, so it is safe to run again.
|
|
88
|
+
- `site appearance` sets the colors, links and search prompt from `--from <folder>` and from flags
|
|
89
|
+
(`--primary`, `--primary-dark`, `--search-prompt`), and uploads `--logo`, `--logo-dark`,
|
|
90
|
+
`--favicon` and `--favicon-dark` images as the Customize tab does. Settings not given are kept.
|
|
91
|
+
`site redirects --from <folder>` adds the config's redirects and never changes an existing one.
|
|
92
|
+
- `site api add --spec <url>` adds an API reference tab made from an OpenAPI or Swagger spec: one
|
|
93
|
+
page per endpoint, grouped by tag, with the Try it playground (`--tab`, `--group` and
|
|
94
|
+
`--directory` place it). The site keeps the tab in step with the spec every hour and on
|
|
95
|
+
`site api sync`, which a deploy can call with a site token. Those generated pages publish
|
|
96
|
+
themselves once the site has been published; hand-written pages still wait for a person. A spec
|
|
97
|
+
that fails to load, or lists no endpoints, changes nothing. A `_site.json` tab, or a `docs.json`
|
|
98
|
+
tab or group, with `"openapi": "<url>"` does the same during `site import --dir`.
|
|
99
|
+
`site api list` shows each tab and its last sync, and `site api remove [--tab <t>]` stops
|
|
100
|
+
following the spec and keeps its pages as ordinary pages.
|
|
101
|
+
- `site domain --set` prints **every** DNS record to add, as the Domain tab in the app shows them:
|
|
102
|
+
the TXT record that proves the domain is yours and the CNAME, each with the name to type into the
|
|
103
|
+
provider's form, the full name, the value, and whether it has been found, plus zone file lines.
|
|
104
|
+
`--preverify` adds the TXT records that prove a domain already serving another site before its
|
|
105
|
+
CNAME moves. For a path (`example.com/docs`) it prints the TXT record and the proxy setup for the
|
|
106
|
+
platform the website runs on, read from its headers. `--set none` disconnects the domain.
|
|
107
|
+
`--move-from <id>` takes the domain from another Help Center in the same workspace in one step:
|
|
108
|
+
it keeps its verification, so the DNS records and the proxy stay as they are and neither site goes
|
|
109
|
+
without it. A domain the workspace verified before also keeps its TXT token when it is
|
|
110
|
+
disconnected and later connected to another of its Help Centers; another workspace always gets
|
|
111
|
+
its own.
|
|
112
|
+
- `site proxy` prints that setup for any platform: `--platform cloudflare`, `vercel`, `nextjs`,
|
|
113
|
+
`cloudfront` (console steps and OpenTofu/Terraform), `amplify`, `netlify`, `nginx`, `caddy` or
|
|
114
|
+
`apache`. `--write` puts it in the repository in `--dir` (default: here): the two rules go first
|
|
115
|
+
in `vercel.json` or `netlify.toml`, and the Worker, nginx, Caddy and Apache setups are written as
|
|
116
|
+
files of their own, with the line that includes them. Running it twice changes nothing.
|
|
117
|
+
- `site unpublish --yes` takes the site offline; its pages, settings and domain stay.
|
|
118
|
+
- Every one takes `--json`.
|
|
119
|
+
|
|
120
|
+
The routes these call refuse any other token, with a message naming `workover login --site`.
|
|
121
|
+
|
|
42
122
|
## Working on documents
|
|
43
123
|
|
|
44
124
|
**Any command that takes a document takes its link.** Paste the URL from the browser
|
|
@@ -82,11 +162,25 @@ workover doc list --project 11 # documents in it, with thei
|
|
|
82
162
|
workover doc read 1234 # the current text
|
|
83
163
|
workover doc read 1234 --json # ...for a script
|
|
84
164
|
workover doc activity 1234 # who changed it, and how
|
|
165
|
+
workover doc status 1234 # its Workover status, and the ones you can move it to
|
|
166
|
+
workover doc status 1234 review # submit it for review (needs `login --write`)
|
|
167
|
+
workover doc rename 1234 --title "Billing and invoices" # rename it, body untouched (needs `login --write`)
|
|
85
168
|
|
|
86
169
|
workover doc create --project 11 --title "Billing" --file billing.md
|
|
87
170
|
cat billing.md | workover doc propose 1234 --note "tightened the intro"
|
|
88
171
|
```
|
|
89
172
|
|
|
173
|
+
`doc status` is the document's **Workover** status, set through the same rules as the browser's
|
|
174
|
+
status picker: your project role, the workflow's gates, and the approval a gated status opens. It
|
|
175
|
+
says whether the status changed, is waiting on an approval, or was refused and why. Moving a
|
|
176
|
+
document into or out of Published needs `workover login --write --publish`. It does not publish to
|
|
177
|
+
WordPress: the post's own status is separate, and goes live from the document's WordPress tab.
|
|
178
|
+
|
|
179
|
+
`doc rename` changes the document's title and nothing else: the body is not sent, and a linked
|
|
180
|
+
WordPress post keeps its title and slug. It is the same rename as the editor's name field, recorded
|
|
181
|
+
in `doc activity` as a rename through this sign-in. A `# Heading` in a `doc write` body never renames
|
|
182
|
+
a document.
|
|
183
|
+
|
|
90
184
|
`doc create` writes the content **into** the new document. There is nothing to accept: a document
|
|
91
185
|
that did not exist a moment ago has no earlier version for anybody to review the new text against,
|
|
92
186
|
and asking would leave you accepting your own content against a blank page.
|
|
@@ -341,6 +435,19 @@ not available in the session that registered it, so an agent that discovers mid-
|
|
|
341
435
|
Workover has no route in until it restarts; a CLI subcommand works the moment the CLI is installed.
|
|
342
436
|
Either surface, same operations, same permissions.
|
|
343
437
|
|
|
438
|
+
## Telling us a command fell short
|
|
439
|
+
|
|
440
|
+
```sh
|
|
441
|
+
workover feedback --summary "doc list cannot filter by status" \
|
|
442
|
+
--intent "Find every draft in project 11" \
|
|
443
|
+
--problem "doc list has no --status flag, so I read every document" \
|
|
444
|
+
--fix "Add --status to doc list" --tool "workover doc list" --kind missing_capability
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Files an issue in the Workover team's tracker, the same as the MCP server's
|
|
448
|
+
`workover_report_feedback`. It is written for agents, which notice these gaps as they work, but a
|
|
449
|
+
person can use it too. Describe the problem, never document text, customer data or secrets.
|
|
450
|
+
|
|
344
451
|
## Configuration
|
|
345
452
|
|
|
346
453
|
- `WORKOVER_API` — point the CLI at a different Workover API. Defaults to `https://api.workover.io`.
|