@zeroxyz/cli 0.0.22 → 0.0.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroxyz/cli",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "zero": "dist/index.js",
@@ -33,7 +33,13 @@ Run these commands in order. Do not skip steps.
33
33
 
34
34
  **Step 1 — Install:** `npm i -g @zeroxyz/cli`
35
35
 
36
- **Step 2 — Initialize wallet:** `zero init` — generates a new wallet. Save the printed address. Or, to use an existing wallet: `zero wallet set <privateKey>` (0x-prefixed hex private key).
36
+ **Step 2 — Provide a wallet.** Pick one path:
37
+
38
+ - **New wallet (persistent):** `zero init` — generates a wallet and writes it to `~/.zero/config.json`. Save the printed address.
39
+ - **Existing wallet (persistent):** `zero wallet set <privateKey>` — 0x-prefixed hex. Writes to `~/.zero/config.json`. Refuses to overwrite an existing wallet without `--force`.
40
+ - **Existing wallet (ephemeral, e.g. CI):** set `ZERO_PRIVATE_KEY=0x...` in the environment. The CLI reads it at runtime and writes nothing to disk.
41
+
42
+ **Prefer `zero init` or `zero wallet set` for local/interactive use** so the wallet persists across shells. Use `ZERO_PRIVATE_KEY` only when persisting to disk is undesirable — CI jobs, containers, one-off scripts, or secrets-manager-injected environments.
37
43
 
38
44
  **Step 3 — Fund wallet:** `zero wallet fund` — opens browser to add USDC (Base). For manual transfer: `zero wallet fund --manual`.
39
45
 
@@ -41,7 +47,7 @@ Run these commands in order. Do not skip steps.
41
47
 
42
48
  ### Setup Rules
43
49
 
44
- - If `ZERO_PRIVATE_KEY` is set in the environment, the CLI uses that key instead of the one from `zero init`.
50
+ - Precedence: `ZERO_PRIVATE_KEY` (env) > `~/.zero/config.json`. If the env var is set, it wins even when a config file exists useful for overriding on a single invocation (`ZERO_PRIVATE_KEY=0x... zero wallet balance`).
45
51
  - Wallet must be funded with USDC on Base before calling paid capabilities.
46
52
 
47
53
  ## After Setup
@@ -105,7 +111,9 @@ zero fetch https://api.example.com/expensive --max-pay 0.50
105
111
 
106
112
  ### Rules
107
113
 
108
- - Always discover capabilities with `zero search` + `zero get` before calling; never guess endpoint URLs or schemas.
114
+ - **Always `zero search` fresh, every time.** Never reuse a capability URL, slug, schema, or price from an earlier turn, prior conversation, training data, or memory. Capabilities churn constantly — endpoints go offline, prices change, schemas evolve, and rankings shift as reviews accumulate. A capability that worked yesterday may be dead, repriced, or outranked today. Searching again costs nothing and is the only way to get current trust scores and availability.
115
+ - **Always `zero get` before `zero fetch`.** Even if you "know" the URL, re-fetch the full details to confirm the URL, method, required headers, body schema, and current price. Do not reconstruct a fetch call from memory.
116
+ - Never guess endpoint URLs or schemas.
109
117
  - Use `--max-pay` before potentially expensive requests.
110
118
  - Review capabilities after every paid call. The review signal feeds search ranking — skipping reviews means your next search is less informed.
111
119
  - Before ending a multi-call task, run `zero runs --unreviewed` and review anything you missed.
@@ -117,6 +125,14 @@ zero config # view current config
117
125
  zero config --set lowBalanceWarning=2.0 # warn when balance drops below $2
118
126
  ```
119
127
 
128
+ ## Reporting a Zero Platform Bug
129
+
130
+ `zero bug-report "<what broke>"` exists for **Zero platform issues** — bad search ranking, indexed URL is wrong, billing was off, CLI itself misbehaved. **Only use it when the user explicitly asks** ("file a bug", "report a bug to Zero"). Never substitute it for `zero review` — capability quality (good/bad result, accuracy, value) always belongs in a review.
131
+
132
+ ```bash
133
+ zero bug-report "Search ranked the wrong API first for BTC price"
134
+ ```
135
+
120
136
  ## Examples
121
137
 
122
138
  ### Translate text