feat: Interactive onboarding CLI with Typer#128
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR replaces the old Makefile-based onboarding with a modern interactive Typer CLI. The new Major Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 2aa1add |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep only `make onboard` as the documented entry point. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covered by `make onboard` media step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The .githooks directory was removed when migrating to pre-commit framework, but the onboard CLI still referenced it via git config core.hooksPath. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace global dspy.configure() with scoped dspy.context() to avoid cross-event-loop RuntimeError. Make LangFuse observability conditional on credentials being present. Improve media step UX with spacing and "Both" as default choice. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Remove garbled characters from README and pyproject.toml descriptions - Add rich as direct dependency to fix DEP003 issues - Add type annotations to fix langfuse type checker errors Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move generate_banner and generate_logo imports from module scope to inside _run_media_generation(). This prevents genai.Client instantiation at import time, allowing all CLI commands to work without GEMINI_API_KEY configured. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Restore original placeholder text so onboard rename can replace them: - pyproject.toml description: "Add your description here" - README.md title: "# Python-Template" - README.md tagline: "Opinionated Python project stack. 🔋 Batteries included." Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Document why generate_banner and generate_logo are imported inside the function rather than at module scope. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove automated agent tooling files no longer needed: - scripts/ralph.sh (agent loop script) - prd.json (feature PRD) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove Ralph agent directory and PRD documentation: - scripts/ralph/ (progress.txt, prompt.md) - tasks/prd-onboarding-cli.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Additional Comments (1)
This PR deletes Either remove this target entirely (since the Ralph artifacts were intentionally cleaned up in commits a4b8c64 and d14657b), or keep it if Ralph is still intended to be used and restore the scripts. Prompt To Fix With AIThis is a comment left during a code review.
Path: Makefile
Line: 109-116
Comment:
**`make ralph` target references deleted scripts**
This PR deletes `scripts/ralph.sh` and `scripts/ralph/prompt.md`, but the `ralph` Makefile target on lines 109-116 still references `./scripts/ralph.sh`. Running `make ralph` will fail with a "No such file or directory" error.
Either remove this target entirely (since the Ralph artifacts were intentionally cleaned up in commits a4b8c64 and d14657b), or keep it if Ralph is still intended to be used and restore the scripts.
```suggestion
```
How can I resolve this? If you propose a fix, please make it concise. |
Restore scripts needed for Ralph agent workflow: - scripts/ralph.sh (agent loop runner) - scripts/ralph/prompt.md (agent prompt template) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Simplify condition from 'if code and code != 0' to 'if code != 0'. Previous logic was correct but unnecessarily complex. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Miyamura80
left a comment
There was a problem hiding this comment.
Review Response: Unresolved Comments
I've analyzed all unresolved Greptile comments. Here's the status:
✅ INVALID (Already Resolved)
README tagline replacement (line 176)
- Status: Already fixed in commit
ee29587 - Explanation: README was reverted to original placeholder text
"<b>Opinionated Python project stack. 🔋 Batteries included. </b>"which matches the replacement string inonboard.pyline 173
✅ VALID but FIXED
Exit code handling (lines 97, 107)
- Status: Fixed in commit
c51732a - Explanation: Simplified
if code and code != 0:toif code != 0:for clearer logic. Exit code 0 (success) now correctly marks steps as completed
❌ VALID - BLOCKING ISSUE
_write_env_file data loss (line 335-356) - CRITICAL
- Status: Unresolved - blocks merge
- Issue: Function rebuilds
.envfrom scratch using only.env.examplekeys, silently deleting custom user variables - Impact: Data loss if users add custom environment variables not in template
- Fix needed: Preserve custom variables by reading existing
.env, identifying untracked keys, and appending them under "# Custom variables" section
Summary: 1 blocking issue remains (env file data loss). Exit code and README issues are resolved.
Individual Comment ResponsesComment on line 176 (README tagline replacement)Status: INVALID - Already resolved in commit The README was reverted back to original placeholder: This matches onboard.py line 173, so replacement works correctly. Comments on lines 97, 107 (Exit code handling)Status: VALID but FIXED - Resolved in commit Simplified Comments on lines 335-356 (_write_env_file)Status: VALID - BLOCKING Critical data loss issue:
Must fix before merge. Suggested approach:
View full analysis in my review comment above. |
Preserve custom environment variables when running `onboard env`: - Load existing .env before overwriting - Identify custom keys not in .env.example - Append under "# Custom variables" section Fixes critical data loss bug where user-added env vars were silently deleted. Addresses Greptile review feedback on lines 335-356. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Miyamura80
left a comment
There was a problem hiding this comment.
Response to Unresolved Greptile Comments
Replying to each unresolved review comment with current status:
Summary
onboard.py) supporting subcommands:rename,deps,env,hooks,media, and a fullonboardorchestratorgenerate_banner.pyandgenerate_logo.pyto accept parameters (title, theme, project_name) for non-interactive userename,generate_banner,generate_logo,setup_hooks) and updates documentationChanges
onboard.py— Typer CLI with 5 subcommands + full onboarding flowinit/generate_banner.py,init/generate_logo.py— accept parameters directlyMakefile— removed old targets, simplified tomake onboardCLAUDE.md,README.md— updated docs to reflect new CLIpyproject.toml,uv.lock— addedtyperdependencyTest plan
uv run python onboard.py --helpto verify CLI structurerename,deps,env,hooks,media)make onboardfor full flowmake cipasses🤖 Generated with Claude Code