makea-cli 0.1.23__tar.gz → 0.2.0__tar.gz

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.
Files changed (69) hide show
  1. {makea_cli-0.1.23 → makea_cli-0.2.0}/.claude/skills/create-supplier-profile/SKILL.md +8 -8
  2. {makea_cli-0.1.23 → makea_cli-0.2.0}/.claude/skills/link-supplier-user/SKILL.md +8 -8
  3. {makea_cli-0.1.23 → makea_cli-0.2.0}/.claude/skills/makea-cli-setup/SKILL.md +5 -5
  4. {makea_cli-0.1.23 → makea_cli-0.2.0}/.claude/skills/payment-revenue-report/SKILL.md +16 -16
  5. {makea_cli-0.1.23 → makea_cli-0.2.0}/.claude/skills/supplier-user-id-migration/SKILL.md +6 -6
  6. makea_cli-0.2.0/CHANGELOG.md +125 -0
  7. makea_cli-0.2.0/PKG-INFO +239 -0
  8. makea_cli-0.2.0/README.md +227 -0
  9. makea_cli-0.2.0/makea_cli/__init__.py +1 -0
  10. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/__main__.py +2 -2
  11. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/api_client.py +371 -120
  12. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/__init__.py +4 -0
  13. makea_cli-0.2.0/makea_cli/commands/_util.py +29 -0
  14. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/analytics/cmd.py +41 -9
  15. makea_cli-0.2.0/makea_cli/commands/brand/cmd.py +466 -0
  16. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/designer/cmd.py +57 -20
  17. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/directory/cmd.py +27 -6
  18. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/document/cmd.py +82 -21
  19. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/email/cmd.py +11 -2
  20. makea_cli-0.2.0/makea_cli/commands/factory/cmd.py +255 -0
  21. makea_cli-0.2.0/makea_cli/commands/library/__init__.py +0 -0
  22. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/library/cmd.py +47 -14
  23. makea_cli-0.2.0/makea_cli/commands/metrics/__init__.py +0 -0
  24. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/metrics/cmd.py +19 -6
  25. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/orders/cmd.py +74 -22
  26. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/product/cmd.py +29 -10
  27. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/production/cmd.py +52 -17
  28. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/supplier/cmd.py +190 -33
  29. makea_cli-0.2.0/makea_cli/errors.py +85 -0
  30. makea_cli-0.2.0/makea_cli/identity.py +78 -0
  31. makea_cli-0.2.0/makea_cli/main.py +207 -0
  32. makea_cli-0.2.0/makea_cli/output.py +182 -0
  33. makea_cli-0.2.0/makea_cli/registry.py +357 -0
  34. makea_cli-0.2.0/pyproject.toml +32 -0
  35. makea_cli-0.2.0/tests/golden_manifest.json +6085 -0
  36. makea_cli-0.2.0/tests/test_output_contract.py +317 -0
  37. makea_cli-0.2.0/tests/test_persona_commands.py +210 -0
  38. makea_cli-0.2.0/tests/test_registry.py +136 -0
  39. makea_cli-0.1.23/PKG-INFO +0 -157
  40. makea_cli-0.1.23/README.md +0 -146
  41. makea_cli-0.1.23/makea_cli/__init__.py +0 -1
  42. makea_cli-0.1.23/makea_cli/commands/_util.py +0 -16
  43. makea_cli-0.1.23/makea_cli/main.py +0 -31
  44. makea_cli-0.1.23/pyproject.toml +0 -26
  45. {makea_cli-0.1.23 → makea_cli-0.2.0}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  46. {makea_cli-0.1.23 → makea_cli-0.2.0}/.gitignore +0 -0
  47. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea-collection-upload/SKILL.md +0 -0
  48. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea-collection-upload/scripts/create_products.py +0 -0
  49. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/auth_pkce.py +0 -0
  50. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/analytics/__init__.py +0 -0
  51. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/auth/__init__.py +0 -0
  52. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/auth/cmd.py +0 -0
  53. {makea_cli-0.1.23/makea_cli/commands/library → makea_cli-0.2.0/makea_cli/commands/brand}/__init__.py +0 -0
  54. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/designer/__init__.py +0 -0
  55. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/directory/__init__.py +0 -0
  56. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/document/__init__.py +0 -0
  57. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/email/__init__.py +0 -0
  58. {makea_cli-0.1.23/makea_cli/commands/metrics → makea_cli-0.2.0/makea_cli/commands/factory}/__init__.py +0 -0
  59. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/orders/__init__.py +0 -0
  60. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/product/__init__.py +0 -0
  61. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/production/__init__.py +0 -0
  62. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/production/pricing_spec.py +0 -0
  63. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/commands/supplier/__init__.py +0 -0
  64. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/config.py +0 -0
  65. {makea_cli-0.1.23 → makea_cli-0.2.0}/makea_cli/posthog_client.py +0 -0
  66. {makea_cli-0.1.23 → makea_cli-0.2.0}/npm/makea-cli/README.md +0 -0
  67. {makea_cli-0.1.23 → makea_cli-0.2.0}/npm/makea-cli/makea-cli.mjs +0 -0
  68. {makea_cli-0.1.23 → makea_cli-0.2.0}/npm/makea-cli/package.json +0 -0
  69. {makea_cli-0.1.23 → makea_cli-0.2.0}/uv.lock +0 -0
