Skip to content

Release v1.1.9: Auto-install deps and flag convention - #29

Merged
BrettHamlin merged 1 commit into
mainfrom
dev
Jan 25, 2026
Merged

Release v1.1.9: Auto-install deps and flag convention#29
BrettHamlin merged 1 commit into
mainfrom
dev

Conversation

@BrettHamlin

Copy link
Copy Markdown
Owner

Summary

  • Feature 005: Auto-install dependencies on lane creation
  • Simplified flag convention (single-dash for switchyard, double-dash for Claude)
  • Claude launcher module with pass-through flag support

Changes

  • Auto-detect and install dependencies (bun/npm/yarn/pnpm/cargo/go/pip)
  • New flag convention eliminates need for -- separator
  • Added parseClaudeFlags function for testable flag parsing
  • Updated all CLI commands to use single-dash flags
  • Comprehensive test coverage (403 tests passing)

🤖 Generated with Claude Code

* feat: auto-install dependencies and launch Claude on lane creation

This feature streamlines the `switchyard new` command to:
- Auto-detect package manager from lockfile (bun → npm → yarn → pnpm)
- Install dependencies after creating the lane worktree
- Launch Claude Code with cwd set to the new worktree
- Support pass-through flags via `--` separator

Key changes:
- Add deps-installer module with detection and installation logic
- Add claude-launcher module with exec pattern for Claude launch
- Update new command to integrate deps install and Claude launch
- Add --no-claude flag to skip Claude launch
- Write error logs to .switchyard/dependency-error.log on failure
- 5-minute timeout for dependency installation
- Remove /switchyard-new slash command (terminal-only now)

Closes #27

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: simplify flag convention - single dash for switchyard, double dash for Claude

Changes the CLI flag convention:
- Single-dash flags (-flag) go to switchyard
- Double-dash flags (--flag) auto-forward to Claude on `new` command

This eliminates the need for the `--` separator when passing flags to Claude.

Examples:
  switchyard new feature --model opus     # --model opus goes to Claude
  switchyard init -force                  # -force is a switchyard flag
  switchyard new feature -no-claude --verbose  # mixed flags work correctly

Changes:
- Updated parseGlobalOptions to use -v, -json, -f, -h, -V
- Added parseClaudeFlags() function for extracting double-dash flags with values
- Updated all command handlers to use single-dash flags
- Updated Claude command templates with new flag convention
- Updated README with "Flag Convention" section
- Added comprehensive tests for parseClaudeFlags (10 new test cases)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Test <test@test.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@BrettHamlin
BrettHamlin merged commit adb93b4 into main Jan 25, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant