Skip to content

feat: slim standalone CLI for faster startup (2.7s → 0.17s)#12

Merged
NormallyGaussian merged 4 commits intomainfrom
slim-standalone-cli
Jan 27, 2026
Merged

feat: slim standalone CLI for faster startup (2.7s → 0.17s)#12
NormallyGaussian merged 4 commits intomainfrom
slim-standalone-cli

Conversation

@NormallyGaussian
Copy link
Contributor

Summary

  • Switch to PyInstaller onedir mode (eliminates extraction overhead)
  • Remove heavy dependencies from standalone CLI: pandas, polars, pyarrow, duckdb, sqlalchemy, questionary
  • Add [cli] optional dependency for YAML config and interactive planner
  • Standalone CLI only supports CSV source type and CLI args (no YAML config files)
  • Update build.py to create zip archives for distribution
  • Update install-cli.sh to download and extract zip archives

Results

Metric Before After Improvement
Bundle size 160MB 37MB 77% smaller
Startup time 2.7s 0.17s 16x faster

Install options

pip install parallel-web-tools        # Minimal CLI (search, extract, enrich with CLI args)
pip install parallel-web-tools[cli]   # + YAML config files, interactive planner
pip install parallel-web-tools[all]   # Everything

Test plan

  • All 216 tests pass
  • Standalone CLI builds successfully
  • Standalone CLI starts in ~0.17s
  • enrich plan command hidden in standalone mode
  • YAML config shows helpful error in standalone mode
  • Test install script with zip archive
  • Test on other platforms (Linux, Windows)

- Switch to PyInstaller onedir mode (no extraction overhead)
- Remove heavy deps from standalone: pandas, polars, pyarrow, duckdb, sqlalchemy, questionary
- Add [cli] optional dependency for YAML config and interactive planner
- Standalone CLI only supports CSV source type and CLI args (no YAML config)
- Update build.py to create zip archives for distribution
- Update install-cli.sh to download and extract zip archives

Bundle size: 160MB → 37MB (77% smaller)
Startup time: 2.7s → 0.17s (16x faster)

Install options:
- pip install parallel-web-tools        # Minimal
- pip install parallel-web-tools[cli]   # + YAML config, interactive planner
- pip install parallel-web-tools[all]   # Everything
@NormallyGaussian NormallyGaussian marked this pull request as ready for review January 27, 2026 03:08
- Add tests for _CLI_EXTRAS_AVAILABLE flag behavior
- Add test for YAML config error when extras missing
- Add test for source types availability
- Update release.yml for zip archive format
- Add verification steps for checksum files
@NormallyGaussian NormallyGaussian merged commit 5b48c4e into main Jan 27, 2026
4 checks passed
@NormallyGaussian NormallyGaussian deleted the slim-standalone-cli branch January 27, 2026 03:37
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