CLI for Huskyv0 Task Orchestration with Claude Agent SDK
npm install @simonfestl/husky-cliCLI for Huskyv0 Task Orchestration with Claude Agent SDK integration.
Part of the huskyv0 monorepo
``bashFrom npm (recommended)
npm install -g @simonfestl/husky-cli
Quick Start
`bash
Configure API
husky config set api-url https://your-husky-dashboard.run.app
husky config set api-key your-api-keyTest connection
husky config testInteractive mode
husky
`Commands
$3
`bash
husky task list # List all tasks
husky task list --status in_progress # Filter by status
husky task list --json # JSON output
husky task create "Fix login bug" --priority high
husky task get
husky task start
husky task done --pr https://github.com/...
husky task update --status done
husky task delete
`$3
`bash
husky project list
husky project create "New Project" --description "..."
husky project get
husky project update --status active
husky project delete
husky project add-knowledge --content "..."
husky project list-knowledge
husky project delete-knowledge
`$3
`bash
husky workflow list
husky workflow create "Onboarding" --department
husky workflow get
husky workflow update --name "Updated"
husky workflow delete
husky workflow add-step --name "Step 1"
husky workflow update-step --name "Updated"
husky workflow delete-step
husky workflow generate-steps # AI-generated
husky workflow generate-mermaid # Mermaid diagram
`$3
`bash
husky idea list
husky idea create "New feature idea" --category feature
husky idea get
husky idea update --status approved
husky idea delete
husky idea convert-to-task
`$3
`bash
husky department list
husky department create "Engineering"
husky department get
husky department update --name "Dev"
husky department delete
`$3
`bash
husky vm list
husky vm create --prompt "Fix bugs" --agent claude
husky vm get
husky vm start
husky vm stop
husky vm logs
husky vm approve
husky vm reject --reason "..."
husky vm update --status approved
husky vm delete
`$3
`bash
Run E2E tests for a task
husky e2e run
husky e2e run --secret ADMIN_PASSWORD --retries 2
husky e2e run --env TEST_USER=admin --headedE2E Inbox (pending test requests)
husky e2e inbox # List all inbox messages
husky e2e inbox --status pending # Filter by status
husky e2e inbox --task # Filter by taskWatch for new E2E requests (auto-processing)
husky e2e watch --interval 30
husky e2e watch --once # Process once and exitComplete E2E test request (used by e2e-bridge)
husky e2e done --passed # Mark as passed
husky e2e done --failed --notes "reason"Browser automation utilities
husky e2e screenshot # Take screenshot
husky e2e screenshot --upload # Upload to GCS
husky e2e record # Record browser sessionArtifact management
husky e2e upload --task # Upload to GCS
husky e2e list --task # List artifacts
husky e2e clean --older-than 7 # Clean old artifacts
`$3
`bash
husky pr list # List open PRs
husky pr get # Get PR details
husky pr review # Start review
husky pr approve # Approve PR
husky pr request-changes --comment "..."
husky pr merge # Merge PR
husky pr close # Close PR
`$3
`bash
husky infra status # Overall infra status
husky infra vms # List all VMs
husky infra services # Cloud Run services
husky infra logs # Service logs
husky infra metrics # Resource metrics
`$3
`bash
husky youtube # Summarize video with Gemini AI
husky youtube --remember # Also store in Second Brain
husky youtube --json # JSON output
`$3
`bash
husky image "a futuristic city" # Generate image with Imagen 3
husky image "..." --output ./image.png # Save to file
husky image "..." --aspect 16:9 # Aspect ratio
`$3
`bash
husky mermaid validate # Validate Mermaid syntax
husky mermaid validate --stdin # Validate from stdin
`$3
`bash
husky sa list # List service accounts
husky sa create --role worker # Create service account
husky sa get # Get details
husky sa delete # Delete service account
`$3
`bash
husky agent-msg send "message" # Send to another agent
husky agent-msg inbox # Check inbox
husky agent-msg read # Read message
`$3
`bash
husky preview list # List PR previews
husky preview get # Get preview URL
husky preview logs # Preview logs
`$3
`bash
husky strategy show
husky strategy set-vision "Our vision..."
husky strategy set-mission "Our mission..."
husky strategy add-value --title "Innovation" --description "..."
husky strategy update-value --title "Updated"
husky strategy delete-value
husky strategy add-goal --title "Q1 Goal" --target "..."
husky strategy update-goal --status completed
husky strategy delete-goal
husky strategy add-persona --name "Developer" --description "..."
husky strategy update-persona --name "Updated"
husky strategy delete-persona
`$3
`bash
husky process list
husky process create "Release Process" --department
husky process get
husky process update --name "Updated"
husky process delete
`$3
`bash
husky roadmap list
husky roadmap get
husky roadmap create "Q1 2025" --description "..."
husky roadmap update --name "Updated"
husky roadmap delete
husky roadmap add-phase --name "Phase 1"
husky roadmap add-feature --phase --title "Feature"
husky roadmap list-features
husky roadmap update-feature --status done
husky roadmap delete-feature
husky roadmap convert-feature # To task
husky roadmap generate # AI-generated
`$3
`bash
husky changelog generate --from --to HEAD
husky changelog list
husky changelog show
husky changelog publish
husky changelog delete
`$3
`bash
husky vm-config list
husky vm-config create --machine-type e2-medium --disk-size 50
husky vm-config update --machine-type e2-standard-2
husky vm-config delete
`$3
`bash
Check pending messages
husky chat pending
husky chat pending --jsonView inbox (GitHub + Google Chat)
husky chat inbox
husky chat inbox --unreadReply to any message (auto-detects platform)
husky chat reply-to "Your response"Reply in Google Chat thread
husky chat reply-chat "Message" --thread Mark message as read
husky chat mark-read Watch for messages (inject into tmux)
husky chat watch-inject --tmux-session supervisor
`The
reply-to command automatically detects whether the message is from GitHub or Google Chat and uses the appropriate API to send the reply.$3
`bash
husky settings get
husky settings set
`$3
`bash
husky config set api-url https://your-husky-dashboard.run.app
husky config set api-key your-api-key
husky config get api-url
husky config list
husky config test
`$3
Session tokens provide short-lived JWT authentication for agents. They are created using
HUSKY_API_KEY and auto-refresh when expired.`bash
Login (creates 1-hour session token)
husky auth login --agent supervisor
husky auth login --agent husky-worker-1Check session status
husky auth session
husky auth session --jsonRefresh token manually
husky auth refresh
husky auth refresh --agent supervisorLogout (clear session)
husky auth logout
`VM Startup Pattern:
`bash
#!/bin/bash
VM_NAME=$(hostname)
husky auth login --agent "$VM_NAME"
All subsequent commands use Bearer token
`How it works:
1.
HUSKY_API_KEY is used once to create a session token
2. All subsequent API calls use Authorization: Bearer
3. Token auto-refreshes when expired or within 5 minutes of expiry
4. Falls back to x-api-key if refresh fails$3
`bash
husky explain task # Explain task commands
husky explain workflow # Explain workflow commands
husky explain all # Full documentation
husky --help
`$3
`bash
husky completion bash >> ~/.bashrc
husky completion zsh >> ~/.zshrc
husky completion fish > ~/.config/fish/completions/husky.fish
`Environment Variables
| Variable | Description |
|----------|-------------|
|
HUSKY_API_URL | Husky Dashboard URL |
| HUSKY_API_KEY | Husky API key |
| ANTHROPIC_API_KEY | Anthropic API key for Claude |
| GITHUB_TOKEN | GitHub token for commits (optional) |Development
`bash
From monorepo root
cd packages/cliInstall dependencies
npm installBuild
npm run buildWatch mode
npm run devLink globally for testing
npm link
`Publishing / Release
$3
`bash
cd packages/cli1. Bump version
npm version patch # or minor/major2. Publish to npm (opens browser for authentication)
npm publish --access public3. Commit and push
git add .
git commit -m "chore(cli): release vX.X.X"
git push origin main
`$3
`bash
Update to latest version
npm update -g @simonfestl/husky-cliOr reinstall
npm install -g @simonfestl/husky-cliCheck installed version
husky --version
`Changelog
$3
New Features:
-
husky auth login --agent - Create session token from HUSKY_API_KEY
- husky auth logout - Clear session token
- husky auth session - Show session status (agent, role, expiry)
- husky auth refresh - Manually refresh tokenImprovements:
- All API calls now use Bearer token authentication (auto-refresh)
- Token auto-refreshes when expired or within 5 minutes of expiry
- Falls back to x-api-key for backwards compatibility
- JWT_SECRET now required in production (fail-fast)
Documentation:
- Added missing command sections: pr, infra, youtube, image, mermaid, sa, agent-msg, preview
- Updated architecture docs with session token flow
Code Quality:
- Removed
as any type suppression in sop.ts$3
New Features:
-
husky e2e inbox - List E2E test requests from API
- husky e2e watch - Watch for and auto-process E2E requests
- husky e2e run --secret - Inject secrets from GCP Secret Manager
- husky e2e run --env - Set environment variables for tests
- husky e2e run --retries - Retry failed tests automaticallyImprovements:
- All artifact URLs now use HTTPS
- Better error handling in E2E commands
- Updated permissions for e2e_agent role
$3
New Features:
-
husky chat reply-to now supports both GitHub and Google Chat
- Auto-detects platform from message metadata
- GitHub replies use GitHub App (no PAT required on VM)Improvements:
- Require 8+ character prefix for messageId matching (prevents misdirected replies)
- Better error messages for short messageId prefixes
$3
BREAKING CHANGES:
- Removed:
husky jules commands (replaced by supervisor architecture)
- Removed: husky services commands (deprecated)
- Removed: VM Pool management (now automated by supervisor)
- Deprecated: husky agent commands (use husky task instead)New Features:
- Added:
husky chat command for supervisor communication
- Added: Project resolver to prevent orphaned tasks
- Added: Implementation plans via husky task plan
- Added: QA review pipeline supportImprovements:
- Version now read dynamically from package.json
- Simplified task workflow
- Scope-based API key system support
$3
- Full Dashboard feature parity (69 new commands)
- Added: project, workflow, idea, department, vm, jules, process, strategy, settings, vm-config commands
- Added: Interactive TUI mode (husky without args)
- Added: Shell completion (bash/zsh/fish)
- Added: --json flag for all commands
- Monorepo migration from separate husky-cli repo$3
- Added roadmap commands (list, get, create, generate, phases, features)
- Added changelog commands (generate, list, show, publish)
- Added explain command for documentation
- Added config test command$3
- Added agent` commands (plan, execute, wait-approval)MIT