@@ -3,8 +3,8 @@ name: create-supplier-profile
3
3
  description: >-
4
4
  Create a new Makea supplier profile from scratch (admin), the schema-driven way:
5
5
  first fetch the live supplier profile schema (the field taxonomy) with
6
- `makea-cli get-supplier-profile-schema`, then build a valid v2 payload against
7
- it, then upload with `makea-cli add-supplier`. Use this whenever you need to
6
+ `makea-cli admin get supplier-profile-schema`, then build a valid v2 payload against
7
+ it, then upload with `makea-cli admin create supplier`. Use this whenever you need to
8
8
  onboard / register / create a supplier, turn raw supplier info (a website, a
9
9
  brochure, an email, a few notes) into a structured profile, or are asked to
10
10
  "add a supplier", "create a supplier profile", "onboard [company]". The AI does
@@ -27,7 +27,7 @@ Flow: **fetch schema → build payload → upload.**
27
27
 
28
28
  ## Step 0 — Auth & CLI setup
29
29
 
30
- You need a working, authenticated `makea-cli`. If `makea-cli list-suppliers`
30
+ You need a working, authenticated `makea-cli`. If `makea-cli admin list supplier`
31
31
  returns JSON, you're good. If it prints `尚未登录` / "not logged in" or
32
32
  `command not found`, run the **`makea-cli-setup`** skill first (install + token
33
33
  refresh + login).
@@ -35,7 +35,7 @@ refresh + login).
35
35
  Quick smoke-test:
36
36
 
37
37
  ```bash
38
- makea-cli list-suppliers 2>&1 | head -3
38
+ makea-cli admin list supplier 2>&1 | head -3
39
39
  ```
40
40
 
41
41
  ---
@@ -43,7 +43,7 @@ makea-cli list-suppliers 2>&1 | head -3
43
43
  ## Step 1 — Fetch the schema (taxonomy)
44
44
 
45
45
  ```bash
46
- makea-cli get-supplier-profile-schema
46
+ makea-cli admin get supplier-profile-schema
47
47
  ```
48
48
 
49
49
  Returns `{success, schema}`. The `schema` object you care about:
@@ -122,7 +122,7 @@ is for. Confirm anything ambiguous with the user before uploading.
122
122
  ## Step 3 — Upload
123
123
 
124
124
  ```bash
125
- makea-cli add-supplier --file supplier.json
125
+ makea-cli admin create supplier --file supplier.json
126
126
  ```
127
127
 
128
128
  The file root may be the flat supplier object (recommended) or the full envelope
@@ -140,7 +140,7 @@ schema (Step 2), and re-run. Common codes: `required_missing`,
140
140
  ## Step 4 — Verify
141
141
 
142
142
  ```bash
143
- makea-cli list-suppliers | python3 -c "
143
+ makea-cli admin list supplier | python3 -c "
144
144
  import json, sys
145
145
  data = json.load(sys.stdin)
146
146
  search = 'acme' # lowercase fragment of the company name
@@ -164,4 +164,4 @@ user.
164
164
  - **`supplier_id` is auto-generated** when omitted. Provide one only if you need
165
165
  it to equal a Cognito sub up front (usually you don't — link later).
166
166
  - **Documents** (catalogue, images, business_license, …) are uploaded separately
167
- with `makea-cli upload-supplier-document` after the profile exists.
167
+ with `makea-cli admin upload supplier-document` after the profile exists.
@@ -70,7 +70,7 @@ export PATH="$PATH:/sessions/modest-brave-newton/.local/bin"
70
70
  Quick smoke-test:
71
71
 
72
72
  ```bash
73
- makea-cli list-suppliers 2>&1 | head -3
73
+ makea-cli admin list supplier 2>&1 | head -3
74
74
  ```
75
75
 
76
76
  If you see JSON, you're authenticated. If you see "尚未登录", the token is still broken.
@@ -110,7 +110,7 @@ Confirm with the user if there are multiple matches. The right one is typically
110
110
 
111
111
  ```bash
112
112
  export PATH="$PATH:/sessions/modest-brave-newton/.local/bin"
113
- makea-cli list-suppliers | python3 -c "
113
+ makea-cli admin list supplier | python3 -c "
114
114
  import json, sys
115
115
  data = json.load(sys.stdin)
116
116
  suppliers = data.get('result', [])
@@ -133,7 +133,7 @@ equal to the newly registered user, and one with `null` — the one with `null`
133
133
  Always preview before writing anything:
134
134
 
135
135
  ```bash
136
- makea-cli backfill-supplier-id \
136
+ makea-cli admin backfill supplier-id \
137
137
  --user-id "<cognito_sub / new user_id>" \
138
138
  --old-supplier-id "<old profile UUID>" \
139
139
  --dry-run
@@ -155,7 +155,7 @@ with the user before proceeding.
155
155
  ## Step 5 — Apply
156
156
 
157
157
  ```bash
158
- makea-cli backfill-supplier-id \
158
+ makea-cli admin backfill supplier-id \
159
159
  --user-id "<cognito_sub>" \
160
160
  --old-supplier-id "<old_supplier_id>" \
161
161
  --apply
@@ -176,7 +176,7 @@ Only do this if the user explicitly asks. The old `SUPPLIER#{old_id}` partition
176
176
  marked `is_migrated` but still present. To remove it permanently:
177
177
 
178
178
  ```bash
179
- makea-cli backfill-supplier-id \
179
+ makea-cli admin backfill supplier-id \
180
180
  --user-id "<cognito_sub>" \
181
181
  --old-supplier-id "<old_supplier_id>" \
182
182
  --apply \
@@ -194,8 +194,8 @@ After linking, verify by pulling all quote requests and supplier links for the n
194
194
 
195
195
  ```bash
196
196
  export PATH="$PATH:/sessions/modest-brave-newton/.local/bin"
197
- makea-cli get-quote-requests-by-supplier-id "<cognito_sub>"
198
- makea-cli get-supplier-links-by-supplier-id "<cognito_sub>"
197
+ makea-cli admin list quote-request --supplier "<cognito_sub>"
198
+ makea-cli admin list supplier-link "<cognito_sub>"
199
199
  ```
200
200
 
201
201
  Present the results as a clean table per product: link name, sampling price, production
@@ -213,7 +213,7 @@ price tiers (with currency), lead times.
213
213
  | Thing | Where to find it |
214
214
  | -------------------------------- | ----------------------------------------------------------------------------------- |
215
215
  | Supplier `user_id` (Cognito sub) | `/admin/users` search by name/email |
216
- | Old `supplier_id` | `makea-cli list-suppliers` — look for `supplier_user_id: null` |
216
+ | Old `supplier_id` | `makea-cli admin list supplier` — look for `supplier_user_id: null` |
217
217
  | Credentials path | `/sessions/modest-brave-newton/mnt/Application Support--makea-cli/credentials.json` |
218
218
 
219
219
 
@@ -35,7 +35,7 @@ makea-cli version 2>&1 | head -1 || echo "NOT_INSTALLED"
35
35
  If that prints a version, test auth with a low-cost call:
36
36
 
37
37
  ```bash
38
- makea-cli list-suppliers 2>&1 | head -c 200
38
+ makea-cli admin list supplier 2>&1 | head -c 200
39
39
  ```
40
40
 
41
41
  - JSON output → **already set up, you're done.** Skip to "Confirm & report".
@@ -110,7 +110,7 @@ Connecting to a **non-production** environment? Set these before `makea-cli auth
110
110
  Re-run the smoke-test from Step 0:
111
111
 
