@newpeak/barista-cli 0.1.19 → 0.1.21

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 (49) hide show
  1. package/LICENSE +20 -20
  2. package/README.ja.md +340 -340
  3. package/README.md +341 -340
  4. package/README.vi.md +340 -340
  5. package/README.zh.md +340 -340
  6. package/bin/barista +6 -6
  7. package/dist/commands/liberica/client-price/create.d.ts.map +1 -1
  8. package/dist/commands/liberica/client-price/create.js +9 -1
  9. package/dist/commands/liberica/client-price/create.js.map +1 -1
  10. package/dist/commands/liberica/client-price/update.d.ts.map +1 -1
  11. package/dist/commands/liberica/client-price/update.js +28 -2
  12. package/dist/commands/liberica/client-price/update.js.map +1 -1
  13. package/dist/commands/liberica/materials/create.d.ts.map +1 -1
  14. package/dist/commands/liberica/materials/create.js +131 -0
  15. package/dist/commands/liberica/materials/create.js.map +1 -1
  16. package/dist/commands/liberica/materials/list.d.ts.map +1 -1
  17. package/dist/commands/liberica/materials/list.js +46 -14
  18. package/dist/commands/liberica/materials/list.js.map +1 -1
  19. package/dist/commands/liberica/materials/update.d.ts.map +1 -1
  20. package/dist/commands/liberica/materials/update.js +129 -1
  21. package/dist/commands/liberica/materials/update.js.map +1 -1
  22. package/dist/commands/liberica/supplier-price/create.d.ts.map +1 -1
  23. package/dist/commands/liberica/supplier-price/create.js +11 -1
  24. package/dist/commands/liberica/supplier-price/create.js.map +1 -1
  25. package/dist/commands/liberica/supplier-price/update.d.ts.map +1 -1
  26. package/dist/commands/liberica/supplier-price/update.js +28 -2
  27. package/dist/commands/liberica/supplier-price/update.js.map +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/types/client-price.d.ts +2 -0
  30. package/dist/types/client-price.d.ts.map +1 -1
  31. package/dist/types/index.d.ts +1 -1
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/material.d.ts +135 -2
  34. package/dist/types/material.d.ts.map +1 -1
  35. package/dist/types/supplier-price.d.ts +3 -1
  36. package/dist/types/supplier-price.d.ts.map +1 -1
  37. package/package.json +63 -63
  38. package/dist/commands/arabica/enterprise/get.d.ts +0 -3
  39. package/dist/commands/arabica/enterprise/get.d.ts.map +0 -1
  40. package/dist/commands/arabica/enterprise/get.js +0 -94
  41. package/dist/commands/arabica/enterprise/get.js.map +0 -1
  42. package/dist/commands/arabica/enterprise/index.d.ts +0 -3
  43. package/dist/commands/arabica/enterprise/index.d.ts.map +0 -1
  44. package/dist/commands/arabica/enterprise/index.js +0 -18
  45. package/dist/commands/arabica/enterprise/index.js.map +0 -1
  46. package/dist/commands/arabica/enterprise/list.d.ts +0 -3
  47. package/dist/commands/arabica/enterprise/list.d.ts.map +0 -1
  48. package/dist/commands/arabica/enterprise/list.js +0 -71
  49. package/dist/commands/arabica/enterprise/list.js.map +0 -1
