@orchestree/cli 2.1.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/README.md ADDED
@@ -0,0 +1,528 @@
1
+ # Orchestree CLI
2
+
3
+ 🚀 **Orchestree CLI** - The intelligent command-line interface for the Orchestree Platform
4
+
5
+ A production-quality CLI tool for managing your Orchestree workspace, modules, automations, and deployments. Full-featured terminal UI with colorful output, powerful workflows, and zero-dependency design.
6
+
7
+ ## Features
8
+
9
+ - **Authentication** - Seamless login/logout with session management
10
+ - **Workspace Management** - Create and manage multiple workspaces
11
+ - **Module Management** - Enable, disable, and monitor 23+ Orchestree modules
12
+ - **Workflow Automation** - Create and execute Conductor workflows
13
+ - **Social Publishing** - Post to multiple platforms with analytics
14
+ - **Code Generation** - AI-powered code generation with Codenza
15
+ - **Brand Studio** - Create branded assets with Forge
16
+ - **Development Tools** - Scaffolding, testing, auditing, and deployment
17
+ - **Zero Dependencies** - Pure JavaScript, no heavy npm packages
18
+ - **Colorful Output** - Beautiful ANSI terminal colors and formatting
19
+ - **Fully Typed** - Complete TypeScript declarations included
20
+
21
+ ## Installation
22
+
23
+ ### Via NPM
24
+
25
+ ```bash
26
+ npm install -g @orchestree/cli
27
+ ```
28
+
29
+ ### Via Yarn
30
+
31
+ ```bash
32
+ yarn global add @orchestree/cli
33
+ ```
34
+
35
+ ### From Source
36
+
37
+ ```bash
38
+ git clone https://github.com/orchestree/orchestree.git
39
+ cd packages/cli
40
+ npm install -g .
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ ```bash
46
+ # Login to your Orchestree account
47
+ orchestree auth login
48
+
49
+ # Check your authentication status
50
+ orchestree auth status
51
+
52
+ # List available modules
53
+ orchestree modules list
54
+
55
+ # View your workspaces
56
+ orchestree workspace list
57
+
58
+ # Create a new workspace
59
+ orchestree workspace create my-workspace
60
+
61
+ # Start the development server
62
+ orchestree dev serve
63
+ ```
64
+
65
+ ## Commands
66
+
67
+ ### Authentication
68
+
69
+ ```bash
70
+ orchestree auth login # Log in to your Orchestree account
71
+ orchestree auth logout # Log out from Orchestree
72
+ orchestree auth status # Check authentication status
73
+ ```
74
+
75
+ ### Workspace Management
76
+
77
+ ```bash
78
+ orchestree workspace list # List all workspaces
79
+ orchestree workspace create <name> # Create a new workspace
80
+ orchestree workspace switch <name> # Switch to a workspace
81
+ ```
82
+
83
+ ### Module Management
84
+
85
+ Manage and monitor the 23 available Orchestree modules:
86
+
87
+ ```bash
88
+ orchestree modules list # List all available modules
89
+ orchestree modules enable <name> # Enable a specific module
90
+ orchestree modules status # Show status of all modules
91
+ orchestree modules health # Check health of all modules
92
+ ```
93
+
94
+ **Available Modules:**
95
+ - `social` - Social media publishing and management
96
+ - `conductor` - Workflow orchestration and automation
97
+ - `codenza` - AI-powered code generation and review
98
+ - `forge` - Brand studio for visual asset creation
99
+ - `enhance` - Module enhancement and optimization
100
+ - `analytics` - Advanced analytics and reporting
101
+ - `webhook` - Webhook management and integration
102
+ - `ai-assist` - AI assistance and guidance
103
+ - `integrations` - Third-party integrations
104
+ - `api` - API management and monitoring
105
+ - `templates` - Template library and customization
106
+ - `components` - Reusable component library
107
+ - `workflows` - Workflow management
108
+ - `scheduler` - Task scheduling
109
+ - `monitoring` - System monitoring and alerts
110
+ - `security` - Security features and compliance
111
+ - `performance` - Performance optimization
112
+ - `notifications` - Notification system
113
+ - `storage` - Data storage management
114
+ - `billing` - Billing and usage tracking
115
+ - `admin` - Administrative features
116
+ - `export` - Data export capabilities
117
+ - `import` - Data import capabilities
118
+
119
+ ### Conductor Workflows
120
+
121
+ Manage automation workflows and processes:
122
+
123
+ ```bash
124
+ orchestree conductor workflows # List all automation workflows
125
+ orchestree conductor run <workflow> # Run a specific workflow
126
+ orchestree conductor logs # View workflow execution logs
127
+ ```
128
+
129
+ **Examples:**
130
+ ```bash
131
+ orchestree conductor run daily-sync
132
+ orchestree conductor run lead-nurture
133
+ orchestree conductor logs
134
+ ```
135
+
136
+ ### Social Media Publishing
137
+
138
+ Publish and manage social media content:
139
+
140
+ ```bash
141
+ orchestree social post "Your content here" # Post to social media
142
+ orchestree social schedule # Schedule a post
143
+ orchestree social analytics # View social analytics
144
+ ```
145
+
146
+ **Examples:**
147
+ ```bash
148
+ orchestree social post "Check out our latest update!"
149
+ orchestree social schedule --date 2025-12-25 --time 09:00 --content "Holiday special!"
150
+ orchestree social analytics
151
+ ```
152
+
153
+ ### Code Generation (Codenza)
154
+
155
+ AI-powered code generation, review, and documentation:
156
+
157
+ ```bash
158
+ orchestree codenza generate # Generate code
159
+ orchestree codenza review <file> # Review code with AI
160
+ orchestree codenza docs # Generate documentation
161
+ ```
162
+
163
+ **Examples:**
164
+ ```bash
165
+ orchestree codenza generate --type component --name MyButton
166
+ orchestree codenza review src/main.js
167
+ orchestree codenza docs --input ./src
168
+ ```
169
+
170
+ ### Brand Studio (Forge)
171
+
172
+ Create branded assets and manage your brand kit:
173
+
174
+ ```bash
175
+ orchestree forge create # Create branded assets
176
+ orchestree forge brand-kit # Manage brand kit
177
+ ```
178
+
179
+ **Examples:**
180
+ ```bash
181
+ orchestree forge create --type social-post --topic "Product Launch"
182
+ orchestree forge create --type banner --size 1200x630
183
+ orchestree forge brand-kit
184
+ ```
185
+
186
+ ### Module Enhancement
187
+
188
+ Enhance any Orchestree module with optimization and security hardening:
189
+
190
+ ```bash
191
+ orchestree enhance <module>
192
+ ```
193
+
194
+ **Examples:**
195
+ ```bash
196
+ orchestree enhance social
197
+ orchestree enhance conductor
198
+ orchestree enhance codenza
199
+ orchestree enhance forge
200
+ ```
201
+
202
+ All 23 modules can be enhanced:
203
+ ```bash
204
+ orchestree enhance social
205
+ orchestree enhance conductor
206
+ orchestree enhance codenza
207
+ orchestree enhance forge
208
+ orchestree enhance analytics
209
+ orchestree enhance webhook
210
+ orchestree enhance ai-assist
211
+ orchestree enhance audit
212
+ orchestree enhance integrations
213
+ orchestree enhance api
214
+ orchestree enhance templates
215
+ orchestree enhance components
216
+ orchestree enhance workflows
217
+ orchestree enhance scheduler
218
+ orchestree enhance monitoring
219
+ orchestree enhance security
220
+ orchestree enhance performance
221
+ orchestree enhance notifications
222
+ orchestree enhance storage
223
+ orchestree enhance billing
224
+ orchestree enhance admin
225
+ orchestree enhance export
226
+ orchestree enhance import
227
+ ```
228
+
229
+ ### Code Scaffolding
230
+
231
+ Generate boilerplate code for new features:
232
+
233
+ ```bash
234
+ orchestree scaffold api-endpoint <name> # Scaffold API endpoint
235
+ orchestree scaffold new-module <name> # Scaffold new module
236
+ ```
237
+
238
+ **Examples:**
239
+ ```bash
240
+ orchestree scaffold api-endpoint users-api
241
+ orchestree scaffold new-module reporting
242
+ ```
243
+
244
+ ### System Audit
245
+
246
+ Audit system health, code quality, and security:
247
+
248
+ ```bash
249
+ orchestree audit # Full system audit
250
+ orchestree audit --type ui # UI quality audit
251
+ orchestree audit --type code # Code quality audit
252
+ orchestree audit --type security # Security audit
253
+ orchestree audit --module social # Audit specific module
254
+ ```
255
+
256
+ **Examples:**
257
+ ```bash
258
+ orchestree audit
259
+ orchestree audit --type code --module conductor
260
+ orchestree audit --type security
261
+ ```
262
+
263
+ ### Testing
264
+
265
+ Run the test suite:
266
+
267
+ ```bash
268
+ orchestree test # Run all tests
269
+ ```
270
+
271
+ ### Development Commands
272
+
273
+ Manage local development and deployment:
274
+
275
+ ```bash
276
+ orchestree dev serve # Start development server
277
+ orchestree dev deploy # Deploy to staging
278
+ orchestree dev logs # View server logs
279
+ ```
280
+
281
+ **Examples:**
282
+ ```bash
283
+ orchestree dev serve
284
+ # Server runs on http://localhost:3000
285
+
286
+ orchestree dev deploy
287
+ # Deploys to staging: https://staging.orchestree.ai/dashboard
288
+
289
+ orchestree dev logs
290
+ # Shows server logs and events
291
+ ```
292
+
293
+ ## Global Options
294
+
295
+ Use these flags with any command:
296
+
297
+ ```bash
298
+ -h, --help Display help menu
299
+ -v, --version Show version number
300
+ --verbose Enable verbose logging
301
+ --json Output as JSON
302
+ ```
303
+
304
+ **Examples:**
305
+ ```bash
306
+ orchestree auth login --verbose
307
+ orchestree modules list --json
308
+ orchestree --help
309
+ orchestree --version
310
+ ```
311
+
312
+ ## Configuration
313
+
314
+ The CLI stores configuration in your home directory:
315
+
316
+ **macOS/Linux:** `~/.orchestree`
317
+ **Windows:** `%USERPROFILE%\.orchestree`
318
+
319
+ Configuration is stored as JSON:
320
+
321
+ ```json
322
+ {
323
+ "authenticated": true,
324
+ "workspace": "default",
325
+ "userId": "user_abc123xyz",
326
+ "debug": false
327
+ }
328
+ ```
329
+
330
+ ## Examples
331
+
332
+ ### Complete Workflow
333
+
334
+ ```bash
335
+ # 1. Login
336
+ orchestree auth login
337
+
338
+ # 2. Create a new workspace
339
+ orchestree workspace create my-project
340
+
341
+ # 3. Switch to the workspace
342
+ orchestree workspace switch my-project
343
+
344
+ # 4. Enable modules
345
+ orchestree modules enable social
346
+ orchestree modules enable conductor
347
+
348
+ # 5. Check module health
349
+ orchestree modules health
350
+
351
+ # 6. Create an API endpoint scaffold
352
+ orchestree scaffold api-endpoint users
353
+
354
+ # 7. Start development server
355
+ orchestree dev serve
356
+
357
+ # 8. Create a workflow
358
+ orchestree conductor workflows
359
+
360
+ # 9. Deploy to staging
361
+ orchestree dev deploy
362
+ ```
363
+
364
+ ### Social Media Campaign
365
+
366
+ ```bash
367
+ # Generate content with AI
368
+ orchestree codenza generate --type "social-post" --topic "Product Launch"
369
+
370
+ # Create branded assets
371
+ orchestree forge create --type "social-post"
372
+
373
+ # Schedule posts
374
+ orchestree social schedule --date 2025-12-25 --time 09:00 --content "Merry Christmas!"
375
+
376
+ # Monitor analytics
377
+ orchestree social analytics
378
+ ```
379
+
380
+ ### Code Development
381
+
382
+ ```bash
383
+ # Scaffold new feature
384
+ orchestree scaffold api-endpoint orders
385
+
386
+ # Generate code with AI
387
+ orchestree codenza generate --type component
388
+
389
+ # Review code
390
+ orchestree codenza review src/components/Button.js
391
+
392
+ # Run tests
393
+ orchestree test
394
+
395
+ # Start dev server
396
+ orchestree dev serve
397
+
398
+ # Deploy when ready
399
+ orchestree dev deploy
400
+ ```
401
+
402
+ ## Troubleshooting
403
+
404
+ ### "Command not found"
405
+
406
+ Make sure the CLI is installed globally:
407
+
408
+ ```bash
409
+ npm install -g @orchestree/cli
410
+ ```
411
+
412
+ Check the installation:
413
+
414
+ ```bash
415
+ orchestree --version
416
+ ```
417
+
418
+ ### "Not authenticated"
419
+
420
+ Log in first:
421
+
422
+ ```bash
423
+ orchestree auth login
424
+ ```
425
+
426
+ Check status:
427
+
428
+ ```bash
429
+ orchestree auth status
430
+ ```
431
+
432
+ ### "Module not found"
433
+
434
+ List available modules:
435
+
436
+ ```bash
437
+ orchestree modules list
438
+ ```
439
+
440
+ Enable the module:
441
+
442
+ ```bash
443
+ orchestree modules enable module-name
444
+ ```
445
+
446
+ ### Enable Debug Mode
447
+
448
+ For detailed error messages:
449
+
450
+ ```bash
451
+ orchestree command --verbose
452
+ ```
453
+
454
+ ## Development
455
+
456
+ ### Building from Source
457
+
458
+ ```bash
459
+ git clone https://github.com/orchestree/orchestree.git
460
+ cd packages/cli
461
+ npm install
462
+ npm link
463
+ ```
464
+
465
+ ### Running in Development
466
+
467
+ ```bash
468
+ node bin/orchestree.js --help
469
+ ```
470
+
471
+ ### Testing
472
+
473
+ ```bash
474
+ npm test
475
+ ```
476
+
477
+ ## API Usage
478
+
479
+ Use the CLI programmatically in your Node.js code:
480
+
481
+ ```javascript
482
+ const OrchestreeCLI = require('@orchestree/cli');
483
+
484
+ const cli = new OrchestreeCLI();
485
+
486
+ // Access configuration
487
+ console.log(cli.config);
488
+
489
+ // Log messages
490
+ cli.success('Operation completed');
491
+ cli.error('Something went wrong');
492
+
493
+ // Run commands
494
+ await cli.run(['auth', 'login']);
495
+ ```
496
+
497
+ ## TypeScript Support
498
+
499
+ Full TypeScript definitions are included:
500
+
501
+ ```typescript
502
+ import OrchestreeCLI, { CommandContext } from '@orchestree/cli';
503
+
504
+ const cli = new OrchestreeCLI();
505
+
506
+ // Types are fully supported
507
+ const parsed = cli.parseArgs(['auth', 'login']);
508
+ console.log(parsed.command); // 'auth'
509
+ ```
510
+
511
+ ## License
512
+
513
+ MIT - See LICENSE file for details
514
+
515
+ ## Support
516
+
517
+ - 📚 [Documentation](https://orchestree.ai/docs)
518
+ - 🐛 [Report Issues](https://github.com/orchestree/orchestree/issues)
519
+ - 💬 [Community Chat](https://discord.gg/orchestree)
520
+ - 📧 [Email Support](mailto:support@orchestree.ai)
521
+
522
+ ## Contributing
523
+
524
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
525
+
526
+ ---
527
+
528
+ Made with ❤️ by the Orchestree Team
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Orchestree CLI Executable
5
+ * This is the entry point when running `orchestree` command globally
6
+ */
7
+
8
+ const OrchestreeCLI = require('../src/index.js');
9
+
10
+ const cli = new OrchestreeCLI();
11
+ cli.run(process.argv).catch((error) => {
12
+ console.error('\x1b[31m✖ Fatal Error:\x1b[0m', error.message);
13
+ process.exit(1);
14
+ });
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@orchestree/cli",
3
+ "version": "2.1.0",
4
+ "description": "Command-line interface for the Orchestree Platform",
5
+ "main": "src/index.js",
6
+ "types": "src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./src/index.js",
10
+ "require": "./src/index.js",
11
+ "types": "./src/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "src",
16
+ "README.md",
17
+ "LICENSE",
18
+ "bin"
19
+ ],
20
+ "keywords": [
21
+ "orchestree",
22
+ "cli",
23
+ "command-line",
24
+ "devtools"
25
+ ],
26
+ "author": "Orchestree <hello@orchestree.ai>",
27
+ "license": "MIT",
28
+ "homepage": "https://orchestree.ai/developer/cli",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/orchestree/orchestree.git",
32
+ "directory": "packages/cli"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/orchestree/orchestree/issues"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "bin": {
44
+ "orchestree": "./bin/orchestree.js"
45
+ }
46
+ }