Skip to content

feat(scripts): add opt-in parallel execution to convert & install#188

Open
CagesThrottleUs wants to merge 3 commits intomsitarzewski:mainfrom
CagesThrottleUs:cages/parallelise-scripts-default-mode
Open

feat(scripts): add opt-in parallel execution to convert & install#188
CagesThrottleUs wants to merge 3 commits intomsitarzewski:mainfrom
CagesThrottleUs:cages/parallelise-scripts-default-mode

Conversation

@CagesThrottleUs
Copy link

Summary

Adds --parallel and --jobs N to scripts/convert.sh and scripts/install.sh so users can run tool-level conversion/installation in parallel. Serial remains the default to avoid breaking existing usage.

  • convert.sh: When --parallel and tool is all, runs antigravity, gemini-cli, opencode, cursor, openclaw, qwen via xargs -P; runs aider and windsurf serially (shared temp files). Output is buffered per tool so each tool’s output stays together.
  • install.sh: When --parallel, runs each selected tool’s install in parallel with output buffered per tool. Works with both interactive and non-interactive modes.
  • Job count: Defaults to nproc (Linux), sysctl -n hw.ncpu (macOS), or 4. Overridable with --jobs N.
  • Progress: Optional tqdm-style progress bar [=======> ] 3/8 in both scripts (serial and parallel).
  • README: Documents parallel usage and recommends opt-in parallel for faster runs.

Testing

  • Manual: Ran ./scripts/convert.sh (serial) and ./scripts/convert.sh --parallel --jobs 2; compared output and checked integrations.
  • Output parity: Generated outputs to separate dirs (./scripts/convert.sh --out ./TEST-SERIAL, parallel run with --out ./TEST-PARALLEL) and compared with:
    • diff -rq TEST-PARALLEL TEST-SERIAL (no output = identical file sets and contents).
    • diff -r TEST-SERIAL TEST-PARALLEL (no output = byte-identical files).
  • Install: Ran ./scripts/install.sh --no-interactive and ./scripts/install.sh --no-interactive --parallel for selected tools; confirmed installs and output grouping.

Testing limitations

  • No automated CI for the parallel path; all checks were manual.
  • Parallel vs serial comparison is by diffing output directories and logs; no dedicated test suite.
  • Job count defaults depend on nproc/sysctl availability (Linux/macOS); other platforms may fall back to 4.
  • Test scripts (test-convert-parallel.sh / test-install-parallel.sh) if present are for local comparison only and are not run in CI.

AI and human roles

  • Human: Design choices (minimal change, tool-level parallel only, opt-in --parallel, use of xargs and nproc/sysctl); validation of behavior; testing (serial vs parallel, diff of TEST-SERIAL vs TEST-PARALLEL); decision to adopt or reject suggested changes.
  • AI (Cursor): Implementation of --parallel/--jobs, progress bar, and buffered output; locating serial execution points; suggesting structure for parallel runs and README wording. AI did not run tests; human ran commands and confirmed results.

Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
@CagesThrottleUs
Copy link
Author

This should solve the issue - #187

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