@wevion/cli 1.0.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 ADDED
@@ -0,0 +1,46 @@
1
+ # @wevion/cli — Wevion CLI
2
+
3
+ Generic, spec-driven command-line interface for the Wevion API. Every command
4
+ is derived at runtime from the public OpenAPI spec — no generated code. CI
5
+ refreshes the bundled `openapi.json` snapshot on every production release.
6
+ The CLI exposes operations that the public spec marks as `apiKeyAuth`.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm i -g @wevion/cli # or: npx @wevion/cli list
12
+ ```
13
+
14
+ ## Use
15
+
16
+ ```bash
17
+ wevion login # prompts for the API key, saves it
18
+ printf '%s' "$WEVION_API_KEY" | wevion login # non-interactive; avoids shell history
19
+ wevion logout # forget the saved key
20
+ wevion list # list all commands, grouped by tag
21
+ wevion help <command> # show a command's flags
22
+ wevion get-api-v1-ad-accounts --limit 10 --search brand
23
+ wevion post-api-v1-ad-accounts-assign-all --connected true
24
+ wevion post-api-v1-ad-accounts-assign-all --json '{"connected":true}'
25
+ ```
26
+
27
+ Credentials & base URL are resolved in this order:
28
+
29
+ - API key: `WEVION_API_KEY` env → `wevion login` config (`~/.config/wevion/config.json`).
30
+ - Base URL: `--base-url` → `WEVION_BASE_URL` env → config → default `https://api.wevion.ai`
31
+ (stage: `https://api-stage.wevion.ai`).
32
+
33
+ ## Release
34
+
35
+ The `publish-cli` job in `.github/workflows/deploy.yml` runs on every push to
36
+ `main` that touches `apps/backend/**` or `packages/cli/**`. It regenerates the
37
+ snapshot from the released source (`dump:openapi`), so the published CLI always
38
+ matches the API at that commit, then `npm publish`es.
39
+
40
+ Version: `MAJOR.MINOR` comes from this `package.json` (human-owned); the patch
41
+ is the GitHub Actions run number, so every release is unique and monotonic
42
+ (e.g. `1.0.523`). Bump the minor here when there's a meaningful change.
43
+
44
+ Requires the `NPM_TOKEN` repository secret (automation token with publish
45
+ rights for the `@wevion` scope). If the bundled snapshot is ever absent the CLI
46
+ falls back to fetching `${baseUrl}/docs/json`.