Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <persona-path> [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 <name> 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 <dir> emit the bundle to <dir> and exit
without launching
--dry-run validate the persona; no side effects
--cloud-url <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.
Expand All @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/src/deploy-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
const DEFAULT_CLOUD_URL = 'https://agentrelay.com';

/**
* Argv parser + dispatcher for `workforce deploy <persona-path> [flags]`.
* Argv parser + dispatcher for `agentworkforce deploy <persona-path> [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.
*/
Expand Down Expand Up @@ -47,7 +47,7 @@ export async function runDeploy(args: readonly string[]): Promise<void> {
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);
}
Expand All @@ -73,7 +73,7 @@ export async function runLogin(args: readonly string[]): Promise<void> {
?? process.env.WORKFORCE_WORKSPACE_ID?.trim()
?? (await io.prompt('Workspace ID')).trim();
if (!workspace) {
process.stderr.write('workforce login failed: workspace is required; pass --workspace or set WORKFORCE_WORKSPACE_ID\n');
process.stderr.write('agentworkforce login failed: workspace is required; pass --workspace or set WORKFORCE_WORKSPACE_ID\n');
process.exit(1);
}

Expand All @@ -90,13 +90,13 @@ export async function runLogin(args: readonly string[]): Promise<void> {
process.exit(0);
} catch (err) {
process.stderr.write(
`\nworkforce login failed: ${err instanceof Error ? err.message : String(err)}\n`
`\nagentworkforce login failed: ${err instanceof Error ? err.message : String(err)}\n`
);
process.exit(1);
}
}

const DEPLOY_USAGE = `usage: workforce deploy <persona-path> [flags]
const DEPLOY_USAGE = `usage: agentworkforce deploy <persona-path> [flags]

Flags:
--mode dev|sandbox|cloud Pick a run mode (default: sandbox if Daytona/workspace creds resolve, else dev)
Expand All @@ -115,7 +115,7 @@ Flags:
-h, --help Print this message
`;

const LOGIN_USAGE = `usage: workforce login [flags]
const LOGIN_USAGE = `usage: agentworkforce login [flags]

Connect this machine to a workforce workspace using the browser OAuth flow.
The resulting workspace token is stored in the OS keychain when available,
Expand Down Expand Up @@ -202,7 +202,7 @@ export function parseDeployArgs(args: readonly string[]): DeployOptions {
}

if (!personaPath) {
die('deploy: missing persona path. Usage: workforce deploy <persona-path>');
die('deploy: missing persona path. Usage: agentworkforce deploy <persona-path>');
}

return {
Expand Down
Loading