acryl 0.1.11 → 0.1.13

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/lib/bin.js CHANGED
@@ -5022,6 +5022,7 @@ function parseAcrylArgs(args) {
5022
5022
  let resumeSessionId;
5023
5023
  let json = false;
5024
5024
  let version = false;
5025
+ let help = false;
5025
5026
  for (let index = 0; index < args.length; index += 1) {
5026
5027
  const argument = args[index];
5027
5028
  if (argument === void 0) continue;
@@ -5030,6 +5031,11 @@ function parseAcrylArgs(args) {
5030
5031
  version = true;
5031
5032
  continue;
5032
5033
  }
5034
+ if (argument === "--help" || argument === "-h") {
5035
+ if (help) throw new Error("--help may be provided only once");
5036
+ help = true;
5037
+ continue;
5038
+ }
5033
5039
  if (argument === "--profile") {
5034
5040
  if (profile !== void 0) throw new Error("--profile may be provided only once");
5035
5041
  const value = args[index + 1];
@@ -5061,15 +5067,17 @@ function parseAcrylArgs(args) {
5061
5067
  throw new Error(`unexpected argument for ${command}: ${argument}`);
5062
5068
  }
5063
5069
  const resolvedCommand = command ?? "tui";
5064
- if (!version && profile === void 0 && resumeSessionId === void 0) return {
5070
+ if (!version && !help && profile === void 0 && resumeSessionId === void 0) return {
5065
5071
  command: resolvedCommand,
5066
5072
  json,
5067
- version
5073
+ version,
5074
+ help
5068
5075
  };
5069
5076
  return {
5070
5077
  command: resolvedCommand,
5071
5078
  json,
5072
5079
  version,
5080
+ help,
5073
5081
  ...profile === void 0 ? {} : { profile },
5074
5082
  ...resumeSessionId === void 0 ? {} : { resumeSessionId }
5075
5083
  };
@@ -5119,6 +5127,27 @@ async function runAcryl(args, supplied = {}) {
5119
5127
  ...supplied
5120
5128
  };
5121
5129
  const invocation = parseAcrylArgs(args);
5130
+ if (invocation.help) {
5131
+ dependencies.write([
5132
+ "ACRYL - Agent Context Relay Yielding Lifecycles",
5133
+ "",
5134
+ `Usage: acryl [command] [options]`,
5135
+ "",
5136
+ "Commands:",
5137
+ " tui Run the terminal client (default)",
5138
+ " web Serve the local ACRYL web runtime",
5139
+ " gui [reserved] launch the Desktop surface (not wired in this build)",
5140
+ "",
5141
+ "Options:",
5142
+ " -h, --help Show this help",
5143
+ " -v, --version Print the ACRYL version",
5144
+ " --json Emit machine-readable output",
5145
+ " --profile <name> Use a named ACRYL profile",
5146
+ " --resume <id> Resume a session",
5147
+ ""
5148
+ ].join("\n"));
5149
+ return;
5150
+ }
5122
5151
  if (invocation.version) {
5123
5152
  dependencies.write(ACRYL_VERSION);
5124
5153
  return;