112
112
  ```bash
113
- makea-cli list-suppliers 2>&1 | head -c 200
113
+ makea-cli admin list supplier 2>&1 | head -c 200
114
114
  ```
115
115
 
116
116
  JSON back → tell the user **"✓ makea-cli is installed and logged in."** and
@@ -132,6 +132,6 @@ Step 2 and confirm the browser flow completed.
132
132
  | Logout | `makea-cli auth --logout` |
133
133
 
134
134
  The credentials JSON holds `id_token`, `refresh_token`, `expires_in`,
135
- `saved_at`. Run `makea-cli --help` for the full command list (list-users,
136
- list-suppliers, list-product-orders, create-quote-request, download-document,
137
- upload-*-document, backfill-supplier-id, …).
135
+ `saved_at`. Run `makea-cli --help` for the full command list (admin list user,
136
+ admin list supplier, admin list product-order, admin create quote-request, admin download document,
137
+ upload-*-document, admin backfill supplier-id, …).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: payment-revenue-report
3
- description: Report payment received and platform revenue (service fee + transaction fee) across a date range. Use when the user asks about platform totals, or wants a drill-down by user / product / product category. Backed by the makea-cli `get-cumulative-payment-and-platform-revenue` command and existing order-listing commands.
3
+ description: Report payment received and platform revenue (service fee + transaction fee) across a date range. Use when the user asks about platform totals, or wants a drill-down by user / product / product category. Backed by the makea-cli `admin get revenue-metrics` command and existing order-listing commands.
4
4
  ---
5
5
 
6
6
  # Payment & platform revenue report
@@ -18,7 +18,7 @@ the question the user is asking:
18
18
 
19
19
  | Mode | When | How |
20
20
  | --- | --- | --- |
21
- | **A. Platform totals** | User wants the whole-platform aggregate over a time range. | One direct admin API call: `makea-cli get-cumulative-payment-and-platform-revenue`. |
21
+ | **A. Platform totals** | User wants the whole-platform aggregate over a time range. | One direct admin API call: `makea-cli admin get revenue-metrics`. |
22
22
  | **B. Per-user / per-product / per-category drill-down** | User wants revenue attributed to a specific designer, product, or category. | The admin cumulative endpoint does **not** support these filters. Fetch the relevant orders with the existing list commands and aggregate the fees client-side. |
23
23
 
24
24
  Always confirm which mode is needed before running anything. If the user is
@@ -72,7 +72,7 @@ boundary mistakes.
72
72
  ### 2. Run the command
73
73
 
74
74
  ```bash
75
- makea-cli get-cumulative-payment-and-platform-revenue \
75
+ makea-cli admin get revenue-metrics \
76
76
  --start-date 2026-01-01 \
77
77
  --end-date 2026-03-31 \
78
78
  --granularity month \
@@ -146,15 +146,15 @@ Choose the entry point based on what you are drilling into:
146
146
  1. List the designer's product orders:
147
147
 
148
148
  ```bash
149
- makea-cli list-product-orders --user-id <user_id>
149
+ makea-cli admin list product-order --user-id <user_id>
150
150
  ```
151
151
 
152
152
  2. For each product order's `product_reference_id`, pull the sampling and
153
153
  production orders:
154
154
 
155
155
  ```bash
156
- makea-cli list-sampling-orders-by-product <product_reference_id>
157
- makea-cli list-production-orders-by-product <product_reference_id>
156
+ makea-cli admin list sampling-order --product <product_reference_id>
157
+ makea-cli admin list production-order --product <product_reference_id>
158
158
  ```
159
159
 
160
160
  3. Filter the returned orders to those whose **payment timestamp** falls in
@@ -172,8 +172,8 @@ Choose the entry point based on what you are drilling into:
172
172
 
173
173
  ### By product
174
174
 
175
- Skip step 1 and go straight to `list-sampling-orders-by-product` /
176
- `list-production-orders-by-product` with the known `product_reference_id`.
175
+ Skip step 1 and go straight to `admin list sampling-order --product` /
176
+ `admin list production-order --product` with the known `product_reference_id`.
177
177
 
178
178
  ### By product category
179
179
 
@@ -194,8 +194,8 @@ There is no admin list-products-by-category CLI command today. Do this:
194
194
  - **Transaction fee is hard-coded at 2.8%.** If that constant changes in
195
195
  `FeeCalculationHelper.py` it will silently diverge from this skill. Keep
196
196
  the magic number centralized in one place in any scratch script you write.
197
- - **Pagination.** `list-product-orders`, `list-all-sampling-orders`, and
198
- `list-all-production-orders` page with `--limit` / `--offset`. For a time
197
+ - **Pagination.** `admin list product-order`, `admin list sampling-order`, and
198
+ `admin list production-order` page with `--limit` / `--offset`. For a time
199
199
  window that could contain many orders, loop until `has_more` / the returned
200
200
  page is empty before aggregating — do not silently truncate.
201
201
  - **Timezones.** Date ranges are interpreted by the server as calendar dates.
@@ -214,12 +214,12 @@ There is no admin list-products-by-category CLI command today. Do this:
214
214
 
215
215
  ## Related commands already in the CLI
216
216
 
217
- - `list-users` — find a user id to drill down on.
218
- - `list-product-orders --user-id <id>` — product (SKU) rows for one designer.
219
- - `list-all-sampling-orders` — global sampling order list.
220
- - `list-all-production-orders [--type PRODUCTION|RESTOCK]` — global 大货 list.
221
- - `list-sampling-orders-by-product <id>` — sampling orders for one product.
222
- - `list-production-orders-by-product <id>` — production orders for one product.
217
+ - `admin list user` — find a user id to drill down on.
218
+ - `admin list product-order --user-id <id>` — product (SKU) rows for one designer.
219
+ - `admin list sampling-order` — global sampling order list.
220
+ - `admin list production-order [--type PRODUCTION|RESTOCK]` — global 大货 list.
221
+ - `admin list sampling-order --product <id>` — sampling orders for one product.
222
+ - `admin list production-order --product <id>` — production orders for one product.
223
223
 
224
224
  ## Upstream reference
225
225
 
@@ -2,7 +2,7 @@
2
2
  name: supplier-user-id-migration
3
3
  description: >-
4
4
  Migrates supplier data when DynamoDB supplier_id does not match Cognito user sub.
5
- Admins use makea-cli backfill-supplier-id (calls garmentby-service admin API).
5
+ Admins use makea-cli admin backfill supplier-id (calls garmentby-service admin API).
6
6
  Server-only modes (S3-only, delete-old-partition-only) and reconcile_quote_request_stage_status
7
7
  still run from garmentby-service with manage.py. Use when the user mentions supplier migration,
8
8
  wrong supplier_id, supplierReferenceId, backfill_supplier_id, quote request stage/status,
@@ -19,7 +19,7 @@ Production expects **`supplier_id` == Cognito `sub` (user_id)**. If a profile wa
19
19
 
20
20
  Requires an admin Makea account and existing `makea-cli` browser login (same as other admin commands).
21
21
 
22
- **CLI command:** `makea-cli backfill-supplier-id`
22
+ **CLI command:** `makea-cli admin backfill supplier-id`
23
23
 
24
24
  It calls **`POST /admin/supplier/backfill_supplier_id_with_quote_requests`**, which wraps the same logic as `manage.py backfill_supplier_id` on the server (profile, Cognito, optional S3/DOCUMENT#, product links, link→quote-request backfill, orders, optional delete old partition at end).
25
25
 
@@ -27,25 +27,25 @@ It calls **`POST /admin/supplier/backfill_supplier_id_with_quote_requests`**, wh
27
27
 
28
28
  ```bash
29
29
  # Always dry-run first (default)
30
- makea-cli backfill-supplier-id \
30
+ makea-cli admin backfill supplier-id \
31
31
  --user-id "<cognito_sub>" \
32
32
  --old-supplier-id "<wrong_supplier_uuid>"
33
33
 
34
34
  # Apply writes
35
- makea-cli backfill-supplier-id \
35
+ makea-cli admin backfill supplier-id \
36
36
  --user-id "<cognito_sub>" \
37
37
  --old-supplier-id "<wrong_supplier_uuid>" \
38
38
  --apply
39
39
 
40
40
  # Full run but defer S3/documents (server will skip step 2b)
41
- makea-cli backfill-supplier-id \
41
+ makea-cli admin backfill supplier-id \
42
42
  --user-id "<cognito_sub>" \
43
43
  --old-supplier-id "<wrong_supplier_uuid>" \
44
44
  --apply \
45
45
  --skip-s3-documents
46
46
 
47
47
  # Only link→quote-request backfill (profile/Cognito/links already fixed)
48
- makea-cli backfill-supplier-id \
48
+ makea-cli admin backfill supplier-id \
49
49
  --user-id "<cognito_sub>" \
50
50
  --old-supplier-id "<wrong_supplier_uuid>" \
51
51
  --apply \
@@ -0,0 +1,125 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0
4
+
5
+ **The command names changed.** Every command is now `makea-cli <persona> <verb> <noun>`:
6
+ the persona says who is acting (`admin` / `designer` / `supplier`), and the verb says whether
7
+ the command reads or writes. The old flat names still work as hidden aliases that forward to
8
+ the new command and print a deprecation line on stderr — **they are removed in the next minor
9
+ release**, so move scripts and skills over now.
10
+
11
+ Why: the CLI is becoming the action surface for Beeboo. An agent harness has to decide, from
12
+ the command text alone and before running it, who is acting and whether this is a read or a
13
+ write. A flat list of 58 names could not answer either question; `submit-supplier-quote` is an
14
+ *admin* command acting *on behalf of* a supplier, and nothing in the name said so.
15
+
16
+ ### New in 0.2.0
17
+
18
+ - **`--describe`** on any command prints its machine-readable definition (flags, backend path,
19
+ declared side effects, approval grade). `makea-cli --describe --json` prints the whole manifest.
20
+ - **JSON by default when piped.** A terminal still gets pretty-printed output; a pipe gets one
21
+ plain JSON document. `--json` forces the plain form anywhere.
22
+ - **`--fields a,b,c`** on reads keeps only those keys, on the payload or on each of its rows.
23
+ - **`--limit N`** on every `list`. Where the backend pages, it is passed through; where it does
24
+ not, the rows are capped locally and the payload says how many were dropped (`truncated`,
25
+ `returned`, `omitted`). There is no default cap: several skills depend on reading a whole
26
+ table, and a silent default would make them quietly wrong. A response with no single list of
27
+ rows (several lists, no obvious one) is left alone and says so in `limit_note` rather than
28
+ pretending the flag applied.
29
+ - **`--dry-run`** on every write prints the exact request (method, URL, body) and sends nothing.
30
+ - **`--idempotency-key K`** on every write, sent as the `Idempotency-Key` header.
31
+ - **Exit codes**: `0` ok, `2` usage, `3` not logged in or the login cannot act as this persona,
32
+ `4` the backend refused (4xx), `5` the call did not complete (5xx / network / timeout). A read
33
+ that exits 5 is simply retryable; a **write** that exits 5 may or may not have been applied, so
34
+ re-read state before retrying it. Writes are never retried automatically.
35
+ - **Errors are JSON on stderr**, with the exit code inside.
36
+ - **Secrets are redacted** from all output (JWTs, `Bearer …`, impersonation/delegation tokens).
37
+ - **A persona pre-check**: a command whose persona your token cannot act as fails with exit 3
38
+ before any request. The backend remains the real boundary; this only saves a round trip.
39
+
40
+ ### New commands
41
+
42
+ The `designer` and `supplier` personas are new. They mirror what the in-product assistant can
43
+ already do, so the same operation is available from a terminal, a script and an agent:
44
+
45
+ - **designer** (21 new): `create note`, `create rfq`, `create sampling-order`, `get collection`, `get lifecycle`, `get product`, `get quote-advice`, `get tech-pack`, `get tech-pack-history`, `list channel`, `list collection`, `list library-element`, `list payment`, `list product`, `list production-order`, `list sampling-order`, `list shipping-order`, `list supplier-link`, `list task`, `search note`, `update product`
46
+ - **supplier** (12 new): `create note`, `download document`, `get pack`, `get pack-changes`, `get profile`, `get rfq`, `list action`, `list channel`, `list note`, `list production-order`, `list rfq`, `submit quote`
47
+ - **admin** (2 new): `get quote-request`, `list quote-request`
48
+
49
+ ### Renamed
50
+
51
+ | 0.1 | 0.2 |
52
+ |---|---|
53
+ | `add-supplier` | `admin create supplier` |
54
+ | `analytics-active-users` | `admin get active-users` |
55
+ | `analytics-feature-usage` | `admin get feature-usage` |
56
+ | `analytics-query` | `admin get analytics-query` |
57
+ | `analytics-top-clicks` | `admin get top-clicks` |
58
+ | `analytics-top-features` | `admin get top-features` |
59
+ | `backfill-supplier-id` | `admin backfill supplier-id` |
60
+ | `convert-currency` | `admin get currency-conversion` |
61
+ | `create-quote-request` | `admin create quote-request` |
62
+ | `create-user` | `admin create user` |
63
+ | `designer-create-collection` | `designer create collection` |
64
+ | `designer-download-document` | `designer download document` |
65
+ | `designer-link-product-to-collection` | `designer set product-collection` |
66
+ | `designer-upload-document` | `designer upload document` |
67
+ | `designer-upsert-product` | `designer create product` |
68
+ | `download-document` | `admin download document` |
69
+ | `download-product-document` | `admin download product-document` |
70
+ | `extract-ai-tech-spec` | `admin get tech-spec-extraction` |
71
+ | `get-cumulative-payment-and-platform-revenue` | `admin get revenue-metrics` |
72
+ | `get-supplier-links-by-supplier-id` | `admin list supplier-link` |
73
+ | `get-supplier-profile-schema` | `admin get supplier-profile-schema` |
74
+ | `library-create` | `admin create library-element` |
75
+ | `library-delete` | `admin delete library-element` |
76
+ | `library-list` | `admin list library-element` |
77
+ | `library-schema` | `admin get library-schema` |
78
+ | `library-update` | `admin update library-element` |
79
+ | `list-all-production-orders` | `admin list production-order` |
80
+ | `list-all-restock-orders` | `admin list restock-order` |
81
+ | `list-all-sampling-orders` | `admin list sampling-order` |
82
+ | `list-all-shipping-orders` | `admin list shipping-order` |
83
+ | `list-misc-payments-by-product` | `admin list misc-payment` |
84
+ | `list-product-orders` | `admin list product-order` |
85
+ | `list-suppliers` | `admin list supplier` |
86
+ | `list-users` | `admin list user` |
87
+ | `production-groups-generate` | `admin generate pricing-groups` |
88
+ | `production-groups-set` | `admin set pricing-groups` |
89
+ | `production-pricing-show` | `admin get production-pricing` |
90
+ | `production-tiers-set` | `admin set production-tiers` |
91
+ | `production-variants-set` | `admin set production-variants` |
92
+ | `save-product-tech-spec` | `admin update tech-spec` |
93
+ | `send-email` | `admin send email` |
94
+ | `submit-supplier-quote` | `admin submit quote` |
95
+ | `update-quote-request` | `admin update quote-request` |
96
+ | `update-supplier` | `admin update supplier` |
97
+ | `update-supplier-quote` | `admin update quote` |
98
+ | `update-user-profile` | `admin update user` |
99
+ | `upload-financial-documents` | `admin upload financial-document` |
100
+ | `upload-link-document` | `admin upload link-document` |
101
+ | `upload-product-document` | `admin upload product-document` |
102
+ | `upload-production-order-document` | `admin upload production-order-document` |
103
+ | `upload-production-progress-document` | `admin upload production-progress-document` |
104
+ | `upload-sampling-order-document` | `admin upload sampling-order-document` |
105
+ | `upload-supplier-document` | `admin upload supplier-document` |
106
+
107
+ ### Merged
108
+
109
+ These four became flags on a single command, because they were the same read with a different filter:
110
+
111
+ | 0.1 | 0.2 |
112
+ |---|---|
113
+ | `list-sampling-orders-by-product <id>` | `admin list sampling-order --product <id>` |
114
+ | `list-production-orders-by-product <id>` | `admin list production-order --product <id>` |
115
+ | `get-quote-requests <id>` | `admin list quote-request (and admin get quote-request <id> for one)` |
116
+ | `get-quote-requests-by-supplier-id <id>` | `admin list quote-request --supplier <id>` |
117
+
118
+ ### Compatibility notes
119
+
120
+ - `typer` is pinned to `<0.25`. From 0.25 typer vendors its own copy of click, so a `TyperGroup`
121
+ is no longer a `click.Group` and the shared switches above cannot be attached to it. Lifting the
122
+ ceiling means reworking `makea_cli/main.py` at the same time.
123
+ - The npm wrapper is unchanged: it still forwards to `python3 -m makea_cli` and now propagates the
124
+ new exit codes.
125
+