@ktmcp-cli/billingo 1.0.0 → 1.0.1
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/AGENT.md +101 -371
- package/README.md +100 -279
- package/bin/billingo.js +2 -67
- package/package.json +14 -10
- package/src/api.js +199 -0
- package/src/config.js +34 -0
- package/src/index.js +808 -0
- package/.env.example +0 -8
- package/CLI_SUMMARY.md +0 -377
- package/INDEX.md +0 -364
- package/INSTALL.sh +0 -62
- package/OPENCLAW.md +0 -503
- package/PROJECT_REPORT.md +0 -462
- package/QUICKSTART.md +0 -212
- package/STRUCTURE.txt +0 -266
- package/TESTING.md +0 -513
- package/banner.png +0 -0
- package/examples/bank-account.json +0 -8
- package/examples/invoice.json +0 -32
- package/examples/partner.json +0 -20
- package/examples/product.json +0 -10
- package/logo.png +0 -0
- package/src/commands/bank-accounts.js +0 -131
- package/src/commands/config.js +0 -73
- package/src/commands/currencies.js +0 -40
- package/src/commands/document-blocks.js +0 -40
- package/src/commands/documents.js +0 -248
- package/src/commands/organization.js +0 -35
- package/src/commands/partners.js +0 -130
- package/src/commands/products.js +0 -130
- package/src/commands/utilities.js +0 -34
- package/src/lib/api.js +0 -160
- package/src/lib/auth.js +0 -32
- package/src/lib/config.js +0 -87
package/README.md
CHANGED
|
@@ -1,378 +1,199 @@
|
|
|
1
|
-
# Billingo CLI
|
|
1
|
+
# Billingo API CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
> "Six months ago, everyone was talking about MCPs. And I was like, screw MCPs. Every MCP would be better as a CLI."
|
|
4
|
+
>
|
|
5
|
+
> — [Peter Steinberger](https://twitter.com/steipete), Founder of OpenClaw
|
|
6
|
+
> [Watch on YouTube (~2:39:00)](https://www.youtube.com/@lexfridman) | [Lex Fridman Podcast #491](https://lexfridman.com/peter-steinberger/)
|
|
6
7
|
|
|
8
|
+
A production-ready command-line interface for the Billingo API v3. Manage invoices, partners, products, and bank accounts for Hungarian businesses directly from your terminal.
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
> **Disclaimer**: This is an unofficial CLI tool and is not affiliated with, endorsed by, or supported by Billingo.
|
|
9
11
|
|
|
10
12
|
## Features
|
|
11
13
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- Progress indicators for long-running operations
|
|
14
|
+
- **Invoices** — Create, list, send, and manage invoices
|
|
15
|
+
- **Partners** — Manage customers and suppliers
|
|
16
|
+
- **Products** — Maintain product catalog
|
|
17
|
+
- **Bank Accounts** — Manage payment accounts
|
|
18
|
+
- **Organization** — View organization details and supported currencies
|
|
19
|
+
- **JSON output** — All commands support `--json` for scripting
|
|
19
20
|
|
|
20
21
|
## Why CLI > MCP
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
MCP servers are complex, stateful, and require a running server process. A CLI is:
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
4. **Limited Flexibility**: MCP servers often implement a subset of API features, forcing you to extend or work around limitations
|
|
30
|
-
5. **Maintenance Burden**: Every API change requires updating both the MCP server and documentation
|
|
31
|
-
|
|
32
|
-
### The CLI Advantage
|
|
33
|
-
|
|
34
|
-
A well-designed CLI is the superior abstraction for AI agents:
|
|
35
|
-
|
|
36
|
-
1. **Zero Runtime Dependencies**: No server process to start, monitor, or crash
|
|
37
|
-
2. **Direct API Access**: One hop from agent to API with transparent HTTP calls
|
|
38
|
-
3. **Human + AI Usable**: Same tool works perfectly for both developers and agents
|
|
39
|
-
4. **Self-Documenting**: Built-in `--help` text provides complete usage information
|
|
40
|
-
5. **Composable**: Standard I/O allows piping, scripting, and integration with other tools
|
|
41
|
-
6. **Better Errors**: Direct error messages from the API without translation layers
|
|
42
|
-
7. **Instant Debugging**: `--format json` gives you the exact API response for inspection
|
|
43
|
-
|
|
44
|
-
**Example Complexity Comparison:**
|
|
45
|
-
|
|
46
|
-
MCP approach:
|
|
47
|
-
```
|
|
48
|
-
AI Agent → MCP Tool Schema → MCP Server → HTTP Request → API → Response Chain (reverse)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
CLI approach:
|
|
52
|
-
```
|
|
53
|
-
AI Agent → Shell Command → HTTP Request → API → Direct Response
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The CLI is simpler, faster, more reliable, and easier to debug.
|
|
25
|
+
- **Simpler** — Just a binary you call directly
|
|
26
|
+
- **Composable** — Pipe output to `jq`, `grep`, `awk`, and other tools
|
|
27
|
+
- **Scriptable** — Use in shell scripts, CI/CD pipelines, cron jobs
|
|
28
|
+
- **Debuggable** — See exactly what's happening with `--json` flag
|
|
29
|
+
- **AI-friendly** — AI agents can call CLIs just as easily as MCPs, with less overhead
|
|
57
30
|
|
|
58
31
|
## Installation
|
|
59
32
|
|
|
60
33
|
```bash
|
|
61
|
-
npm install -g @ktmcp-cli/
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Or install locally:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
cd billingo
|
|
68
|
-
npm install
|
|
69
|
-
npm link
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Configuration
|
|
73
|
-
|
|
74
|
-
### Set API Key
|
|
75
|
-
|
|
76
|
-
Get your API key from https://app.billingo.hu/api-key
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
billingo config set apiKey YOUR_API_KEY_HERE
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Environment Variables
|
|
83
|
-
|
|
84
|
-
Alternatively, use environment variables:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
export BILLINGO_API_KEY=your_api_key_here
|
|
88
|
-
export BILLINGO_BASE_URL=https://api.billingo.hu/v3 # Optional
|
|
34
|
+
npm install -g @ktmcp-cli/billingohu
|
|
89
35
|
```
|
|
90
36
|
|
|
91
|
-
|
|
37
|
+
## Authentication Setup
|
|
92
38
|
|
|
93
|
-
|
|
94
|
-
# Show all config
|
|
95
|
-
billingo config list
|
|
96
|
-
|
|
97
|
-
# Get specific value
|
|
98
|
-
billingo config get apiKey
|
|
99
|
-
|
|
100
|
-
# Clear all config
|
|
101
|
-
billingo config clear
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Usage
|
|
105
|
-
|
|
106
|
-
### General Syntax
|
|
39
|
+
Configure your Billingo API key:
|
|
107
40
|
|
|
108
41
|
```bash
|
|
109
|
-
|
|
42
|
+
billingohu config set --api-key YOUR_API_KEY
|
|
110
43
|
```
|
|
111
44
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- `bank-accounts` (alias: `banks`) - Manage bank accounts
|
|
115
|
-
- `documents` (alias: `docs`) - Manage invoices and documents
|
|
116
|
-
- `document-blocks` (alias: `blocks`) - Manage invoice pads
|
|
117
|
-
- `partners` - Manage customers and suppliers
|
|
118
|
-
- `products` - Manage product catalog
|
|
119
|
-
- `currencies` (alias: `currency`) - Currency conversion
|
|
120
|
-
- `organization` (alias: `org`) - Organization information
|
|
121
|
-
- `utils` - Utility functions
|
|
122
|
-
|
|
123
|
-
### Global Options
|
|
124
|
-
|
|
125
|
-
- `-f, --format <format>` - Output format: `json` or `pretty` (default: pretty)
|
|
126
|
-
- `-h, --help` - Display help for command
|
|
127
|
-
- `-v, --version` - Output version number
|
|
45
|
+
Get your API key from [app.billingo.hu/api](https://app.billingo.hu/api)
|
|
128
46
|
|
|
129
|
-
##
|
|
47
|
+
## Commands
|
|
130
48
|
|
|
131
|
-
###
|
|
49
|
+
### Configuration
|
|
132
50
|
|
|
133
51
|
```bash
|
|
134
|
-
#
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
# Get specific account
|
|
138
|
-
billingo bank-accounts get 123
|
|
139
|
-
|
|
140
|
-
# Create from JSON file
|
|
141
|
-
billingo bank-accounts create --file account.json
|
|
142
|
-
|
|
143
|
-
# Create from inline JSON
|
|
144
|
-
billingo bank-accounts create --data '{"name":"Main Account","account_number":"12345678"}'
|
|
52
|
+
# Set API key
|
|
53
|
+
billingohu config set --api-key <key>
|
|
145
54
|
|
|
146
|
-
#
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
# Delete account
|
|
150
|
-
billingo bank-accounts delete 123
|
|
55
|
+
# Show current config
|
|
56
|
+
billingohu config show
|
|
151
57
|
```
|
|
152
58
|
|
|
153
|
-
###
|
|
59
|
+
### Invoices
|
|
154
60
|
|
|
155
61
|
```bash
|
|
156
|
-
# List
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
# Filter documents
|
|
160
|
-
billingo documents list \
|
|
161
|
-
--partner-id 456 \
|
|
162
|
-
--payment-status paid \
|
|
163
|
-
--start-date 2024-01-01 \
|
|
164
|
-
--end-date 2024-12-31
|
|
165
|
-
|
|
166
|
-
# Get specific document
|
|
167
|
-
billingo documents get 789
|
|
168
|
-
|
|
169
|
-
# Create document
|
|
170
|
-
billingo documents create --file invoice.json
|
|
62
|
+
# List invoices
|
|
63
|
+
billingohu invoices list
|
|
64
|
+
billingohu invoices list --type invoice --payment-method transfer
|
|
171
65
|
|
|
172
|
-
#
|
|
173
|
-
|
|
66
|
+
# Get invoice details
|
|
67
|
+
billingohu invoices get <invoice-id>
|
|
174
68
|
|
|
175
|
-
#
|
|
176
|
-
|
|
69
|
+
# Create invoice
|
|
70
|
+
billingohu invoices create --data '{...}'
|
|
177
71
|
|
|
178
|
-
# Send via email
|
|
179
|
-
|
|
72
|
+
# Send invoice via email
|
|
73
|
+
billingohu invoices send <invoice-id> --emails "client@example.com"
|
|
180
74
|
|
|
181
|
-
#
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
# Get payment history
|
|
185
|
-
billingo documents payments 789
|
|
186
|
-
|
|
187
|
-
# Update payment history
|
|
188
|
-
billingo documents update-payments 789 --file payments.json
|
|
189
|
-
|
|
190
|
-
# Check Online Számla status
|
|
191
|
-
billingo documents online-szamla 789
|
|
75
|
+
# Delete invoice
|
|
76
|
+
billingohu invoices delete <invoice-id>
|
|
192
77
|
```
|
|
193
78
|
|
|
194
|
-
### Partners
|
|
79
|
+
### Partners (Customers/Suppliers)
|
|
195
80
|
|
|
196
81
|
```bash
|
|
197
82
|
# List partners
|
|
198
|
-
|
|
83
|
+
billingohu partners list
|
|
199
84
|
|
|
200
|
-
# Get partner
|
|
201
|
-
|
|
85
|
+
# Get partner details
|
|
86
|
+
billingohu partners get <partner-id>
|
|
202
87
|
|
|
203
88
|
# Create partner
|
|
204
|
-
|
|
89
|
+
billingohu partners create --data '{"name":"Acme Corp","email":"contact@acme.com"}'
|
|
205
90
|
|
|
206
91
|
# Update partner
|
|
207
|
-
|
|
92
|
+
billingohu partners update <partner-id> --data '{...}'
|
|
208
93
|
|
|
209
94
|
# Delete partner
|
|
210
|
-
|
|
95
|
+
billingohu partners delete <partner-id>
|
|
211
96
|
```
|
|
212
97
|
|
|
213
98
|
### Products
|
|
214
99
|
|
|
215
100
|
```bash
|
|
216
101
|
# List products
|
|
217
|
-
|
|
102
|
+
billingohu products list
|
|
218
103
|
|
|
219
|
-
# Get product
|
|
220
|
-
|
|
104
|
+
# Get product details
|
|
105
|
+
billingohu products get <product-id>
|
|
221
106
|
|
|
222
107
|
# Create product
|
|
223
|
-
|
|
108
|
+
billingohu products create --data '{"name":"Service","net_unit_price":10000,"currency":"HUF"}'
|
|
224
109
|
|
|
225
110
|
# Update product
|
|
226
|
-
|
|
111
|
+
billingohu products update <product-id> --data '{...}'
|
|
227
112
|
|
|
228
113
|
# Delete product
|
|
229
|
-
|
|
114
|
+
billingohu products delete <product-id>
|
|
230
115
|
```
|
|
231
116
|
|
|
232
|
-
###
|
|
117
|
+
### Bank Accounts
|
|
233
118
|
|
|
234
119
|
```bash
|
|
235
|
-
#
|
|
236
|
-
|
|
120
|
+
# List bank accounts
|
|
121
|
+
billingohu bank-accounts list
|
|
122
|
+
|
|
123
|
+
# Get account details
|
|
124
|
+
billingohu bank-accounts get <account-id>
|
|
237
125
|
|
|
238
|
-
#
|
|
239
|
-
|
|
126
|
+
# Create bank account
|
|
127
|
+
billingohu bank-accounts create --data '{...}'
|
|
240
128
|
```
|
|
241
129
|
|
|
242
130
|
### Organization
|
|
243
131
|
|
|
244
132
|
```bash
|
|
245
|
-
#
|
|
246
|
-
|
|
133
|
+
# Show organization details
|
|
134
|
+
billingohu organization show
|
|
247
135
|
|
|
248
|
-
#
|
|
249
|
-
|
|
136
|
+
# List supported currencies
|
|
137
|
+
billingohu organization currencies
|
|
250
138
|
```
|
|
251
139
|
|
|
252
|
-
|
|
140
|
+
## JSON Output
|
|
141
|
+
|
|
142
|
+
All commands support `--json` for machine-readable output:
|
|
253
143
|
|
|
254
144
|
```bash
|
|
255
|
-
#
|
|
256
|
-
|
|
257
|
-
```
|
|
145
|
+
# List invoices as JSON
|
|
146
|
+
billingohu invoices list --json
|
|
258
147
|
|
|
259
|
-
|
|
148
|
+
# Pipe to jq for filtering
|
|
149
|
+
billingohu invoices list --json | jq '.[] | select(.payment_status == "paid")'
|
|
260
150
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
billingo document-blocks list
|
|
151
|
+
# Get partner details
|
|
152
|
+
billingohu partners get <id> --json
|
|
264
153
|
```
|
|
265
154
|
|
|
266
|
-
##
|
|
267
|
-
|
|
268
|
-
### Creating a Document (Invoice)
|
|
155
|
+
## Examples
|
|
269
156
|
|
|
270
|
-
|
|
157
|
+
### Create invoice workflow
|
|
271
158
|
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
"
|
|
276
|
-
|
|
159
|
+
```bash
|
|
160
|
+
# First, create a partner
|
|
161
|
+
PARTNER_ID=$(billingohu partners create \
|
|
162
|
+
--data '{"name":"Acme Corp","email":"billing@acme.com","city":"Budapest"}' \
|
|
163
|
+
--json | jq -r '.id')
|
|
164
|
+
|
|
165
|
+
# Create invoice
|
|
166
|
+
billingohu invoices create --data '{
|
|
167
|
+
"partner_id": '$PARTNER_ID',
|
|
277
168
|
"type": "invoice",
|
|
278
|
-
"fulfillment_date": "2024-01-15",
|
|
279
|
-
"due_date": "2024-01-30",
|
|
280
|
-
"payment_method": "transfer",
|
|
281
|
-
"language": "hu",
|
|
282
169
|
"currency": "HUF",
|
|
283
170
|
"items": [
|
|
284
171
|
{
|
|
285
|
-
"name": "
|
|
286
|
-
"
|
|
287
|
-
"quantity":
|
|
288
|
-
"unit": "hour",
|
|
289
|
-
"vat": "27%"
|
|
172
|
+
"name": "Consulting Services",
|
|
173
|
+
"net_unit_price": 100000,
|
|
174
|
+
"quantity": 1
|
|
290
175
|
}
|
|
291
176
|
]
|
|
292
|
-
}
|
|
293
|
-
```
|
|
177
|
+
}'
|
|
294
178
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
Example `partner.json`:
|
|
298
|
-
|
|
299
|
-
```json
|
|
300
|
-
{
|
|
301
|
-
"name": "Example Company Ltd.",
|
|
302
|
-
"address": {
|
|
303
|
-
"country_code": "HU",
|
|
304
|
-
"post_code": "1234",
|
|
305
|
-
"city": "Budapest",
|
|
306
|
-
"address": "Example Street 42"
|
|
307
|
-
},
|
|
308
|
-
"emails": ["contact@example.com"],
|
|
309
|
-
"taxcode": "12345678-1-23"
|
|
310
|
-
}
|
|
179
|
+
# Send invoice
|
|
180
|
+
billingohu invoices send <invoice-id> --emails "billing@acme.com"
|
|
311
181
|
```
|
|
312
182
|
|
|
313
|
-
###
|
|
314
|
-
|
|
315
|
-
Example `account.json`:
|
|
316
|
-
|
|
317
|
-
```json
|
|
318
|
-
{
|
|
319
|
-
"name": "Main Business Account",
|
|
320
|
-
"account_number": "12345678-12345678",
|
|
321
|
-
"account_number_iban": "HU42123456781234567812345678",
|
|
322
|
-
"swift": "ABCDHUHB",
|
|
323
|
-
"currency": "HUF",
|
|
324
|
-
"need_qr": true
|
|
325
|
-
}
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
## Error Handling
|
|
329
|
-
|
|
330
|
-
The CLI provides clear error messages for common issues:
|
|
331
|
-
|
|
332
|
-
- **401 Unauthorized** - Check your API key
|
|
333
|
-
- **403 Forbidden** - Insufficient permissions
|
|
334
|
-
- **404 Not Found** - Resource doesn't exist
|
|
335
|
-
- **422 Validation Error** - Invalid data format
|
|
336
|
-
- **429 Rate Limit** - Too many requests (shows retry time)
|
|
337
|
-
- **500 Server Error** - Billingo API issue
|
|
338
|
-
|
|
339
|
-
## Rate Limiting
|
|
340
|
-
|
|
341
|
-
The API includes rate limit headers in responses:
|
|
342
|
-
- `X-RateLimit-Limit` - Requests allowed per window
|
|
343
|
-
- `X-RateLimit-Remaining` - Requests remaining
|
|
344
|
-
- `X-RateLimit-Reset` - Reset timestamp
|
|
345
|
-
|
|
346
|
-
The CLI warns you when fewer than 10 requests remain.
|
|
347
|
-
|
|
348
|
-
## Development
|
|
183
|
+
### List unpaid invoices
|
|
349
184
|
|
|
350
185
|
```bash
|
|
351
|
-
|
|
352
|
-
npm install
|
|
353
|
-
|
|
354
|
-
# Run locally
|
|
355
|
-
npm run dev -- documents list
|
|
356
|
-
|
|
357
|
-
# Run directly
|
|
358
|
-
node bin/billingo.js documents list
|
|
186
|
+
billingohu invoices list --json | jq '.[] | select(.payment_status != "paid") | {id, invoice_number, partner_name, total_gross}'
|
|
359
187
|
```
|
|
360
188
|
|
|
361
|
-
##
|
|
362
|
-
|
|
363
|
-
- Official API Docs: https://api.billingo.hu/v3/swagger
|
|
364
|
-
- Support: https://support.billingo.hu/content/446136358
|
|
365
|
-
- Generate API Key: https://app.billingo.hu/api-key
|
|
366
|
-
|
|
367
|
-
## Supported Currencies
|
|
189
|
+
## Contributing
|
|
368
190
|
|
|
369
|
-
|
|
370
|
-
HUF, EUR, USD, GBP, CHF, AUD, CAD, DKK, NOK, SEK, CZK, PLN, RON, BGN, HRK, RSD, and more.
|
|
191
|
+
Issues and pull requests are welcome at [github.com/ktmcp-cli/billingohu](https://github.com/ktmcp-cli/billingohu).
|
|
371
192
|
|
|
372
193
|
## License
|
|
373
194
|
|
|
374
|
-
MIT
|
|
195
|
+
MIT — see [LICENSE](LICENSE) for details.
|
|
375
196
|
|
|
376
|
-
|
|
197
|
+
---
|
|
377
198
|
|
|
378
|
-
|
|
199
|
+
Part of the [KTMCP CLI](https://killthemcp.com) project — replacing MCPs with simple, composable CLIs.
|
package/bin/billingo.js
CHANGED
|
@@ -1,75 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Billingo CLI - Main Entry Point
|
|
5
|
-
*
|
|
6
|
-
* Production-ready CLI for Billingo API v3
|
|
7
|
-
* Hungarian invoicing and billing automation
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { Command } from 'commander';
|
|
11
|
-
import { readFileSync } from 'fs';
|
|
12
3
|
import { fileURLToPath } from 'url';
|
|
13
4
|
import { dirname, join } from 'path';
|
|
14
|
-
import chalk from 'chalk';
|
|
15
|
-
|
|
16
|
-
// Import command modules
|
|
17
|
-
import { registerBankAccountCommands } from '../src/commands/bank-accounts.js';
|
|
18
|
-
import { registerDocumentCommands } from '../src/commands/documents.js';
|
|
19
|
-
import { registerDocumentBlockCommands } from '../src/commands/document-blocks.js';
|
|
20
|
-
import { registerPartnerCommands } from '../src/commands/partners.js';
|
|
21
|
-
import { registerProductCommands } from '../src/commands/products.js';
|
|
22
|
-
import { registerCurrencyCommands } from '../src/commands/currencies.js';
|
|
23
|
-
import { registerOrganizationCommands } from '../src/commands/organization.js';
|
|
24
|
-
import { registerUtilityCommands } from '../src/commands/utilities.js';
|
|
25
|
-
import { registerConfigCommands } from '../src/commands/config.js';
|
|
26
5
|
|
|
27
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
28
7
|
const __dirname = dirname(__filename);
|
|
29
8
|
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
readFileSync(join(__dirname, '../package.json'), 'utf-8')
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const program = new Command();
|
|
36
|
-
|
|
37
|
-
// Configure main program
|
|
38
|
-
program
|
|
39
|
-
.name('billingo')
|
|
40
|
-
.description(chalk.cyan('Billingo API v3 CLI - Hungarian invoicing and billing automation'))
|
|
41
|
-
.version(packageJson.version, '-v, --version', 'output the current version')
|
|
42
|
-
.addHelpText('after', `
|
|
43
|
-
${chalk.bold('Examples:')}
|
|
44
|
-
$ billingo config set API_KEY <your-api-key>
|
|
45
|
-
$ billingo documents list --page 1 --per-page 25
|
|
46
|
-
$ billingo documents create -f invoice.json
|
|
47
|
-
$ billingo partners list
|
|
48
|
-
$ billingo bank-accounts list
|
|
49
|
-
|
|
50
|
-
${chalk.bold('API Documentation:')}
|
|
51
|
-
${chalk.blue('https://api.billingo.hu/v3/swagger')}
|
|
52
|
-
|
|
53
|
-
${chalk.bold('Get API Key:')}
|
|
54
|
-
${chalk.blue('https://app.billingo.hu/api-key')}
|
|
55
|
-
`);
|
|
56
|
-
|
|
57
|
-
// Register all command modules
|
|
58
|
-
registerConfigCommands(program);
|
|
59
|
-
registerBankAccountCommands(program);
|
|
60
|
-
registerDocumentCommands(program);
|
|
61
|
-
registerDocumentBlockCommands(program);
|
|
62
|
-
registerPartnerCommands(program);
|
|
63
|
-
registerProductCommands(program);
|
|
64
|
-
registerCurrencyCommands(program);
|
|
65
|
-
registerOrganizationCommands(program);
|
|
66
|
-
registerUtilityCommands(program);
|
|
67
|
-
|
|
68
|
-
// Global error handler
|
|
69
|
-
process.on('unhandledRejection', (error) => {
|
|
70
|
-
console.error(chalk.red('Unhandled error:'), error);
|
|
71
|
-
process.exit(1);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// Parse command line arguments
|
|
75
|
-
program.parse(process.argv);
|
|
9
|
+
// Import and run the main CLI
|
|
10
|
+
import(join(__dirname, '..', 'src', 'index.js'));
|
package/package.json
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ktmcp-cli/billingo",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Production-ready CLI for Billingo API v3 -
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Production-ready CLI for Billingo API v3 - invoicing, billing, partners",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"billingo": "
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
-
"dev": "node bin/billingo.js"
|
|
8
|
+
"billingo": "bin/billingo.js"
|
|
13
9
|
},
|
|
14
10
|
"keywords": [
|
|
15
11
|
"billingo",
|
|
16
|
-
"
|
|
12
|
+
"invoicing",
|
|
17
13
|
"billing",
|
|
18
|
-
"hungary",
|
|
19
14
|
"cli",
|
|
20
|
-
"api"
|
|
15
|
+
"api",
|
|
16
|
+
"ktmcp"
|
|
21
17
|
],
|
|
22
18
|
"author": "KTMCP",
|
|
23
19
|
"license": "MIT",
|
|
@@ -31,5 +27,13 @@
|
|
|
31
27
|
},
|
|
32
28
|
"engines": {
|
|
33
29
|
"node": ">=18.0.0"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/ktmcp-cli/billingo.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://killthemcp.com/billingo-cli",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/ktmcp-cli/billingo/issues"
|
|
34
38
|
}
|
|
35
39
|
}
|