@codebakers/cli 1.3.1 → 1.4.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/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
3
6
  Object.defineProperty(exports, "__esModule", { value: true });
4
7
  const commander_1 = require("commander");
8
+ const chalk_1 = __importDefault(require("chalk"));
5
9
  const login_js_1 = require("./commands/login.js");
6
10
  const install_js_1 = require("./commands/install.js");
7
11
  const status_js_1 = require("./commands/status.js");
@@ -13,11 +17,43 @@ const serve_js_1 = require("./commands/serve.js");
13
17
  const mcp_config_js_1 = require("./commands/mcp-config.js");
14
18
  const setup_js_1 = require("./commands/setup.js");
15
19
  const scaffold_js_1 = require("./commands/scaffold.js");
20
+ const generate_js_1 = require("./commands/generate.js");
21
+ // Show welcome message when no command is provided
22
+ function showWelcome() {
23
+ console.log(chalk_1.default.blue(`
24
+ ╔═══════════════════════════════════════════════════════════╗
25
+ ║ ║
26
+ ║ ${chalk_1.default.bold.white('Welcome to CodeBakers!')} ║
27
+ ║ ║
28
+ ║ AI-assisted development with production patterns ║
29
+ ║ ║
30
+ ╚═══════════════════════════════════════════════════════════╝
31
+ `));
32
+ console.log(chalk_1.default.white(' Getting Started:\n'));
33
+ console.log(chalk_1.default.cyan(' codebakers setup') + chalk_1.default.gray(' One-time setup (recommended first step)'));
34
+ console.log(chalk_1.default.cyan(' codebakers scaffold') + chalk_1.default.gray(' Create a new project from scratch'));
35
+ console.log(chalk_1.default.cyan(' codebakers init') + chalk_1.default.gray(' Add patterns to existing project\n'));
36
+ console.log(chalk_1.default.white(' Development:\n'));
37
+ console.log(chalk_1.default.cyan(' codebakers generate') + chalk_1.default.gray(' Generate components, APIs, services'));
38
+ console.log(chalk_1.default.cyan(' codebakers status') + chalk_1.default.gray(' Check what\'s installed\n'));
39
+ console.log(chalk_1.default.white(' Examples:\n'));
40
+ console.log(chalk_1.default.gray(' $ ') + chalk_1.default.cyan('codebakers scaffold'));
41
+ console.log(chalk_1.default.gray(' Create a new Next.js + Supabase + Drizzle project\n'));
42
+ console.log(chalk_1.default.gray(' $ ') + chalk_1.default.cyan('codebakers generate component Button'));
43
+ console.log(chalk_1.default.gray(' Generate a React component with TypeScript\n'));
44
+ console.log(chalk_1.default.gray(' $ ') + chalk_1.default.cyan('codebakers g api users'));
45
+ console.log(chalk_1.default.gray(' Generate a Next.js API route with validation\n'));
46
+ console.log(chalk_1.default.white(' All Commands:\n'));
47
+ console.log(chalk_1.default.gray(' setup, scaffold, init, generate, status, doctor, login'));
48
+ console.log(chalk_1.default.gray(' install, uninstall, install-hook, uninstall-hook'));
49
+ console.log(chalk_1.default.gray(' serve, mcp-config, mcp-uninstall\n'));
50
+ console.log(chalk_1.default.gray(' Run ') + chalk_1.default.cyan('codebakers <command> --help') + chalk_1.default.gray(' for more info\n'));
51
+ }
16
52
  const program = new commander_1.Command();
17
53
  program
18
54
  .name('codebakers')
19
55
  .description('CodeBakers CLI - Production patterns for AI-assisted development')
20
- .version('1.0.0');
56
+ .version('1.4.0');
21
57
  // Primary command - one-time setup
22
58
  program
23
59
  .command('setup')
@@ -32,6 +68,11 @@ program
32
68
  .alias('new')
33
69
  .description('Create a new project with full stack scaffolding (Next.js + Supabase + Drizzle)')
34
70
  .action(scaffold_js_1.scaffold);
71
+ program
72
+ .command('generate [type] [name]')
73
+ .alias('g')
74
+ .description('Generate code from templates (component, api, service, hook, page, schema, form)')
75
+ .action((type, name) => (0, generate_js_1.generate)({ type, name }));
35
76
  program
36
77
  .command('login')
37
78
  .description('Login with your API key')
@@ -76,4 +117,10 @@ program
76
117
  .command('mcp-uninstall')
77
118
  .description('Remove MCP configuration from Claude Code')
78
119
  .action(mcp_config_js_1.mcpUninstall);
79
- program.parse();
120
+ // Show welcome if no command provided
121
+ if (process.argv.length <= 2) {
122
+ showWelcome();
123
+ }
124
+ else {
125
+ program.parse();
126
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {