Summary
Add a commit-echo batch <directory> command that scans a directory for git repositories, identifies those with staged changes, and processes each one in sequence — generating suggestions, committing, and reporting results.
Motivation
- Common in monorepo setups or when managing multiple microservices
- Developers often switch between several repos in a working session
- Batch mode saves time by automating the context-switch workflow
Proposed Implementation
- Add a new
batch subcommand in src/commands/batch.ts
- The command takes a directory path argument (default: current directory)
- Scan for directories containing a
.git folder (non-recursive by default, with a --recursive flag)
- For each repo with staged changes:
- Print repo name/path
- Generate suggestions (reuse
generateSuggestions from src/llm/client.ts)
- Display suggestions
- Auto-commit or prompt per-repo based on a
--yes flag
- Print a summary report at the end showing which repos succeeded/failed
Acceptance Criteria
commit-echo batch ./projects finds all git repos in ./projects
- Processes repos with staged changes in sequence
- Supports
--yes for unattended batch operation
- Prints clear summary of results per repo
- Skips repos without staged changes with a notice
Summary
Add a
commit-echo batch <directory>command that scans a directory for git repositories, identifies those with staged changes, and processes each one in sequence — generating suggestions, committing, and reporting results.Motivation
Proposed Implementation
batchsubcommand insrc/commands/batch.ts.gitfolder (non-recursive by default, with a--recursiveflag)generateSuggestionsfromsrc/llm/client.ts)--yesflagAcceptance Criteria
commit-echo batch ./projectsfinds all git repos in./projects--yesfor unattended batch operation