Skip to content

feat(pm): add 'add' as subcommand alias for install#2823

Open
Totoro-jam wants to merge 3 commits intoutooland:nextfrom
Totoro-jam:feat/add-install-alias
Open

feat(pm): add 'add' as subcommand alias for install#2823
Totoro-jam wants to merge 3 commits intoutooland:nextfrom
Totoro-jam:feat/add-install-alias

Conversation

@Totoro-jam
Copy link
Copy Markdown
Contributor

@Totoro-jam Totoro-jam commented Apr 24, 2026

Summary

Closes #2608

Add add as a subcommand alias for install, providing an intuitive alternative for users familiar with npm/pnpm/yarn conventions.

Changes:

  • Add INSTALL_ALIASES constant in crates/pm/src/constants.rs for help text display
  • Add aliases = ["add"] to Install command in crates/pm/src/main.rs
  • Update help text in crates/pm/src/service/config.rs to show i, add aliases
  • Add unit tests for alias recognition
  • Add E2E tests in e2e/utoo-pm.sh (Unix) and e2e/utoo-pm.ps1 (Windows)

Usage

# All of these are equivalent:
utoo install react
utoo i react
utoo add react
ut add react

Test Plan

  • Unit tests: cargo test -p utoo-pm passed
  • E2E tests: ./e2e/utoo-pm.sh passed (Unix)
  • Help text verified: utoo install --help shows Aliases: i, add
  • Backward compatibility: install and i aliases continue to work
  • All install command options covered: -D, -O, --save-peer, -g, version specs, multiple packages

@Totoro-jam Totoro-jam force-pushed the feat/add-install-alias branch from ff0e4fd to 4c8f702 Compare April 24, 2026 09:38
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces 'add' as an alias for the 'install' command. The changes include updating command constants, CLI subcommand definitions, and adding comprehensive unit and E2E tests for both PowerShell and Bash environments. A minor inconsistency was identified in a Bash E2E test log message where the package name mentioned in the output did not match the package being installed.

Comment thread e2e/utoo-pm.sh Outdated
@fireairforce fireairforce requested a review from elrrrrrrr April 24, 2026 09:41
@Totoro-jam Totoro-jam force-pushed the feat/add-install-alias branch 2 times, most recently from 1db42f9 to 40021c9 Compare April 24, 2026 10:11
Comment thread crates/pm/src/main.rs Outdated
@Totoro-jam Totoro-jam requested a review from elrrrrrrr April 27, 2026 02:08
@Totoro-jam Totoro-jam force-pushed the feat/add-install-alias branch from e0b8f30 to ea00d68 Compare April 27, 2026 03:31
@elrrrrrrr elrrrrrrr added the A-Pkg Manager Area: Package Manager label Apr 27, 2026
- Add 'add' as an alias for the install subcommand (Issue utooland#2608)
- Update help text to display all aliases: 'i, add'
- Add unit tests for add alias recognition
- Add comprehensive E2E tests for both Unix and Windows platforms
Use aliases = ["i", "add"] instead of alias + aliases split pattern.
Remove INSTALL_ALIAS constant as suggested by PR review.
Ignore node_modules and package-lock.json in E2E test directories.
@Totoro-jam Totoro-jam force-pushed the feat/add-install-alias branch from d656ca9 to 6bc0c6d Compare April 27, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Pkg Manager Area: Package Manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [PM] missing add subcommand alias

2 participants