@boltic/cli 1.0.6-beta.7 → 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,147 +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/bolticio/cli)
6
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
+ ```
7
77
 
8
78
  ---
9
79
 
10
80
  ## 📦 Installation
11
81
 
12
- 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)
13
89
 
14
90
  ```bash
15
91
  npm install -g @boltic/cli
16
92
  ```
17
93
 
94
+ ### Verify Installation
95
+
96
+ ```bash
97
+ boltic --version
98
+ ```
99
+
18
100
  ---
19
101
 
20
102
  ## 🔐 Authentication
21
103
 
22
- 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:**
23
170
 
24
171
  ```bash
172
+ # Retry login (5-minute timeout)
25
173
  boltic login
26
174
  ```
27
175
 
28
- 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
+ ```
29
184
 
30
185
  ---
31
186
 
32
187
  ## 🧩 Integration Management
33
188
 
34
- ### Create a New Integration
189
+ ### Creating New Integrations
35
190
 
36
191
  ```bash
37
192
  boltic integration create
38
193
  ```
39
194
 
40
- 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:**
41
233
 
42
- - **Name**: Letters and underscores only (e.g., My_Integration)
43
- - **Icon**: Select an SVG file from your computer
44
- - **Integration Type**:
45
- - Workflow Activity: Reusable components that perform specific tasks
46
- - Workflow Trigger: Components that start your workflow based on external events
47
- - 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)
48
239
 
49
- - **Descriptions**
50
- - 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
51
243
 
52
- - **Integration Group**
53
- - e.g., Analytics, CRM, ERP, Marketing, Payment, Social Media, Other
244
+ ### Managing Existing Integrations
54
245
 
55
- ### ✏️ Edit an Integration
246
+ #### Edit Integration
56
247
 
57
248
  ```bash
249
+ # Edit current integration
58
250
  boltic integration edit
251
+
59
252
  ```
60
253
 
61
- ### 🔄 Sync an Integration
254
+ #### Sync Changes
62
255
 
63
256
  ```bash
257
+ # Sync all changes
64
258
  boltic integration sync
65
259
  ```
66
260
 
67
- ### 🚀 Publish an Integration
261
+ #### Pull Latest Changes
68
262
 
69
263
  ```bash
70
- 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
71
273
  ```
72
274
 
73
275
  ---
74
276
 
75
- ## 📌 Command Reference
277
+ ## 📚 Command Reference
76
278
 
77
- | Command | Description |
78
- | ---------------------------- | -------------------------------------------------------- |
79
- | `boltic login` | Authenticate with Boltic |
80
- | `boltic integration create` | Create a new integration |
81
- | `boltic integration sync` | Sync changes to your draft |
82
- | `boltic integration publish` | Submit integration for review |
83
- | `boltic integration pull` | Pull the latest changes of an integration from the Cloud |
84
- | `boltic integration edit` | Edit an existing integration |
85
- | `boltic help` | Show CLI help |
86
- | `boltic version` | Display CLI version |
279
+ ### Core Commands
87
280
 
88
- ---
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 | |
89
287
 
90
- ## 🔁 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
91
301
 
92
302
  ```bash
93
- # Step 1: Authenticate
94
- boltic login
303
+ # General help
304
+ boltic help
305
+
306
+ # Command-specific help
307
+ boltic integration help
308
+ boltic login help
309
+ ```
310
+
311
+ ---
95
312
 
96
- # Step 2: Start a new integration
313
+ ## 🛠️ Development Workflow
314
+
315
+ ### Typical Development Cycle
316
+
317
+ ```bash
318
+ # 1. Start Development
97
319
  boltic integration create
320
+ cd my-integration
98
321
 
99
- # Step 3: Save changes
322
+ # 2. Make Changes
323
+ # Edit your integration files...
324
+
325
+ # 3. Sync Changes
100
326
  boltic integration sync
101
327
 
102
- # Step 5: Submit for publishing and review
103
- 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
104
359
 
105
- # 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
106
384
  boltic integration pull
107
385
 
108
- # 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.
109
- 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.)
110
391
  ```
111
392
 
112
- ---
393
+ #### 3. Network and Connectivity Issues
113
394
 
114
- ## 🛠️ Troubleshooting
395
+ **Problem**: Connection errors, timeouts, or API failures
115
396
 
116
- ### Login Errors
397
+ **Solutions**:
117
398
 
118
- - Make sure you're online and using valid credentials.
119
- - Retry `boltic login` if your token has expired.
399
+ ```bash
400
+ # Test basic connectivity
401
+ ping console.fynd.com
120
402
 
121
- ### Integration Issues
403
+ # Check API status
404
+ boltic integration status
122
405
 
123
- - Ensure all required fields (e.g., name, type, icon URL) are filled.
124
- - Verify the icon URL is publicly accessible.
125
- - 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
126
410
 
127
- ---
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**:
128
456
 
129
- ## 📚 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
+ ```
130
467
 
131
- Get help directly in the CLI:
468
+ #### 7. Getting Help and Support
469
+
470
+ **Built-in help system**:
132
471
 
133
472
  ```bash
134
- # View all commands
473
+ # General help
135
474
  boltic help
136
475
 
137
- # View integration command options
476
+ # Command-specific help
138
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
139
545
  ```
140
546
 
141
- 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
142
557
 
143
558
  ---
144
559
 
145
- ## 🧾 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) •
146
592
 
147
- MIT © [Boltic](https://boltic.io)
593
+ </div>