@hazeljs/cli 0.5.1 → 0.5.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazeljs-ai-native-app",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "A HazelJS AI-native application with agents, RAG, and chat",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -4,6 +4,7 @@ export declare function generateApp(program: Command): void;
4
4
  /** Run the skeleton app generator (used by `hazel g app <name>`). Creates a minimal app, no install/git. */
5
5
  export declare function runApp(name: string, options: GenerateCLIOptions & {
6
6
  path?: string;
7
+ template?: string;
7
8
  }): Promise<GenerateResult>;
8
9
  /** Register `app <name>` under the generate command (skeleton app, like create-next-app). */
9
10
  export declare function registerGenerateApp(generateCommand: Command): void;
@@ -559,7 +559,16 @@ async function runApp(name, options) {
559
559
  };
560
560
  }
561
561
  try {
562
- createSkeletonAtDest(destPath, name, 'A HazelJS application');
562
+ // Use template based on option
563
+ const templateDir = options.template === 'ai-native' ? '@template-ai-native' : '@template';
564
+ const templatePath = path_1.default.join(__dirname, '../../', templateDir);
565
+ if (fs_1.default.existsSync(templatePath)) {
566
+ copyRecursiveSync(templatePath, destPath);
567
+ updatePackageJson(destPath, name, 'A HazelJS application');
568
+ }
569
+ else {
570
+ createSkeletonAtDest(destPath, name, 'A HazelJS application');
571
+ }
563
572
  return {
564
573
  ok: true,
565
574
  created: [destPath],
@@ -580,6 +589,7 @@ function registerGenerateApp(generateCommand) {
580
589
  .command('app <name>')
581
590
  .description('Generate a skeleton HazelJS application (minimal template, no install)')
582
591
  .option('-p, --path <path>', 'Parent directory for the app', '.')
592
+ .option('-t, --template <template>', 'Project template (basic, ai-native)', 'basic')
583
593
  .option('--dry-run', 'Preview without writing files')
584
594
  .option('--json', 'Output result as JSON')
585
595
  .action(async (name, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hazeljs/cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Command-line interface for scaffolding and generating HazelJS applications and components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -70,5 +70,5 @@
70
70
  "type": "opencollective",
71
71
  "url": "https://opencollective.com/hazeljs"
72
72
  },
73
- "gitHead": "38fa17627cae78a4b0fe1eb5cf3b17701ecc450e"
73
+ "gitHead": "5904fb3c12954d1e796529de0ec735ec8e410787"
74
74
  }