Skip to content

Commit 1c56d44

Browse files
authored
add worai self-update command docs (#30)
1 parent 07af014 commit 1c56d44

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

TODO.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
- [x] 2026-02-05 Make sidebar loading resilient to .js/.ts generation differences and add a test.
66
- [x] 2026-02-05 Bump patch version to 3.12.1 for sidebar build fix.
77
- [x] 2026-02-05 Add 34.52.203.209 to the IP whitelist.
8+
- [x] 2026-02-19 Add worai CLI self-update command docs and startup update-check configuration notes.
89
- [x] 2026-02-19 Sync worai CLI docs with current command flags/defaults (`structured-data`, `google-search-console`, `configuration`, and command option tables).

docs/worai/commands/self.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: self
3+
---
4+
5+
Manage worai CLI update workflows.
6+
7+
## Usage
8+
- `worai self update [options]`
9+
10+
## self update
11+
Check PyPI for a newer `worai` version and print (or run) the recommended upgrade command.
12+
13+
### Options
14+
15+
| Option | Type | Default | Description |
16+
| --- | --- | --- | --- |
17+
| `--check-only` | bool | `false` | Only check for updates and print the suggested upgrade command. |
18+
| `--yes`, `-y` | bool | `false` | Run the upgrade command immediately. |
19+
20+
### Examples
21+
- `worai self update --check-only`
22+
- `worai self update --yes`
23+
24+
### Notes
25+
- Startup update checks are cached (24h) and non-blocking.
26+
- Disable startup update checks via `WORAI_DISABLE_UPDATE_CHECK=1` or config `updates.check = false`.

docs/worai/configuration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ log_level = "info"
2424
api_key = "wl_..."
2525
2626
[gsc]
27+
id = "sc-domain:example.com"
2728
client_secrets = "/path/to/client_secrets.json"
2829
2930
[ga]
@@ -32,11 +33,16 @@ client_secrets = "/path/to/client_secrets.json"
3233
3334
[oauth]
3435
token = "/path/to/oauth_token.json"
36+
37+
[updates]
38+
check = true
3539
```
3640

3741
Notes:
42+
- `gsc.id` can be used as default `--site` for commands that support it.
3843
- `oauth.token` is the shared token file for GSC + GA4. If not set via config or env, the CLI defaults to `./oauth_token.json`.
3944
- Legacy keys `gsc.token` and `ga.token` are still read, but must point to the same file when used.
45+
- `updates.check = false` disables startup update checks.
4046

4147
## Environment variables
4248

@@ -52,6 +58,7 @@ Notes:
5258
- `GA_ID` — GA4 property ID for Analytics sections.
5359
- `GA_CLIENT_SECRETS` — path to OAuth client secrets JSON for GA4.
5460
- `GSC_TOKEN` / `GA_TOKEN` — legacy aliases for `OAUTH_TOKEN` (must point to the same file if used).
61+
- `WORAI_DISABLE_UPDATE_CHECK` — set to `1|true|yes|on` to disable startup update checks.
5562

5663
Example environment setup:
5764
```

docs/worai/install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ If you plan to run `seocheck`, install Playwright browsers:
1616
- `worai --help`
1717
- `worai seocheck https://example.com/sitemap.xml`
1818
- `worai google-search-console --site sc-domain:example.com --client-secrets ./client_secrets.json`
19+
- `worai self update --check-only`
1920
- `worai <command> --help`
2021

2122
## Autocompletion

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ const sidebars = {
197197
"worai/commands/graph",
198198
"worai/commands/link-groups",
199199
"worai/commands/patch",
200+
"worai/commands/self",
200201
"worai/commands/structured-data",
201202
"worai/commands/list-entities-outside-dataset",
202203
"worai/commands/validate",

0 commit comments

Comments
 (0)