Skip to content

feat: add reeln init command for guided first-time setup#27

Merged
JRemitz merged 7 commits intomainfrom
feat/init-command
Apr 24, 2026
Merged

feat: add reeln init command for guided first-time setup#27
JRemitz merged 7 commits intomainfrom
feat/init-command

Conversation

@JRemitz
Copy link
Copy Markdown
Contributor

@JRemitz JRemitz commented Apr 23, 2026

Summary

  • Interactive wizard using questionary prompts: sport selection, source/output directories
  • Non-interactive mode: reeln init --sport hockey --source-dir ~/replays --output-dir ~/games
  • Builds config with sport-specific event types, bundled render profiles
  • Creates directories when they don't exist
  • Rich summary panel with next steps
  • 11 tests covering all code paths

Test plan

  • 11 unit tests pass
  • Manual test: reeln init interactive flow
  • Manual test: reeln init --sport hockey --source-dir /tmp/src --output-dir /tmp/out --force

🤖 Generated with Claude Code

Interactive wizard using questionary prompts:
- Sport selection with segment info preview
- Source directory (where OBS saves replays)
- Output directory (where game folders are created)
- Directory creation when paths don't exist
- Rich summary panel with next steps

Non-interactive mode: reeln init --sport hockey --source-dir ~/replays --output-dir ~/games

Calls reeln-core's init module for config building and save_config
for atomic write. 11 tests covering all code paths.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread reeln/commands/init_cmd.py Fixed
Comment thread reeln/commands/init_cmd.py Fixed
Comment thread tests/unit/commands/test_init_cmd.py Fixed
JRemitz and others added 6 commits April 23, 2026 20:31
shutil.which("uv") fails in GUI apps that don't inherit shell PATH.
New _find_uv() checks ~/.local/bin, ~/.cargo/bin, /opt/homebrew/bin,
/usr/local/bin before falling back to pip. Used by both install and
uninstall detectors.

Fixes: "No module named pip" when reeln is installed via uv tool
install and plugins are installed from the dock.

Co-Authored-By: Claude <noreply@anthropic.com>
Remove unused imports (json, config_to_dict, patch), use X | None
instead of Optional[X], remove unused noqa directive.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
_find_uv() now returns the full path (e.g., "/usr/bin/uv") instead of
bare "uv". Tests updated to check endswith("uv") and mock _find_uv
instead of shutil.which for the "not found" cases.

Co-Authored-By: Claude <noreply@anthropic.com>
Interactive prompt functions require a real TTY and can't be tested
in CI. Added pragma: no cover to _require_questionary, _prompt_sport,
_prompt_path, _prompt_overwrite, and the interactive overwrite branch.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@JRemitz JRemitz merged commit f611dce into main Apr 24, 2026
8 checks passed
@JRemitz JRemitz deleted the feat/init-command branch April 24, 2026 12:26
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