Skip to content

uw: prompt to install Claude Code CLI during dev setup#167

Merged
lmoresi merged 2 commits intodevelopmentfrom
bugfix/uw-install-claude-cli
May 4, 2026
Merged

uw: prompt to install Claude Code CLI during dev setup#167
lmoresi merged 2 commits intodevelopmentfrom
bugfix/uw-install-claude-cli

Conversation

@lmoresi
Copy link
Copy Markdown
Member

@lmoresi lmoresi commented May 4, 2026

Summary

  • The dev pixi feature already pulls nodejs and defines an install-claude task (npm install -g @anthropic-ai/claude-code in pixi.toml:327), but ./uw setup never invoked it. Users who picked the Developer feature got the CLI dependency implied but never installed.
  • Adds an opt-in prompt at the end of run_setup(), only when the Developer feature is selected, defaulting to No. Reuses the existing pixi task — no shell duplication of the npm command.
  • Adds a top-level ./uw install-claude subcommand mirroring the existing claude-perms dispatch pattern, for post-setup or non-interactive runs.
  • Lists the new subcommand under Setup: in ./uw --help.

No pixi.toml changes. No behaviour change for the Minimal or Runtime features. The existing claude-perms permissions block is untouched and still runs after the new prompt.

Test plan

  • bash -n uw clean (verified locally)
  • ./uw --help lists install-claude under Setup
  • ./uw setup with Developer feature: new prompt appears, default No skips with hint
  • ./uw setup with Developer feature, accept: runs pixi run -e <env> install-claude and reports success
  • ./uw setup with Runtime feature: new prompt does NOT appear
  • ./uw install-claude standalone: runs the pixi task in the active env

Underworld development team with AI support from Claude Code

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)
Copilot AI review requested due to automatic review settings May 4, 2026 11:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Pixi install-claude task when the Developer feature is selected.
  • Add a new ./uw install-claude subcommand that dispatches to pixi run -e <env> install-claude.
  • Expose the new subcommand in ./uw --help under the Setup section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread uw Outdated
configure_claude_permissions "$(get_env)"
;;
install-claude)
$PIXI run -e "$(get_env)" install-claude
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread uw Outdated
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)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
@lmoresi lmoresi merged commit 869c224 into development May 4, 2026
1 check passed
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.

2 participants