From 352d049928d4a9c5f8f4599a15e69d11050032d8 Mon Sep 17 00:00:00 2001 From: Ricky Schema Cascade Date: Wed, 13 May 2026 11:20:31 +0200 Subject: [PATCH] fix(cli): use the real binary name (agentworkforce) in help text, add deploy + login to Commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related help-text bugs noticed after the 3.0.2 publish: 1. `agentworkforce -h` Commands section was missing `deploy` and `login` entirely. They are wired in `cli.ts`'s dispatcher (line ~3743) but were never documented in the help string, so users got an incomplete command list. 2. `agentworkforce deploy -h` printed `usage: workforce deploy ...` — the wrong binary name. The published binary is `agentworkforce` (per the `agentworkforce` umbrella package's bin); `workforce` is only the internal workspace root. Same issue in the `--cloud-url` description referencing the runtime cloud product (left unchanged — that's the product name, not a CLI invocation) and in the `die()` "Usage:" message for missing persona path. Changes: - `cli.ts` (USAGE): add `deploy [flags]` and `login` entries between `pick` and `Options`. Add three deploy/login examples to the Examples block. - `deploy-command.ts`: rename CLI-invocation references in DEPLOY_USAGE, LOGIN_USAGE, the `die()` message, the failure-message banner, the re-run hint inside `runLogin`, and the file-level doc comment from `workforce ` → `agentworkforce `. Left intentionally unchanged: - `--cloud-url` description ("Override the workforce cloud base URL") - `--workspace` description ("Workforce workspace; defaults to the active workspace") - `runLogin`'s prose explaining the "browser-based workforce login flow" — these reference the workforce product/feature, not the CLI. Verified: - `pnpm -F @agentworkforce/cli typecheck` clean - `pnpm -F @agentworkforce/cli test` → 168/168 pass - Live `node dist/cli.js -h` shows `deploy` + `login` - Live `node dist/cli.js deploy -h` says `usage: agentworkforce deploy ...` Co-Authored-By: Claude Opus 4.7 --- packages/cli/src/cli.ts | 28 ++++++++++++++++++++++++++++ packages/cli/src/deploy-command.ts | 12 ++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 6c6af23c..e15f2126 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -181,6 +181,31 @@ Commands: persona-maker with the task as input, or exits non-zero (non-TTY) with a hint. Exit codes: 0 match, 2 no match, 3 picker unavailable. + deploy [flags] + Deploy a persona as a managed agent. Modes: + --mode dev run the persona locally (default if + no Daytona/workspace creds resolve) + --mode sandbox run inside a Daytona sandbox + (default when creds resolve) + --mode cloud POST persona + bundle to the + workforce cloud workspace + Flags: + --workspace pick a non-default workspace + --no-connect skip integration-connect prompts + (fail if any integration is missing) + --byo-sandbox force BYO Daytona auth + --detach background the runner instead of + streaming logs in the foreground + --bundle-out emit the bundle to and exit + without launching + --dry-run validate the persona; no side effects + --cloud-url override the workforce cloud URL + --input KEY=value override a declared persona input + (repeat for multiple) + login Connect this machine to a workforce workspace. The + browser-based flow is rolling out; until then it prints + the WORKFORCE_WORKSPACE_ID / WORKFORCE_WORKSPACE_TOKEN + env-var setup instructions and exits non-zero. Options: -h, --help Show this help text. @@ -207,6 +232,9 @@ Examples: agentworkforce harness check agentworkforce pick "review this PR for security issues" agentworkforce agent "$(agentworkforce pick "fix the flaky test in foo.test.ts")" + agentworkforce deploy ./personas/weekly-digest.json --mode cloud + agentworkforce deploy ./personas/weekly-digest.json --mode sandbox --input TOPIC="Deploy v1" + agentworkforce login `; function die(msg: string, withUsage = true): never { diff --git a/packages/cli/src/deploy-command.ts b/packages/cli/src/deploy-command.ts index 5af4074c..c7cd7966 100644 --- a/packages/cli/src/deploy-command.ts +++ b/packages/cli/src/deploy-command.ts @@ -7,7 +7,7 @@ import { } from '@agentworkforce/deploy'; /** - * Argv parser + dispatcher for `workforce deploy [flags]`. + * Argv parser + dispatcher for `agentworkforce deploy [flags]`. * Keeps cli.ts itself slim — the file is already a large dispatcher and * each command lands in its own module when it grows past trivial. */ @@ -43,7 +43,7 @@ export async function runDeploy(args: readonly string[]): Promise { process.exit(exit.code); } catch (err) { process.stderr.write( - `\nworkforce deploy failed: ${err instanceof Error ? err.message : String(err)}\n` + `\nagentworkforce deploy failed: ${err instanceof Error ? err.message : String(err)}\n` ); process.exit(1); } @@ -67,12 +67,12 @@ export async function runLogin(args: readonly string[]): Promise { 'For now, export your workspace credentials in the shell:\n\n' + ' export WORKFORCE_WORKSPACE_ID=\n' + ' export WORKFORCE_WORKSPACE_TOKEN=\n\n' + - 'Then re-run `workforce deploy ./your-persona.json`.\n' + 'Then re-run `agentworkforce deploy ./your-persona.json`.\n' ); process.exit(1); } -const DEPLOY_USAGE = `usage: workforce deploy [flags] +const DEPLOY_USAGE = `usage: agentworkforce deploy [flags] Flags: --mode dev|sandbox|cloud Pick a run mode (default: sandbox if Daytona/workspace creds resolve, else dev) @@ -87,7 +87,7 @@ Flags: -h, --help Print this message `; -const LOGIN_USAGE = `usage: workforce login +const LOGIN_USAGE = `usage: agentworkforce login Connect this machine to a workforce workspace. The full OAuth flow ships once the cloud login surface is live; until then, set: @@ -147,7 +147,7 @@ export function parseDeployArgs(args: readonly string[]): DeployOptions { } if (!personaPath) { - die('deploy: missing persona path. Usage: workforce deploy '); + die('deploy: missing persona path. Usage: agentworkforce deploy '); } return {