uw: prompt to install Claude Code CLI during dev setup#167
uw: prompt to install Claude Code CLI during dev setup#167lmoresi merged 2 commits intodevelopmentfrom
Conversation
The dev pixi feature already pulls nodejs and defines an install-claude task (npm install -g @anthropic-ai/claude-code), but ./uw setup never invoked it, so users picking the Developer feature got the CLI dependency implied but unconfigured. Add an opt-in prompt during setup (default No, only when Developer is chosen) and expose ./uw install-claude as a top-level subcommand for post-setup or non-interactive runs. Underworld development team with AI support from Claude Code (https://claude.com/claude-code)
There was a problem hiding this comment.
Pull request overview
This PR improves the ./uw developer setup flow by making installation of the Claude Code CLI discoverable and optionally runnable during interactive setup, while also adding a dedicated install-claude subcommand for later/non-interactive use.
Changes:
- Add an opt-in prompt at the end of
run_setup()to run the existing Pixiinstall-claudetask when the Developer feature is selected. - Add a new
./uw install-claudesubcommand that dispatches topixi run -e <env> install-claude. - Expose the new subcommand in
./uw --helpunder the Setup section.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| configure_claude_permissions "$(get_env)" | ||
| ;; | ||
| install-claude) | ||
| $PIXI run -e "$(get_env)" install-claude |
There was a problem hiding this comment.
Fixed in 8f491d1 — added a *dev* env guard around the dispatch. Non-dev envs now print a clear message pointing at ./uw set-env dev (or amr-dev / mpich-dev / openmpi-dev) and exit 1, instead of falling through to a raw pixi "task not found" error.
| set-env NAME Change environment directly | ||
| ai-tools Configure external AI instruction paths | ||
| claude-perms Configure Claude Code permissions (safe defaults) | ||
| install-claude Install Claude Code CLI globally (npm, requires dev env) |
There was a problem hiding this comment.
Fixed in 8f491d1 — reworded the help line to "Install Claude Code CLI into the dev pixi env (run via ./uw claude)". That makes it clear the install lands in the env's node prefix and that ./uw claude (or pixi run -e <env> claude) is the invocation path.
Address Copilot review on PR #167: - The install-claude pixi task is defined under [feature.dev.tasks], so `./uw install-claude` would fail with a raw "task not found" error if the active env is default/runtime. Add a *dev* env guard that prints a clear message pointing to ./uw set-env <dev variant>. - "Install Claude Code CLI globally" overstates what the npm task does — it installs into the pixi env's node prefix, not the user's system PATH. Reword the --help line to make the env scope explicit and point at ./uw claude as the invocation path. Underworld development team with AI support from Claude Code (https://claude.com/claude-code)
Summary
devpixi feature already pullsnodejsand defines aninstall-claudetask (npm install -g @anthropic-ai/claude-codeinpixi.toml:327), but./uw setupnever invoked it. Users who picked the Developer feature got the CLI dependency implied but never installed.run_setup(), only when the Developer feature is selected, defaulting to No. Reuses the existing pixi task — no shell duplication of the npm command../uw install-claudesubcommand mirroring the existingclaude-permsdispatch pattern, for post-setup or non-interactive runs.Setup:in./uw --help.No
pixi.tomlchanges. No behaviour change for the Minimal or Runtime features. The existingclaude-permspermissions block is untouched and still runs after the new prompt.Test plan
bash -n uwclean (verified locally)./uw --helplistsinstall-claudeunder Setup./uw setupwith Developer feature: new prompt appears, default No skips with hint./uw setupwith Developer feature, accept: runspixi run -e <env> install-claudeand reports success./uw setupwith Runtime feature: new prompt does NOT appear./uw install-claudestandalone: runs the pixi task in the active envUnderworld development team with AI support from Claude Code