@ktmcp-cli/billingo 1.0.0

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/INDEX.md ADDED
@@ -0,0 +1,364 @@
1
+ # Billingo CLI - Documentation Index
2
+
3
+ Welcome to the Billingo CLI documentation. This index helps you find the right documentation for your needs.
4
+
5
+ ## Quick Navigation
6
+
7
+ | I want to... | Read this... |
8
+ |-------------|-------------|
9
+ | Get started in 5 minutes | [QUICKSTART.md](QUICKSTART.md) |
10
+ | Understand the full feature set | [README.md](README.md) |
11
+ | Use with AI agents (Claude, GPT-4) | [AGENT.md](AGENT.md) |
12
+ | Integrate with OpenClaw | [OPENCLAW.md](OPENCLAW.md) |
13
+ | Test and validate | [TESTING.md](TESTING.md) |
14
+ | See project stats | [CLI_SUMMARY.md](CLI_SUMMARY.md) |
15
+ | View file structure | [STRUCTURE.txt](STRUCTURE.txt) |
16
+ | Read project report | [PROJECT_REPORT.md](PROJECT_REPORT.md) |
17
+
18
+ ## Documentation by Audience
19
+
20
+ ### For Developers
21
+
22
+ **Start here**: [QUICKSTART.md](QUICKSTART.md)
23
+
24
+ 1. **Installation**: Run `./INSTALL.sh` or follow [QUICKSTART.md](QUICKSTART.md)
25
+ 2. **Configuration**: Set your API key (see [README.md](README.md#configuration))
26
+ 3. **Usage**: Learn commands (see [README.md](README.md#usage))
27
+ 4. **Testing**: Validate installation (see [TESTING.md](TESTING.md))
28
+
29
+ **Key Files**:
30
+ - [README.md](README.md) - Complete reference
31
+ - [QUICKSTART.md](QUICKSTART.md) - Get started fast
32
+ - [examples/](examples/) - JSON examples
33
+
34
+ ### For AI Agents
35
+
36
+ **Start here**: [AGENT.md](AGENT.md)
37
+
38
+ This 600+ line guide covers:
39
+ - Quick start for agents
40
+ - Output parsing (JSON format)
41
+ - Error handling patterns
42
+ - Complete workflow examples
43
+ - Field validation
44
+ - Hungarian-specific info (VAT rates, currencies)
45
+
46
+ **Why this matters**: This CLI is designed for AI agents. The AGENT.md file is your complete guide.
47
+
48
+ ### For OpenClaw Developers
49
+
50
+ **Start here**: [OPENCLAW.md](OPENCLAW.md)
51
+
52
+ This 500+ line guide covers:
53
+ - Why CLI > MCP for OpenClaw
54
+ - Python wrapper implementation
55
+ - Complete example agent
56
+ - Docker integration
57
+ - Testing strategies
58
+
59
+ **Key insight**: OpenClaw + CLI is simpler and more reliable than OpenClaw + MCP.
60
+
61
+ ### For Project Managers
62
+
63
+ **Start here**: [PROJECT_REPORT.md](PROJECT_REPORT.md)
64
+
65
+ This comprehensive report includes:
66
+ - Project completion status
67
+ - Technical implementation details
68
+ - Documentation quality metrics
69
+ - Deployment readiness
70
+ - Success metrics
71
+
72
+ **Quick facts**:
73
+ - 100% API coverage (29/29 endpoints)
74
+ - 2,000+ lines of documentation
75
+ - Production ready
76
+ - Comprehensive error handling
77
+
78
+ ### For QA/Testing
79
+
80
+ **Start here**: [TESTING.md](TESTING.md)
81
+
82
+ Complete testing guide including:
83
+ - Pre-installation tests
84
+ - Installation validation
85
+ - Command structure tests
86
+ - API integration tests
87
+ - Error handling tests
88
+ - Automated test script
89
+
90
+ **Run this**: `cat TESTING.md` for full test suite
91
+
92
+ ## Documentation by Topic
93
+
94
+ ### Installation & Setup
95
+
96
+ 1. **Quick Install**: Run `./INSTALL.sh`
97
+ 2. **Manual Install**: See [QUICKSTART.md](QUICKSTART.md#step-1-install)
98
+ 3. **Configuration**: See [README.md](README.md#configuration)
99
+ 4. **Verification**: See [TESTING.md](TESTING.md#installation-tests)
100
+
101
+ ### Usage & Commands
102
+
103
+ 1. **Quick Examples**: [QUICKSTART.md](QUICKSTART.md#step-5-create-your-first-invoice)
104
+ 2. **Complete Reference**: [README.md](README.md#usage)
105
+ 3. **AI Agent Patterns**: [AGENT.md](AGENT.md#common-workflows)
106
+ 4. **Command List**: [STRUCTURE.txt](STRUCTURE.txt#command-hierarchy)
107
+
108
+ ### API Reference
109
+
110
+ 1. **Endpoint Coverage**: [CLI_SUMMARY.md](CLI_SUMMARY.md#api-coverage)
111
+ 2. **Data Formats**: [README.md](README.md#data-formats)
112
+ 3. **Error Handling**: [README.md](README.md#error-handling)
113
+ 4. **Rate Limiting**: [README.md](README.md#rate-limiting)
114
+
115
+ ### Integration
116
+
117
+ 1. **OpenClaw**: [OPENCLAW.md](OPENCLAW.md)
118
+ 2. **AI Agents**: [AGENT.md](AGENT.md)
119
+ 3. **Docker**: [OPENCLAW.md](OPENCLAW.md#docker-integration)
120
+ 4. **Environment Vars**: [README.md](README.md#configuration)
121
+
122
+ ### Development
123
+
124
+ 1. **Project Structure**: [STRUCTURE.txt](STRUCTURE.txt)
125
+ 2. **Code Overview**: [CLI_SUMMARY.md](CLI_SUMMARY.md#directory-structure)
126
+ 3. **Testing**: [TESTING.md](TESTING.md)
127
+ 4. **Examples**: [examples/](examples/)
128
+
129
+ ## File Reference
130
+
131
+ ### Documentation (8 files)
132
+
133
+ | File | Lines | Purpose |
134
+ |------|-------|---------|
135
+ | README.md | 500+ | Main documentation + "Why CLI > MCP" |
136
+ | AGENT.md | 600+ | AI agent usage guide |
137
+ | OPENCLAW.md | 500+ | OpenClaw integration |
138
+ | QUICKSTART.md | 200+ | 5-minute getting started |
139
+ | TESTING.md | 400+ | Testing & validation |
140
+ | CLI_SUMMARY.md | 400+ | Implementation summary |
141
+ | PROJECT_REPORT.md | 400+ | Project completion report |
142
+ | STRUCTURE.txt | 200+ | Visual structure reference |
143
+ | INDEX.md | This file | Documentation index |
144
+
145
+ ### Code (13 files)
146
+
147
+ | File | Lines | Purpose |
148
+ |------|-------|---------|
149
+ | bin/billingo.js | 73 | CLI entry point |
150
+ | src/commands/*.js | ~900 | Command implementations (8 files) |
151
+ | src/lib/*.js | ~240 | Core libraries (3 files) |
152
+
153
+ ### Examples (4 files)
154
+
155
+ | File | Purpose |
156
+ |------|---------|
157
+ | examples/invoice.json | Sample invoice with multiple items |
158
+ | examples/partner.json | Sample customer/partner data |
159
+ | examples/product.json | Sample product/service |
160
+ | examples/bank-account.json | Sample bank account |
161
+
162
+ ### Configuration (5 files)
163
+
164
+ | File | Purpose |
165
+ |------|---------|
166
+ | package.json | npm package configuration |
167
+ | .env.example | Environment variable template |
168
+ | .gitignore | Git ignore rules |
169
+ | LICENSE | MIT License |
170
+ | INSTALL.sh | Installation script |
171
+
172
+ ## Common Tasks
173
+
174
+ ### I want to install the CLI
175
+
176
+ ```bash
177
+ cd /workspace/group/ktmcp/workspace/billingo
178
+ ./INSTALL.sh
179
+ ```
180
+
181
+ See: [QUICKSTART.md](QUICKSTART.md)
182
+
183
+ ### I want to create an invoice
184
+
185
+ ```bash
186
+ # 1. Configure API key
187
+ billingo config set apiKey YOUR_KEY
188
+
189
+ # 2. Edit example
190
+ cp examples/invoice.json my-invoice.json
191
+ # (edit with your data)
192
+
193
+ # 3. Create invoice
194
+ billingo documents create --file my-invoice.json
195
+ ```
196
+
197
+ See: [QUICKSTART.md](QUICKSTART.md#step-5-create-your-first-invoice)
198
+
199
+ ### I want to integrate with my AI agent
200
+
201
+ Read: [AGENT.md](AGENT.md)
202
+
203
+ Key sections:
204
+ - Quick Start for Agents
205
+ - Output Parsing (JSON format)
206
+ - Complete Workflow Examples
207
+
208
+ ### I want to understand why CLI > MCP
209
+
210
+ Read: [README.md](README.md#why-cli--mcp)
211
+
212
+ Key points:
213
+ 1. No server process needed
214
+ 2. Direct API access
215
+ 3. Human + AI usable
216
+ 4. Self-documenting
217
+ 5. Better errors
218
+ 6. Easier debugging
219
+
220
+ ### I want to test the CLI
221
+
222
+ Read: [TESTING.md](TESTING.md)
223
+
224
+ Quick test:
225
+ ```bash
226
+ billingo --help
227
+ billingo organization get
228
+ ```
229
+
230
+ ### I want to see all available commands
231
+
232
+ ```bash
233
+ billingo --help
234
+
235
+ # Or read:
236
+ cat STRUCTURE.txt
237
+ ```
238
+
239
+ See: [STRUCTURE.txt](STRUCTURE.txt#command-hierarchy)
240
+
241
+ ## FAQ
242
+
243
+ ### What is this?
244
+
245
+ A production-ready CLI for the Billingo API v3 (Hungarian invoicing and billing).
246
+
247
+ ### Who is it for?
248
+
249
+ - Developers building billing automation
250
+ - AI agents (Claude, GPT-4) automating invoices
251
+ - OpenClaw users integrating billing
252
+ - Anyone using Billingo programmatically
253
+
254
+ ### What makes it special?
255
+
256
+ 1. **100% API coverage** - All 29 endpoints
257
+ 2. **CLI > MCP philosophy** - Better than MCP servers
258
+ 3. **AI-first design** - Built for agent use
259
+ 4. **Comprehensive docs** - 2,000+ lines
260
+ 5. **Production ready** - Full error handling
261
+
262
+ ### How do I get started?
263
+
264
+ ```bash
265
+ ./INSTALL.sh
266
+ billingo config set apiKey YOUR_KEY
267
+ billingo organization get
268
+ ```
269
+
270
+ Then read [QUICKSTART.md](QUICKSTART.md).
271
+
272
+ ### Where do I get an API key?
273
+
274
+ https://app.billingo.hu/api-key
275
+
276
+ ### How do I report issues?
277
+
278
+ Check error messages first (they're comprehensive).
279
+ Then review [TESTING.md](TESTING.md#troubleshooting).
280
+
281
+ ### Can I use this in production?
282
+
283
+ Yes. The CLI is production-ready with:
284
+ - Full error handling
285
+ - Rate limit management
286
+ - Input validation
287
+ - Proper exit codes
288
+
289
+ ### Does it work with AI agents?
290
+
291
+ Yes! See [AGENT.md](AGENT.md) for complete guide.
292
+
293
+ The CLI is designed for AI agents with:
294
+ - JSON output mode
295
+ - Clear error messages
296
+ - Complete field validation
297
+ - Workflow examples
298
+
299
+ ### How do I integrate with OpenClaw?
300
+
301
+ See [OPENCLAW.md](OPENCLAW.md) for complete guide including:
302
+ - Python wrapper
303
+ - Example agent
304
+ - Docker setup
305
+
306
+ ## Support Resources
307
+
308
+ ### Official Billingo Resources
309
+ - API Docs: https://api.billingo.hu/v3/swagger
310
+ - Get API Key: https://app.billingo.hu/api-key
311
+ - Support: https://support.billingo.hu/
312
+
313
+ ### CLI Resources
314
+ - All documentation: This directory
315
+ - Help command: `billingo --help`
316
+ - Command help: `billingo <resource> --help`
317
+
318
+ ### Examples
319
+ - Invoice: `cat examples/invoice.json`
320
+ - Partner: `cat examples/partner.json`
321
+ - Product: `cat examples/product.json`
322
+
323
+ ## Next Steps
324
+
325
+ ### If you're new:
326
+ 1. Run `./INSTALL.sh`
327
+ 2. Read [QUICKSTART.md](QUICKSTART.md)
328
+ 3. Try examples from [README.md](README.md#examples)
329
+
330
+ ### If you're an AI agent:
331
+ 1. Read [AGENT.md](AGENT.md)
332
+ 2. Use `--format json` for all commands
333
+ 3. Follow workflow examples
334
+
335
+ ### If you're integrating:
336
+ 1. Read [OPENCLAW.md](OPENCLAW.md) (if using OpenClaw)
337
+ 2. Check [examples/](examples/) for data formats
338
+ 3. Test with [TESTING.md](TESTING.md)
339
+
340
+ ### If you're developing:
341
+ 1. Read [CLI_SUMMARY.md](CLI_SUMMARY.md)
342
+ 2. Check [STRUCTURE.txt](STRUCTURE.txt)
343
+ 3. Review code in `src/`
344
+
345
+ ## Contributing
346
+
347
+ This is a complete, production-ready CLI. Future enhancements could include:
348
+ - Unit tests (Jest)
349
+ - CI/CD pipeline
350
+ - Shell autocomplete
351
+ - Interactive mode
352
+
353
+ See [CLI_SUMMARY.md](CLI_SUMMARY.md#next-steps-for-production) for ideas.
354
+
355
+ ## License
356
+
357
+ MIT License - See [LICENSE](LICENSE)
358
+
359
+ ---
360
+
361
+ **Version**: 1.0.0
362
+ **Status**: Production Ready
363
+ **Location**: `/workspace/group/ktmcp/workspace/billingo/`
364
+ **Created**: 2024-02-16
package/INSTALL.sh ADDED
@@ -0,0 +1,62 @@
1
+ #!/bin/bash
2
+ # Billingo CLI - Quick Install Script
3
+
4
+ set -e
5
+
6
+ echo "================================================"
7
+ echo " Billingo CLI Installation"
8
+ echo "================================================"
9
+ echo ""
10
+
11
+ # Check Node.js version
12
+ if ! command -v node &> /dev/null; then
13
+ echo "Error: Node.js is not installed"
14
+ echo "Please install Node.js >= 18.0.0"
15
+ exit 1
16
+ fi
17
+
18
+ NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
19
+ if [ "$NODE_VERSION" -lt 18 ]; then
20
+ echo "Error: Node.js version must be >= 18.0.0"
21
+ echo "Current version: $(node -v)"
22
+ exit 1
23
+ fi
24
+
25
+ echo "✓ Node.js version: $(node -v)"
26
+ echo ""
27
+
28
+ # Install dependencies
29
+ echo "Installing dependencies..."
30
+ npm install
31
+ echo "✓ Dependencies installed"
32
+ echo ""
33
+
34
+ # Link CLI globally
35
+ echo "Linking CLI globally..."
36
+ npm link
37
+ echo "✓ CLI linked globally"
38
+ echo ""
39
+
40
+ # Verify installation
41
+ echo "Verifying installation..."
42
+ if command -v billingo &> /dev/null; then
43
+ echo "✓ billingo command available"
44
+ echo ""
45
+
46
+ echo "Installation successful!"
47
+ echo ""
48
+ echo "Next steps:"
49
+ echo "1. Get your API key from https://app.billingo.hu/api-key"
50
+ echo "2. Configure: billingo config set apiKey YOUR_API_KEY"
51
+ echo "3. Test: billingo organization get"
52
+ echo ""
53
+ echo "Documentation:"
54
+ echo " - Quick start: cat QUICKSTART.md"
55
+ echo " - Full docs: cat README.md"
56
+ echo " - AI agents: cat AGENT.md"
57
+ echo ""
58
+ else
59
+ echo "✗ Installation failed"
60
+ echo "Try running: npm link"
61
+ exit 1
62
+ fi
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 KTMCP
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.