@hexabot-ai/cli 3.4.3 → 3.5.0-beta.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.
@@ -14,17 +14,12 @@ export const registerCheckCommand = (program) => {
14
14
  .description('Run diagnostic checks')
15
15
  .option('--docker-only', 'Only run Docker checks')
16
16
  .option('--no-docker', 'Skip Docker checks')
17
- .action((options) => {
18
- runDiagnostics({
19
- dockerOnly: options.dockerOnly,
20
- noDocker: options.noDocker ?? options.docker === false,
21
- });
22
- });
17
+ .action(runDiagnostics);
23
18
  };
24
19
  const runDiagnostics = (options) => {
25
20
  const projectRoot = process.cwd();
26
21
  const onlyDocker = options.dockerOnly;
27
- const skipDocker = options.noDocker;
22
+ const skipDocker = !options.docker;
28
23
  const results = [];
29
24
  if (!onlyDocker) {
30
25
  const nodeResult = checkNodeVersion({ fatal: false, silent: true });
@@ -24,9 +24,7 @@ export const registerCreateCommand = (program) => {
24
24
  .option('--dev', 'Run hexabot dev after creation (local SQLite by default)')
25
25
  .option('--docker', 'Show Docker/Postgres next steps and use Docker mode with --dev')
26
26
  .option('--force', 'Allow scaffolding into a non-empty directory')
27
- .action(async (projectName, options) => {
28
- await createProject(projectName, options);
29
- });
27
+ .action(createProject);
30
28
  };
31
29
  const createProject = async (projectName, options) => {
32
30
  if (!validateProjectName(projectName)) {
@@ -52,7 +50,7 @@ const createProject = async (projectName, options) => {
52
50
  const dockerEnvBootstrapped = bootstrapCreateEnvFiles(projectPath, config);
53
51
  const adminCredentials = await promptSeedAdminCredentials();
54
52
  persistAdminSeedCredentials(projectPath, config, adminCredentials, dockerEnvBootstrapped, projectName);
55
- if (options.noInstall) {
53
+ if (!options.install) {
56
54
  console.log(chalk.yellow('Skipping dependency installation (--no-install).'));
57
55
  }
58
56
  else {
@@ -61,7 +59,7 @@ const createProject = async (projectName, options) => {
61
59
  }
62
60
  logSuccessMessage(projectName, { docker: options.docker });
63
61
  if (options.dev) {
64
- if (options.noInstall) {
62
+ if (!options.install) {
65
63
  console.log(chalk.yellow('Dependencies were not installed. Run `npm install` before `--dev`.'));
66
64
  }
67
65
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexabot-ai/cli",
3
- "version": "3.4.3",
3
+ "version": "3.5.0-beta.1",
4
4
  "description": "Official Hexabot CLI for creating and managing AI chatbot/agent projects built with Hexabot.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,7 +19,6 @@ import { isHexabotProject } from '../core/project.js';
19
19
  interface CheckCommandOptions {
20
20
  dockerOnly?: boolean;
21
21
  docker?: boolean;
22
- noDocker?: boolean;
23
22
  }
24
23
 
25
24
  export const registerCheckCommand = (program: Command) => {
@@ -28,21 +27,13 @@ export const registerCheckCommand = (program: Command) => {
28
27
  .description('Run diagnostic checks')
29
28
  .option('--docker-only', 'Only run Docker checks')
30
29
  .option('--no-docker', 'Skip Docker checks')
31
- .action((options: CheckCommandOptions) => {
32
- runDiagnostics({
33
- dockerOnly: options.dockerOnly,
34
- noDocker: options.noDocker ?? options.docker === false,
35
- });
36
- });
30
+ .action(runDiagnostics);
37
31
  };
38
32
 
39
- const runDiagnostics = (options: {
40
- dockerOnly?: boolean;
41
- noDocker?: boolean;
42
- }) => {
33
+ const runDiagnostics = (options: CheckCommandOptions) => {
43
34
  const projectRoot = process.cwd();
44
35
  const onlyDocker = options.dockerOnly;
45
- const skipDocker = options.noDocker;
36
+ const skipDocker = !options.docker;
46
37
  const results: DiagnosticResult[] = [];
47
38
 
48
39
  if (!onlyDocker) {
@@ -28,7 +28,7 @@ const DEFAULT_TEMPLATE_REPO = 'hexastack/hexabot-template-starter';
28
28
  interface CreateCommandOptions {
29
29
  template?: string;
30
30
  pm?: string;
31
- noInstall?: boolean;
31
+ install?: boolean;
32
32
  dev?: boolean;
33
33
  docker?: boolean;
34
34
  force?: boolean;
@@ -57,9 +57,7 @@ export const registerCreateCommand = (program: Command) => {
57
57
  'Show Docker/Postgres next steps and use Docker mode with --dev',
58
58
  )
59
59
  .option('--force', 'Allow scaffolding into a non-empty directory')
60
- .action(async (projectName: string, options: CreateCommandOptions) => {
61
- await createProject(projectName, options);
62
- });
60
+ .action(createProject);
63
61
  };
64
62
 
65
63
  const createProject = async (
@@ -105,7 +103,7 @@ const createProject = async (
105
103
  projectName,
106
104
  );
107
105
 
108
- if (options.noInstall) {
106
+ if (!options.install) {
109
107
  console.log(
110
108
  chalk.yellow('Skipping dependency installation (--no-install).'),
111
109
  );
@@ -119,7 +117,7 @@ const createProject = async (
119
117
  logSuccessMessage(projectName, { docker: options.docker });
120
118
 
121
119
  if (options.dev) {
122
- if (options.noInstall) {
120
+ if (!options.install) {
123
121
  console.log(
124
122
  chalk.yellow(
125
123
  'Dependencies were not installed. Run `npm install` before `--dev`.',