vgxness 1.2.0 → 1.2.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.
@@ -1,6 +1,10 @@
1
1
  export function helpText() {
2
2
  return `Usage: vgxness <area> <command> [flags]
3
3
 
4
+ Global flags:
5
+ --help, -h Show this help.
6
+ --version, -v Print the installed package version.
7
+
4
8
  Areas:
5
9
  init [--project <name>] [--provider opencode|none] [--scope user|project] [--db global|project-local|custom|<path>] [--db-path <path>] [--mode mcp-only|mcp-plus-agents] [--json]
6
10
  setup plan [--project <name>] [--provider opencode|none] [--scope user|project] [--db global|project-local|custom|<path>] [--db-path <path>] [--mode mcp-only|mcp-plus-agents] [--json]
@@ -1,11 +1,17 @@
1
1
  // Thin CLI router -- all command handlers live in src/cli/commands/*.ts
2
+ import { createRequire } from 'node:module';
2
3
  import { isWorkflowId } from '../workflows/schema.js';
3
4
  import { databasePathFor, parseArgs, requiredFlag } from './cli-flags.js';
4
5
  import { okText, usageFailure, visibleHelpText } from './cli-help.js';
5
6
  import { openCliDatabase, resultFailure } from './cli-helpers.js';
6
7
  import { runAgentCommand, runApprovalsCommand, runCodeCliCommand, runDashboardCommand, runDashboardInteractiveCommand, runDefaultInteractiveEntrypoint, runDoctorAliasCommand, runInitCommand, runMcpDoctorCommand, runMcpInstallCommand, runMcpSetupCommand, runMemoryCommand, runMemoryImportCommand, runOpenCodeCommand, runOrchestratorCommand, runPermissionsCommand, runRunsCommand, runSddCommand, runSetupApplyCommand, runSetupLifecycleCommand, runSetupPlanCommand, runSetupRollbackCommand, runSkillCommand, runSubagentCommand, runVerificationPlanCommand, runVerificationReportCommand, runWorkflowExecuteCommand, runWorkflowPreviewCommand, runWorkflowRunCommand, } from './commands/index.js';
7
8
  const _promptBuffers = new WeakMap();
9
+ const require = createRequire(import.meta.url);
10
+ const packageJson = require('../../package.json');
11
+ const cliVersion = typeof packageJson.version === 'string' ? packageJson.version : 'unknown';
8
12
  export function dispatchCli(argv, environment) {
13
+ if (isGlobalVersionRequest(argv))
14
+ return okText(`${cliVersion}\n`);
9
15
  const parsed = parseArgs(argv);
10
16
  const [area, command] = parsed.positionals;
11
17
  if (!area || area === 'help' || area === '--help' || area === '-h')
@@ -77,6 +83,9 @@ export function dispatchCli(argv, environment) {
77
83
  opened.value.close();
78
84
  }
79
85
  }
86
+ function isGlobalVersionRequest(argv) {
87
+ return argv.length === 1 && (argv[0] === '--version' || argv[0] === '-v');
88
+ }
80
89
  export async function dispatchCliAsync(argv, environment) {
81
90
  const parsed = parseArgs(argv);
82
91
  const [area, command] = parsed.positionals;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgxness",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CLI and MCP control plane for guided AI-agent workflows, SDD, memory, and OpenCode setup.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {