@boltic/cli 1.0.6-beta.8 → 1.0.6

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/README.md CHANGED
@@ -1,148 +1,593 @@
1
1
  # ⚡ Boltic CLI
2
2
 
3
- > A powerful CLI tool for creating, managing, and publishing Boltic integrations.
3
+ > **Professional CLI tool for creating, managing, and publishing Boltic Workflow integrations with enterprise-grade features and seamless developer experience.**
4
4
 
5
5
  [![NPM Version](https://img.shields.io/npm/v/@boltic/cli)](https://www.npmjs.com/package/@boltic/cli)
6
- [![GitHub Repo](https://img.shields.io/badge/GitHub-Repo-blue?logo=github)](https://github.com/<your-username>/<your-repo>)
6
+ [![GitHub Repo](https://img.shields.io/badge/GitHub-Repo-blue?logo=github)](https://github.com/bolticio/cli)
7
7
  [![License](https://img.shields.io/npm/l/@boltic/cli)](./LICENSE)
8
+ [![Node.js Package](https://github.com/bolticio/cli/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/bolticio/cli/actions/workflows/npm-publish.yml)
9
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
10
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/bolticio/cli/graphs/commit-activity)
11
+
12
+ <div align="center">
13
+
14
+ ![Boltic CLI](https://img.shields.io/badge/Boltic-CLI-00D4AA?style=for-the-badge&logo=node.js&logoColor=white)
15
+
16
+ **Streamline your integration development workflow with Boltic CLI**
17
+
18
+ [Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Contributing](#-contributing)
19
+
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## 📋 Table of Contents
25
+
26
+ - [✨ Features](#-features)
27
+ - [🚀 Quick Start](#-quick-start)
28
+ - [📦 Installation](#-installation)
29
+ - [🔐 Authentication](#-authentication)
30
+ - [🧩 Integration Management](#-integration-management)
31
+ - [📚 Command Reference](#-command-reference)
32
+ - [🛠️ Development Workflow](#️-development-workflow)
33
+ - [🔧 Configuration](#-configuration)
34
+ - [🛡️ Security](#-security)
35
+ - [🐛 Troubleshooting](#-troubleshooting)
36
+ - [📖 Documentation](#-documentation)
37
+ - [🤝 Contributing](#-contributing)
38
+ - [📄 License](#-license)
39
+
40
+ ---
41
+
42
+ ## ✨ Features
43
+
44
+ - 🔐 **Secure Authentication** - Enterprise-grade token management with secure storage
45
+ - 🚀 **Rapid Integration Development** - Create integrations in minutes, not hours
46
+ - 📦 **Smart Project Management** - Automated folder structure and configuration
47
+ - 🔄 **Real-time Synchronization** - Instant sync with Boltic Cloud platform
48
+ - 🎯 **Type-safe Development** - Support for Workflow Activities and Triggers
49
+ - 🎨 **Rich Interactive UI** - Beautiful command-line interface with progress indicators
50
+ - 📊 **Comprehensive Validation** - Built-in validation for all integration components
51
+ - 🔧 **Developer Experience** - Hot reload, debugging tools, and comprehensive error handling
52
+ - 🌐 **Multi-platform Support** - Works seamlessly on Windows, macOS, and Linux
53
+ - 📈 **Version Control Integration** - Git-friendly workflow with proper ignore patterns
54
+
55
+ ---
56
+
57
+ ## 🚀 Quick Start
58
+
59
+ Get up and running with Boltic CLI in under 2 minutes:
60
+
61
+ ```bash
62
+ # Install Boltic CLI globally
63
+ npm install -g @boltic/cli
64
+
65
+ # Authenticate with your Boltic account
66
+ boltic login
67
+
68
+ # Create your first integration
69
+ boltic integration create
70
+
71
+ # Sync your changes
72
+ boltic integration sync
73
+
74
+ # Submit for review
75
+ boltic integration submit
76
+ ```
8
77
 
9
78
  ---
10
79
 
11
80
  ## 📦 Installation
12
81
 
13
- Install Boltic CLI globally via NPM:
82
+ ### Prerequisites
83
+
84
+ - **Node.js** 18.0.0 or higher
85
+ - **npm** 8.0.0 or higher
86
+ - **Git** (for version control)
87
+
88
+ ### Global Installation (Recommended)
14
89
 
15
90
  ```bash
16
91
  npm install -g @boltic/cli
17
92
  ```
18
93
 
94
+ ### Verify Installation
95
+
96
+ ```bash
97
+ boltic --version
98
+ ```
99
+
19
100
  ---
20
101
 
21
102
  ## 🔐 Authentication
22
103
 
23
- To log in:
104
+ Boltic CLI uses a secure OAuth 2.0 flow with browser-based authentication for enhanced security and user experience.
105
+
106
+ ### Initial Login
107
+
108
+ ```bash
109
+ boltic login
110
+ ```
111
+
112
+ The authentication process follows these steps:
113
+
114
+ 1. **Browser Launch**: CLI automatically opens your default browser to the Boltic login page
115
+ 2. **OAuth Flow**: Complete the authentication in your browser (email/password or SSO)
116
+ 3. **Token Exchange**: CLI automatically exchanges the authorization code for access tokens
117
+ 4. **Secure Storage**: Tokens are encrypted and stored in your system's keychain
118
+
119
+ ### Authentication Flow
120
+
121
+ ```bash
122
+ # Start authentication
123
+ boltic login
124
+
125
+ # CLI will:
126
+ # 1. Generate a unique request code
127
+ # 2. Open browser to: https://console.fynd.com/auth/sign-in
128
+ # 3. Wait for you to complete login in browser
129
+ # 4. Poll for session data (up to 5 minutes)
130
+ # 5. Exchange session for bearer token
131
+ # 6. Store tokens securely
132
+ ```
133
+
134
+ ### Secure Token Storage
135
+
136
+ Your authentication credentials are securely stored using your system's native keychain:
137
+
138
+ - **macOS**: Keychain Access (`boltic-cli` service)
139
+ - **Windows**: Credential Manager (`boltic-cli` service)
140
+ - **Linux**: Secret Service API (`boltic-cli` service)
141
+
142
+ **Stored Credentials:**
143
+
144
+ - `token`: Bearer token for API authentication
145
+ - `session`: Session cookie for web requests
146
+ - `account_id`: Your Boltic account identifier
147
+
148
+ ### Logout and Token Management
149
+
150
+ ```bash
151
+ # Clear all stored credentials
152
+ boltic logout
153
+
154
+ # Check authentication status
155
+ boltic integration list # Will prompt login if not authenticated
156
+ ```
157
+
158
+ ### Troubleshooting Authentication
159
+
160
+ #### Common Issues
161
+
162
+ **Browser doesn't open automatically:**
163
+
164
+ ```bash
165
+ # Manual login URL will be displayed
166
+ # Copy and paste the URL into your browser
167
+ ```
168
+
169
+ **Authentication timeout:**
24
170
 
25
171
  ```bash
172
+ # Retry login (5-minute timeout)
26
173
  boltic login
27
174
  ```
28
175
 
29
- Follow the interactive prompt to enter your credentials. Your token will be stored securely for future use.
176
+ **Connection issues:**
177
+
178
+ ```bash
179
+ # Check network connectivity
180
+ ping console.fynd.com
181
+
182
+ boltic login
183
+ ```
30
184
 
31
185
  ---
32
186
 
33
187
  ## 🧩 Integration Management
34
188
 
35
- ### Create a New Integration
189
+ ### Creating New Integrations
36
190
 
37
191
  ```bash
38
192
  boltic integration create
39
193
  ```
40
194
 
41
- You’ll be prompted to enter:
195
+ #### Interactive Setup Process
196
+
197
+ The CLI will guide you through:
198
+
199
+ 1. **Integration Details**
200
+ - Name (alphanumeric + underscores only)
201
+ - Description (human-readable)
202
+ - AI-generated description
203
+
204
+ 2. **Visual Assets**
205
+ - Icon selection (SVG format required)
206
+ - Brand colors and styling
207
+
208
+ 3. **Integration Type**
209
+ - **Workflow Activity**: Reusable components for specific tasks
210
+ - **Workflow Trigger**: Event-driven components that initiate workflows
211
+ - **Both**: Create both types simultaneously
212
+
213
+ 4. **Categorization**
214
+ - Integration Group (Analytics, CRM, ERP, Marketing, etc.)
215
+ - Tags and metadata
216
+
217
+ #### Generated Project Structure
218
+
219
+ ```
220
+ my-integration/
221
+ ├── schemas/
222
+ │ ├── resources/
223
+ │ │ └── resource1.json
224
+ │ ├── authentication.json
225
+ │ ├── base.json
226
+ │ └── webhook.json
227
+ ├── Authentication.mdx
228
+ ├── Documentation.mdx
229
+ └── spec.json
230
+ ```
231
+
232
+ **File Descriptions:**
42
233
 
43
- - **Name**: Letters and underscores only (e.g., My_Integration)
44
- - **Icon**: Select an SVG file from your computer
45
- - **Integration Type**:
46
- - Workflow Activity: Reusable components that perform specific tasks
47
- - Workflow Trigger: Components that start your workflow based on external events
48
- - You can choose to create both types for the same integration
234
+ - **`schemas/`** - Schema definitions for the integration
235
+ - **`resources/`** - Resource-specific schemas (e.g., `resource1.json`)
236
+ - **`authentication.json`** - Authentication configuration and parameters
237
+ - **`base.json`** - Base integration configuration and parameters
238
+ - **`webhook.json`** - Webhook configuration (for trigger integrations)
49
239
 
50
- - **Descriptions**
51
- - Human-readable and AI-generated
240
+ - **`Authentication.mdx`** - Authentication documentation in Markdown format
241
+ - **`Documentation.mdx`** - General integration documentation
242
+ - **`spec.json`** - Integration specification and metadata
52
243
 
53
- - **Integration Group**
54
- - e.g., Analytics, CRM, ERP, Marketing, Payment, Social Media, Other
244
+ ### Managing Existing Integrations
55
245
 
56
- ### ✏️ Edit an Integration
246
+ #### Edit Integration
57
247
 
58
248
  ```bash
249
+ # Edit current integration
59
250
  boltic integration edit
251
+
60
252
  ```
61
253
 
62
- ### 🔄 Sync an Integration
254
+ #### Sync Changes
63
255
 
64
256
  ```bash
257
+ # Sync all changes
65
258
  boltic integration sync
66
259
  ```
67
260
 
68
- ### 🚀 Publish an Integration
261
+ #### Pull Latest Changes
69
262
 
70
263
  ```bash
71
- boltic integration publish
264
+ # Pull latest from Boltic Cloud
265
+ boltic integration pull
266
+ ```
267
+
268
+ #### Submit for Review
269
+
270
+ ```bash
271
+ # Submit for publishing review
272
+ boltic integration submit
72
273
  ```
73
274
 
74
275
  ---
75
276
 
76
- ## 📌 Command Reference
277
+ ## 📚 Command Reference
77
278
 
78
- | Command | Description |
79
- | ---------------------------- | -------------------------------------------------------- |
80
- | `boltic login` | Authenticate with Boltic |
81
- | `boltic integration create` | Create a new integration |
82
- | `boltic integration sync` | Sync changes to your draft |
83
- | `boltic integration publish` | Submit integration for review |
84
- | `boltic integration pull` | Pull the latest changes of an integration from the Cloud |
85
- | `boltic integration edit` | Edit an existing integration |
86
- | `boltic help` | Show CLI help |
87
- | `boltic version` | Display CLI version |
279
+ ### Core Commands
88
280
 
89
- ---
281
+ | Command | Description | Options |
282
+ | ---------------- | --------------------------------- | ------- |
283
+ | `boltic login` | Authenticate with Boltic platform | |
284
+ | `boltic logout` | Clear stored credentials | |
285
+ | `boltic version` | Display CLI version | |
286
+ | `boltic help` | Show comprehensive help | |
90
287
 
91
- ## 🔁 Typical Workflow
288
+ ### Integration Commands
289
+
290
+ | Command | Description | Options |
291
+ | --------------------------- | ------------------------- | --------------------- |
292
+ | `boltic integration create` | Create new integration | Interactive prompts |
293
+ | `boltic integration edit` | Edit existing integration | Interactive prompt |
294
+ | `boltic integration sync` | Sync local changes | Interactive prompt |
295
+ | `boltic integration pull` | Pull latest changes | Interactive prompt |
296
+ | `boltic integration submit` | Submit for review | |
297
+ | `boltic integration status` | Check integration status | Interactive selection |
298
+ | `boltic integration help` | Show integration help | |
299
+
300
+ ### Help and Documentation
92
301
 
93
302
  ```bash
94
- # Step 1: Authenticate
95
- boltic login
303
+ # General help
304
+ boltic help
305
+
306
+ # Command-specific help
307
+ boltic integration help
308
+ boltic login help
309
+ ```
310
+
311
+ ---
96
312
 
97
- # Step 2: Start a new integration
313
+ ## 🛠️ Development Workflow
314
+
315
+ ### Typical Development Cycle
316
+
317
+ ```bash
318
+ # 1. Start Development
98
319
  boltic integration create
320
+ cd my-integration
99
321
 
100
- # Step 3: Save changes
322
+ # 2. Make Changes
323
+ # Edit your integration files...
324
+
325
+ # 3. Sync Changes
101
326
  boltic integration sync
102
327
 
103
- # Step 5: Submit for publishing and review
104
- boltic integration publish
328
+ # 4. Iterate
329
+ # Make more changes and sync...
330
+
331
+ # 5. Submit for Review
332
+ boltic integration submit
333
+ ```
334
+
335
+ ---
336
+
337
+ ## 🐛 Troubleshooting
338
+
339
+ ### Complete Troubleshooting Guide
340
+
341
+ When encountering issues with Boltic CLI, follow this comprehensive troubleshooting guide:
342
+
343
+ #### 1. Authentication Issues
344
+
345
+ **Problem**: Cannot authenticate, login fails, or session expires
346
+
347
+ **Solutions**:
348
+
349
+ ```bash
350
+ # Clear stored credentials and re-authenticate
351
+ boltic logout
352
+ boltic login
353
+
354
+ # Check network connectivity
355
+ ping console.fynd.com
356
+
357
+ # If browser doesn't open automatically, copy the manual URL
358
+ boltic login # Manual URL will be displayed
105
359
 
106
- # Step 6: Pull the latest changes of a integration. Please call this command inside a integration folder.
360
+ # For authentication timeout (5-minute limit)
361
+ boltic login # Retry the login process
362
+ ```
363
+
364
+ **Browser-specific issues**:
365
+
366
+ - Manual login URL will be displayed if browser doesn't open
367
+ - Copy and paste the URL into your browser
368
+ - Ensure you're using a supported browser (Chrome, Firefox, Safari, Edge)
369
+
370
+ #### 2. Integration Management Issues
371
+
372
+ **Problem**: Cannot create, edit, sync, or submit integrations
373
+
374
+ **Solutions**:
375
+
376
+ ```bash
377
+ # Check integration status
378
+ boltic integration status
379
+
380
+ # Force sync all changes
381
+ boltic integration sync
382
+
383
+ # Pull latest changes from Boltic Cloud
107
384
  boltic integration pull
108
385
 
109
- # Step 7: Use this command if you don't have folder of a particular integration. Please call this command outside of any existing integration folder.
110
- boltic integration edit
386
+ # Re-authenticate if needed
387
+ boltic logout && boltic login
388
+
389
+ # Check if you're in the correct directory
390
+ ls -la # Should show integration files (spec.json, etc.)
111
391
  ```
112
392
 
113
- ---
393
+ #### 3. Network and Connectivity Issues
114
394
 
115
- ## 🛠️ Troubleshooting
395
+ **Problem**: Connection errors, timeouts, or API failures
116
396
 
117
- ### Login Errors
397
+ **Solutions**:
118
398
 
119
- - Make sure you're online and using valid credentials.
120
- - Retry `boltic login` if your token has expired.
399
+ ```bash
400
+ # Test basic connectivity
401
+ ping console.fynd.com
121
402
 
122
- ### Integration Issues
403
+ # Check API status
404
+ boltic integration status
123
405
 
124
- - Ensure all required fields (e.g., name, type, icon URL) are filled.
125
- - Verify the icon URL is publicly accessible.
126
- - Double-check the selected integration type and group.
406
+ # Enable verbose logging for detailed error information
407
+ boltic --verbose integration sync
408
+ boltic --verbose integration create
409
+ boltic --verbose login
127
410
 
128
- ---
411
+ # Check your internet connection and firewall settings
412
+ ```
413
+
414
+ #### 4. File and Directory Issues
415
+
416
+ **Problem**: Missing files, permission errors, or corrupted project structure
417
+
418
+ **Solutions**:
419
+
420
+ ```bash
421
+ # Verify project structure
422
+ ls -la # Should show: schemas/, Authentication.mdx, Documentation.mdx, spec.json
423
+
424
+ # Check file permissions
425
+ ls -la schemas/
426
+
427
+ # Re-create integration if structure is corrupted
428
+ boltic integration create # Create new integration
429
+ # Then manually copy your customizations
430
+ ```
431
+
432
+ #### 5. Performance and Sync Issues
433
+
434
+ **Problem**: Slow performance, hanging operations, or sync failures
435
+
436
+ **Solutions**:
437
+
438
+ ```bash
439
+ # Check integration status first
440
+ boltic integration status
441
+
442
+ # Force sync with verbose output
443
+ boltic --verbose integration sync
444
+
445
+ # Clear cache and re-authenticate
446
+ boltic logout
447
+ boltic login
448
+
449
+ # Check system resources
450
+ # Ensure sufficient disk space and memory
451
+ ```
452
+
453
+ #### 6. Debug Mode and Logging
454
+
455
+ **Enable detailed logging for any command**:
129
456
 
130
- ## 📚 Help
457
+ ```bash
458
+ # General verbose mode
459
+ boltic --verbose <command>
460
+
461
+ # Specific examples
462
+ boltic --verbose integration create
463
+ boltic --verbose integration sync
464
+ boltic --verbose login
465
+ boltic --verbose integration submit
466
+ ```
131
467
 
132
- Get help directly in the CLI:
468
+ #### 7. Getting Help and Support
469
+
470
+ **Built-in help system**:
133
471
 
134
472
  ```bash
135
- # View all commands
473
+ # General help
136
474
  boltic help
137
475
 
138
- # View integration command options
476
+ # Command-specific help
139
477
  boltic integration help
478
+ boltic login help
479
+
480
+ # Check CLI version
481
+ boltic --version
482
+ ```
483
+
484
+ **External resources**:
485
+
486
+ - 📚 [Boltic Documentation](https://docs.boltic.io) - Complete guides and API reference
487
+ - 🐛 [Issue Tracker](https://github.com/bolticio/cli/issues) - Report bugs and request features
488
+ - 💬 [Discord Community](https://discord.gg/boltic) - Community support and discussions
489
+ - 📧 [Support](https://support.boltic.io) - Official support channels
490
+
491
+ #### 8. Advanced Troubleshooting
492
+
493
+ **Keychain/Credential issues**:
494
+
495
+ ```bash
496
+ # Manual credential cleanup (if logout fails)
497
+ # macOS: Check Keychain Access for "boltic-cli" entries
498
+ # Windows: Check Credential Manager for "boltic-cli" entries
499
+ # Linux: Check Secret Service for "boltic-cli" entries
500
+
501
+ # Force logout and clean authentication
502
+ boltic logout
503
+ boltic login
504
+ ```
505
+
506
+ **Environment-specific issues**:
507
+
508
+ ```bash
509
+ # Check Node.js version (requires 18.0.0+)
510
+ node --version
511
+
512
+ # Check npm version (requires 8.0.0+)
513
+ npm --version
514
+
515
+ # Update CLI to latest version
516
+ npm install -g @boltic/cli@latest
517
+
518
+ # Verify installation
519
+ boltic --version
520
+ ```
521
+
522
+ **Development mode troubleshooting**:
523
+
524
+ ```bash
525
+ # For contributors using development installation
526
+ npm install # Update dependencies
527
+ npm link # Re-link CLI
528
+ npm test # Run test suite
529
+ ```
530
+
531
+ #### 9. Emergency Recovery
532
+
533
+ **If all else fails**:
534
+
535
+ ```bash
536
+ # Complete reset
537
+ boltic logout
538
+ npm uninstall -g @boltic/cli
539
+ npm install -g @boltic/cli
540
+ boltic login
541
+
542
+ # Backup and restore integration
543
+ # Copy your integration files to a backup location
544
+ # Re-create integration and restore customizations
140
545
  ```
141
546
 
142
- Or visit the [Boltic Docs](https://docs.boltic.io) for full documentation.
547
+ **Still need help?**
548
+
549
+ 1. Check the [FAQ](https://docs.boltic.io/faq)
550
+ 2. Search [existing issues](https://github.com/bolticio/cli/issues)
551
+ 3. Create a new issue with:
552
+ - CLI version (`boltic --version`)
553
+ - Operating system
554
+ - Node.js version
555
+ - Complete error message
556
+ - Steps to reproduce
143
557
 
144
558
  ---
145
559
 
146
- ## 🧾 License
560
+ ## 📖 Documentation
561
+
562
+ ### Official Resources
563
+
564
+ - 📚 **[Boltic Documentation](https://docs.boltic.io)** - Complete API reference and guides
565
+
566
+ ### Community Resources
567
+
568
+ - 🐛 **[Issue Tracker](https://github.com/bolticio/cli/issues)** - Report bugs and request features
569
+ - 📝 **[Blog](https://boltic.io/blog)** - Latest updates and best practices
570
+
571
+ ---
572
+
573
+ ## 📄 License
574
+
575
+ This project is licensed under the **ISC License** - see the [LICENSE](LICENSE) file for details.
576
+
577
+ ---
578
+
579
+ ## 🙏 Acknowledgments
580
+
581
+ - **Boltic Team** - For building an amazing platform
582
+ - **Open Source Contributors** - For their valuable contributions
583
+ - **Community** - For feedback, bug reports, and feature requests
584
+
585
+ ---
586
+
587
+ <div align="center">
588
+
589
+ **Made with ❤️ by the Boltic Team**
590
+
591
+ [Website](https://boltic.io) • [Documentation](https://docs.boltic.io) •
147
592
 
148
- MIT © [Boltic](https://boltic.io)
593
+ </div>