package/README.md CHANGED
@@ -1,340 +1,341 @@
1
- # ☕ Barista CLI
2
-
3
- > **Let AI assistants control production management systems** — Bridge AI tools (Claude Code, OpenCode, OpenClaw) to enterprise SaaS
4
-
5
- [![npm version](https://img.shields.io/npm/v/@newpeak/barista-cli.svg?style=flat-square)](https://www.npmjs.com/package/@newpeak/barista-cli)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](LICENSE)
7
- [![Weekly Downloads](https://img.shields.io/npm/dw/@newpeak/barista-cli?style=flat-square)](https://www.npmjs.com/package/@newpeak/barista-cli)
8
- [![Node.js](https://img.shields.io/badge/Node.js-18%2B-brightgreen?style=flat-square)](https://nodejs.org/)
9
-
10
- ---
11
-
12
- ## ⚡ Quick Start
13
-
14
- ### 1. Install
15
-
16
- ```bash
17
- npm install -g @newpeak/barista-cli
18
- ```
19
-
20
- ### 2. Authenticate
21
-
22
- ```bash
23
- # AI needs credentials to operate on behalf of user
24
- barista liberica auth login prod-cn your-tenant your-username your-password
25
-
26
- # Interactive login (prompts for missing info)
27
- barista liberica auth login
28
- ```
29
-
30
- ### 3. AI Integration
31
-
32
- ```typescript
33
- // In Claude Code / OpenCode / OpenClaw:
34
- const orders = await $`barista liberica orders list --env prod-cn --tenant your-tenant --json`
35
- const { success, data } = JSON.parse(orders.stdout)
36
-
37
- // AI parses and acts on the data
38
- if (data.items.length > 0) {
39
- console.log(`Found ${data.pagination.total} orders`)
40
- }
41
- ```
42
-
43
- **[View AI Integration Examples →](#ai-integration)**
44
-
45
- ---
46
-
47
- ## 🤖 AI Integration
48
-
49
- Barista CLI is designed for AI coding assistants. Every output is structured, every error is actionable.
50
-
51
- ### Supported AI Tools
52
-
53
- | AI Tool | Integration Method | Status |
54
- |---------|-------------------|--------|
55
- | **Claude Code** | `$` backticks + `--json` | ✅ Verified |
56
- | **OpenCode** | Shell command + JSON parse | ✅ Verified |
57
- | **OpenClaw** | Shell command + JSON parse | ✅ Verified |
58
- | **Cursor** | Terminal integration | ✅ Compatible |
59
- | **Continue** | CLI subprocess | ✅ Compatible |
60
-
61
- ### Integration Pattern
62
-
63
- ```typescript
64
- // 1. Execute command with JSON output
65
- const result = await $`barista liberica orders list \
66
- --env prod-cn \
67
- --tenant your-tenant \
68
- --status pending \
69
- --json \
70
- --page 1 \
71
- --size 50`
72
-
73
- // 2. Parse structured response
74
- const { success, data, meta } = JSON.parse(result.stdout)
75
-
76
- if (!success) {
77
- throw new Error(`API Error: ${meta.code || meta.error?.code} - ${meta.message || meta.error?.message}`)
78
- }
79
-
80
- // 3. Work with data
81
- const pendingOrders = data.items
82
- console.log(`Found ${data.pagination.total} pending orders`)
83
-
84
- // 4. Execute operations safely
85
- for (const order of pendingOrders) {
86
- // Always dry-run first (AI safety)
87
- const preview = await $`barista liberica orders cancel ${order.id} --dry-run`
88
-
89
- // Parse preview, verify, then execute with --force
90
- // ...
91
- }
92
- ```
93
-
94
- ### Response Envelope
95
-
96
- All JSON responses follow this structure:
97
-
98
- ```json
99
- {
100
- "success": true,
101
- "data": {
102
- "items": [...],
103
- "pagination": { "page": 1, "size": 20, "total": 150 }
104
- },
105
- "meta": {
106
- "requestId": "req-abc123",
107
- "timestamp": "2024-01-15T10:30:00Z",
108
- "environment": "prod-cn",
109
- "tenant": "your-tenant"
110
- }
111
- }
112
- ```
113
-
114
- **Error format:**
115
-
116
- ```json
117
- {
118
- "success": false,
119
- "error": {
120
- "code": "A150001",
121
- "message": "Order not found"
122
- },
123
- "meta": {
124
- "requestId": "req-xyz789",
125
- "timestamp": "2024-01-15T10:30:00Z"
126
- }
127
- }
128
- ```
129
-
130
- ### Skills for Claude Code
131
-
132
- Install reusable skill files:
133
-
134
- ```bash
135
- # Skills are located at ~/.barista/claude/skills/
136
- barista skills install
137
- ```
138
-
139
- **Available skills:**
140
- - `orders.md` — Order management workflow
141
- - `products.md` — Product search and sync
142
- - `warehouses.md` — Inventory operations
143
- - `subscriptions.md` — Arabica subscription management
144
-
145
- ---
146
-
147
- ## 🚀 Features
148
-
149
- ### AI-First Design
150
-
151
- | Feature | Description |
152
- |---------|-------------|
153
- | 🤖 **JSON-First Output** | All commands support `--json` for AI parsing |
154
- | 📦 **Structured Responses** | Consistent `{success, data, meta}` envelope |
155
- | 🔄 **Idempotent Operations** | Safe for AI retry loops |
156
- | 🛡️ **Dry-Run by Default** | Destructive operations preview before execution |
157
- | 🔐 **Secure Storage** | Credentials in system keychain, not env vars |
158
-
159
- ### Enterprise Connectivity
160
-
161
- | Service | Capabilities |
162
- |---------|-------------|
163
- | ☕ **Liberica** | Orders, products, inventory, warehouses, production planning |
164
- | 🛒 **Arabica** | Subscription plans, billing, invoices, enterprise management |
165
- | 🔗 **Cross-Service** | Quote from order, sync between systems |
166
-
167
- ### Operational Safety
168
-
169
- - 📊 **Audit Trail** — Every operation logged with request ID
170
- - ⚠️ **Confirmation Guards** — `--dry-run` / `--force` for write operations
171
- - 🏢 **Multi-Tenant Isolation** — Credentials isolated per tenant
172
-
173
- ---
174
-
175
- ## 🔧 Command Reference
176
-
177
- ### Core Pattern
178
-
179
- ```
180
- barista <service> <resource> <action> [options]
181
- ```
182
-
183
- ### Global Options
184
-
185
- | Option | Description | Default |
186
- |--------|-------------|---------|
187
- | `--env` | Environment (dev\|test\|prod-cn\|prod-jp) | `dev` |
188
- | `--tenant` | Tenant name | - |
189
- | `--json` | JSON output | `false` |
190
- | `--dry-run` | Preview mode (recommended for AI) | `false` |
191
- | `--force` | Skip confirmation | `false` |
192
- | `--page` | Page number | `1` |
193
- | `--size` | Page size (max items) | `20` |
194
-
195
- ### Quick Reference
196
-
197
- | Command | Description |
198
- |---------|-------------|
199
- | `barista context show` | Show current env/tenant context |
200
- | `barista context use-env <env>` | Switch environment |
201
- | `barista liberica orders list --json` | List orders (AI format) |
202
- | `barista liberica orders get <id> --json` | Get order detail |
203
- | `barista liberica orders create --dry-run ...` | Preview create |
204
- | `barista liberica products search --keyword <kw> --json` | Search products |
205
- | `barista arabica plans list --json` | List subscription plans |
206
- | `barista arabica invoices list --json` | List invoices |
207
-
208
- **[→ Full Command Reference](./docs/commands/REFERENCE.md)**
209
-
210
- ---
211
-
212
- ## 🛡️ AI Safety Guidelines
213
-
214
- ### 1. Always Dry-Run First
215
-
216
- ```typescript
217
- // ❌ Wrong - executing blindly
218
- await $`barista liberica orders cancel 12345`
219
-
220
- // ✅ Correct - preview first
221
- const preview = await $`barista liberica orders cancel 12345 --dry-run`
222
- // Parse preview, verify correctness, then:
223
- await $`barista liberica orders cancel 12345 --force`
224
- ```
225
-
226
- ### 2. Check Success Before Proceeding
227
-
228
- ```typescript
229
- const result = JSON.parse(stdout)
230
- if (!result.success) {
231
- // Handle error, don't continue
232
- throw new Error(result.error?.message || result.meta?.message)
233
- }
234
- ```
235
-
236
- ### 3. Use Request IDs for Debugging
237
-
238
- ```typescript
239
- const { meta } = JSON.parse(stdout)
240
- console.log(`Request ID: ${meta.requestId}`)
241
- ```
242
-
243
- ### 4. Respect Rate Limits
244
-
245
- - Add delays between bulk operations
246
- - Use `--size 100` for bulk fetches
247
- - Cache responses when appropriate
248
-
249
- ---
250
-
251
- ## ⚙️ Configuration
252
-
253
- ### File Location
254
-
255
- `~/.barista/config.yaml`
256
-
257
- ### Quick Config
258
-
259
- ```yaml
260
- defaults:
261
- env: prod-cn
262
- tenant: your-tenant
263
- service: liberica
264
-
265
- environments:
266
- prod-cn:
267
- liberica:
268
- baseUrl: "https://{tenant}.newpeaksh.com"
269
- timeout: 60000
270
- arabica:
271
- baseUrl: "https://www.newpeaksh.com"
272
- timeout: 60000
273
- ```
274
-
275
- ### Authentication
276
-
277
- ```bash
278
- # Credential login (recommended)
279
- barista liberica auth login <env> <tenant> <username> <password>
280
-
281
- # Check auth status
282
- barista auth status
283
-
284
- # Logout
285
- barista auth logout --service liberica --env prod-cn
286
- ```
287
-
288
- ---
289
-
290
- ## ❓ Troubleshooting
291
-
292
- ### Auth Failures
293
-
294
- ```bash
295
- # Check current status
296
- barista auth status
297
-
298
- # Re-authenticate
299
- barista liberica auth login prod-cn your-tenant your-username your-password
300
-
301
- # Check context
302
- barista context show
303
- ```
304
-
305
- ### API Errors
306
-
307
- ```bash
308
- # Always use --json to get error codes
309
- barista liberica orders list --json
310
-
311
- # Error response includes requestId for debugging
312
- # "requestId": "req-abc123"
313
- ```
314
-
315
- ### Timeout Issues
316
-
317
- ```bash
318
- # Switch to closer environment
319
- barista context use-env dev
320
-
321
- # Or adjust timeout in config.yaml
322
- ```
323
-
324
- ---
325
-
326
- ## 📚 Related Projects
327
-
328
- | Project | Description |
329
- |---------|-------------|
330
- | ☕ Liberica Backend | Production management SaaS backend |
331
- | 🖥️ Liberica Frontend | Production management web UI |
332
- | 📱 Liberica Mobile | Production management mobile app |
333
- | 🛒 Arabica Backend | Online subscription SaaS backend |
334
- | 🌐 Arabica Frontend | Online subscription web UI |
335
-
336
- ---
337
-
338
- ## 📄 License
339
-
340
- [MIT](LICENSE) © Newpeak Technology
1
+ # ☕ Barista CLI
2
+
3
+ > **Let AI assistants control production management systems** — Bridge AI tools (Claude Code, OpenCode, OpenClaw) to enterprise SaaS
4
+
5
+ [![AI-Native](https://img.shields.io/badge/AI--Native-CLI-blue?style=flat-square)](https://gitlab.newpeaksh.com/coffee/coffee-barista-cli)
6
+ [![npm version](https://img.shields.io/npm/v/@newpeak/barista-cli.svg?style=flat-square)](https://www.npmjs.com/package/@newpeak/barista-cli)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](LICENSE)
8
+ [![Weekly Downloads](https://img.shields.io/npm/dw/@newpeak/barista-cli?style=flat-square)](https://www.npmjs.com/package/@newpeak/barista-cli)
9
+ [![Node.js](https://img.shields.io/badge/Node.js-18%2B-brightgreen?style=flat-square)](https://nodejs.org/)
10
+
11
+ ---
12
+
13
+ ## ⚡ Quick Start
14
+
15
+ ### 1. Install
16
+
17
+ ```bash
18
+ npm install -g @newpeak/barista-cli
19
+ ```
20
+
21
+ ### 2. Authenticate
22
+
23
+ ```bash
24
+ # AI needs credentials to operate on behalf of user
25
+ barista liberica auth login prod-cn your-tenant your-username your-password
26
+
27
+ # Interactive login (prompts for missing info)
28
+ barista liberica auth login
29
+ ```
30
+
31
+ ### 3. AI Integration
32
+
33
+ ```typescript
34
+ // In Claude Code / OpenCode / OpenClaw:
35
+ const orders = await $`barista liberica orders list --env prod-cn --tenant your-tenant --json`
36
+ const { success, data } = JSON.parse(orders.stdout)
37
+
38
+ // AI parses and acts on the data
39
+ if (data.items.length > 0) {
40
+ console.log(`Found ${data.pagination.total} orders`)
41
+ }
42
+ ```
43
+
44
+ **[View AI Integration Examples →](#ai-integration)**
45
+
46
+ ---
47
+
48
+ ## 🤖 AI Integration
49
+
50
+ Barista CLI is designed for AI coding assistants. Every output is structured, every error is actionable.
51
+
52
+ ### Supported AI Tools
53
+
54
+ | AI Tool | Integration Method | Status |
55
+ |---------|-------------------|--------|
56
+ | **Claude Code** | `$` backticks + `--json` | ✅ Verified |
57
+ | **OpenCode** | Shell command + JSON parse | ✅ Verified |
58
+ | **OpenClaw** | Shell command + JSON parse | ✅ Verified |
59
+ | **Cursor** | Terminal integration | ✅ Compatible |
60
+ | **Continue** | CLI subprocess | ✅ Compatible |
61
+
62
+ ### Integration Pattern
63
+
64
+ ```typescript
65
+ // 1. Execute command with JSON output
66
+ const result = await $`barista liberica orders list \
67
+ --env prod-cn \
68
+ --tenant your-tenant \
69
+ --status pending \
70
+ --json \
71
+ --page 1 \
72
+ --size 50`
73
+
74
+ // 2. Parse structured response
75
+ const { success, data, meta } = JSON.parse(result.stdout)
76
+
77
+ if (!success) {
78
+ throw new Error(`API Error: ${meta.code || meta.error?.code} - ${meta.message || meta.error?.message}`)
79
+ }
80
+
81
+ // 3. Work with data
82
+ const pendingOrders = data.items
83
+ console.log(`Found ${data.pagination.total} pending orders`)
84
+
85
+ // 4. Execute operations safely
86
+ for (const order of pendingOrders) {
87
+ // Always dry-run first (AI safety)
88
+ const preview = await $`barista liberica orders cancel ${order.id} --dry-run`
89
+
90
+ // Parse preview, verify, then execute with --force
91
+ // ...
92
+ }
93
+ ```
94
+
95
+ ### Response Envelope
96
+
97
+ All JSON responses follow this structure:
98
+
99
+ ```json
100
+ {
101
+ "success": true,
102
+ "data": {
103
+ "items": [...],
104
+ "pagination": { "page": 1, "size": 20, "total": 150 }
105
+ },
106
+ "meta": {
107
+ "requestId": "req-abc123",
108
+ "timestamp": "2024-01-15T10:30:00Z",
109
+ "environment": "prod-cn",
110
+ "tenant": "your-tenant"
111
+ }
112
+ }
113
+ ```
114
+
115
+ **Error format:**
116
+
117
+ ```json
118
+ {
119
+ "success": false,
120
+ "error": {
121
+ "code": "A150001",
122
+ "message": "Order not found"
123
+ },
124
+ "meta": {
125
+ "requestId": "req-xyz789",
126
+ "timestamp": "2024-01-15T10:30:00Z"
127
+ }
128
+ }
129
+ ```
130
+
131
+ ### Skills for Claude Code
132
+
133
+ Install reusable skill files:
134
+
135
+ ```bash
136
+ # Skills are located at ~/.barista/claude/skills/
137
+ barista skills install
138
+ ```
139
+
140
+ **Available skills:**
141
+ - `orders.md` — Order management workflow
142
+ - `products.md` — Product search and sync
143
+ - `warehouses.md` — Inventory operations
144
+ - `subscriptions.md` — Arabica subscription management
145
+
146
+ ---
147
+
148
+ ## 🚀 Features
149
+
150
+ ### AI-First Design
151
+
152
+ | Feature | Description |
153
+ |---------|-------------|
154
+ | 🤖 **JSON-First Output** | All commands support `--json` for AI parsing |
155
+ | 📦 **Structured Responses** | Consistent `{success, data, meta}` envelope |
156
+ | 🔄 **Idempotent Operations** | Safe for AI retry loops |
157
+ | 🛡️ **Dry-Run by Default** | Destructive operations preview before execution |
158
+ | 🔐 **Secure Storage** | Credentials in system keychain, not env vars |
159
+
160
+ ### Enterprise Connectivity
161
+
162
+ | Service | Capabilities |
163
+ |---------|-------------|
164
+ | **Liberica** | Orders, products, inventory, warehouses, production planning |
165
+ | 🛒 **Arabica** | Subscription plans, billing, invoices, enterprise management |
166
+ | 🔗 **Cross-Service** | Quote from order, sync between systems |
167
+
168
+ ### Operational Safety
169
+
170
+ - 📊 **Audit Trail** — Every operation logged with request ID
171
+ - ⚠️ **Confirmation Guards** — `--dry-run` / `--force` for write operations
172
+ - 🏢 **Multi-Tenant Isolation** — Credentials isolated per tenant
173
+
174
+ ---
175
+
176
+ ## 🔧 Command Reference
177
+
178
+ ### Core Pattern
179
+
180
+ ```
181
+ barista <service> <resource> <action> [options]
182
+ ```
183
+
184
+ ### Global Options
185
+
186
+ | Option | Description | Default |
187
+ |--------|-------------|---------|
188
+ | `--env` | Environment (dev\|test\|prod-cn\|prod-jp) | `dev` |
189
+ | `--tenant` | Tenant name | - |
190
+ | `--json` | JSON output | `false` |
191
+ | `--dry-run` | Preview mode (recommended for AI) | `false` |
192
+ | `--force` | Skip confirmation | `false` |
193
+ | `--page` | Page number | `1` |
194
+ | `--size` | Page size (max items) | `20` |
195
+
196
+ ### Quick Reference
197
+
198
+ | Command | Description |
199
+ |---------|-------------|
200
+ | `barista context show` | Show current env/tenant context |
201
+ | `barista context use-env <env>` | Switch environment |
202
+ | `barista liberica orders list --json` | List orders (AI format) |
203
+ | `barista liberica orders get <id> --json` | Get order detail |
204
+ | `barista liberica orders create --dry-run ...` | Preview create |
205
+ | `barista liberica products search --keyword <kw> --json` | Search products |
206
+ | `barista arabica plans list --json` | List subscription plans |
207
+ | `barista arabica invoices list --json` | List invoices |
208
+
209
+ **[→ Full Command Reference](./docs/commands/REFERENCE.md)**
210
+
211
+ ---
212
+
213
+ ## 🛡️ AI Safety Guidelines
214
+
215
+ ### 1. Always Dry-Run First
216
+
217
+ ```typescript
218
+ // Wrong - executing blindly
219
+ await $`barista liberica orders cancel 12345`
220
+
221
+ // Correct - preview first
222
+ const preview = await $`barista liberica orders cancel 12345 --dry-run`
223
+ // Parse preview, verify correctness, then:
224
+ await $`barista liberica orders cancel 12345 --force`
225
+ ```
226
+
227
+ ### 2. Check Success Before Proceeding
228
+
229
+ ```typescript
230
+ const result = JSON.parse(stdout)
231
+ if (!result.success) {
232
+ // Handle error, don't continue
233
+ throw new Error(result.error?.message || result.meta?.message)
234
+ }
235
+ ```
236
+
237
+ ### 3. Use Request IDs for Debugging
238
+
239
+ ```typescript
240
+ const { meta } = JSON.parse(stdout)
241
+ console.log(`Request ID: ${meta.requestId}`)
242
+ ```
243
+
244
+ ### 4. Respect Rate Limits
245
+
246
+ - Add delays between bulk operations
247
+ - Use `--size 100` for bulk fetches
248
+ - Cache responses when appropriate
249
+
250
+ ---
251
+
252
+ ## ⚙️ Configuration
253
+
254
+ ### File Location
255
+
256
+ `~/.barista/config.yaml`
257
+
258
+ ### Quick Config
259
+
260
+ ```yaml
261
+ defaults:
262
+ env: prod-cn
263
+ tenant: your-tenant
264
+ service: liberica
265
+
266
+ environments:
267
+ prod-cn:
268
+ liberica:
269
+ baseUrl: "https://{tenant}.newpeaksh.com"
270
+ timeout: 60000
271
+ arabica:
272
+ baseUrl: "https://www.newpeaksh.com"
273
+ timeout: 60000
274
+ ```
275
+
276
+ ### Authentication
277
+
278
+ ```bash
279
+ # Credential login (recommended)
280
+ barista liberica auth login <env> <tenant> <username> <password>
281
+
282
+ # Check auth status
283
+ barista auth status
284
+
285
+ # Logout
286
+ barista auth logout --service liberica --env prod-cn
287
+ ```
288
+
289
+ ---
290
+
291
+ ## ❓ Troubleshooting
292
+
293
+ ### Auth Failures
294
+
295
+ ```bash
296
+ # Check current status
297
+ barista auth status
298
+
299
+ # Re-authenticate
300
+ barista liberica auth login prod-cn your-tenant your-username your-password
301
+
302
+ # Check context
303
+ barista context show
304
+ ```
305
+
306
+ ### API Errors
307
+
308
+ ```bash
309
+ # Always use --json to get error codes
310
+ barista liberica orders list --json
311
+
312
+ # Error response includes requestId for debugging
313
+ # "requestId": "req-abc123"
314
+ ```
315
+
316
+ ### Timeout Issues
317
+
318
+ ```bash
319
+ # Switch to closer environment
320
+ barista context use-env dev
321
+
322
+ # Or adjust timeout in config.yaml
323
+ ```
324
+
325
+ ---
326
+
327
+ ## 📚 Related Projects
328
+
329
+ | Project | Description |
330
+ |---------|-------------|
331
+ | Liberica Backend | Production management SaaS backend |
332
+ | 🖥️ Liberica Frontend | Production management web UI |
333
+ | 📱 Liberica Mobile | Production management mobile app |
334
+ | 🛒 Arabica Backend | Online subscription SaaS backend |
335
+ | 🌐 Arabica Frontend | Online subscription web UI |
336
+
337
+ ---
338
+
339
+ ## 📄 License
340
+
341
+ [MIT](LICENSE) © Newpeak Technology