Skip to content

Remove shorthand commands and improve command suggestions#178

Merged
jancurn merged 2 commits intomainfrom
claude/remove-command-aliases-CxjJC
Apr 16, 2026
Merged

Remove shorthand commands and improve command suggestions#178
jancurn merged 2 commits intomainfrom
claude/remove-command-aliases-CxjJC

Conversation

@jancurn
Copy link
Copy Markdown
Member

@jancurn jancurn commented Apr 16, 2026

Summary

This PR removes the shorthand tools, resources, and prompts commands and improves the command suggestion system to guide users to the full command names when they use the bare prefixes.

Key Changes

  • Removed shorthand commands: Deleted the tools, resources, and prompts commands from the CLI, keeping only their full variants (tools-list, resources-list, prompts-list)
  • Updated command registry: Removed the three shorthand commands from KNOWN_SESSION_COMMANDS in the parser
  • Enhanced command suggestions: Added prefix-matching logic to suggestCommand() that suggests the appropriate -list variant when users type bare prefixes (e.g., toolstools-list)
  • Added test coverage: Added unit tests for the new prefix suggestion behavior and e2e tests verifying that bare commands fail with helpful suggestions

Implementation Details

The command suggestion system now includes a new prefix-matching step that checks if an unknown command matches one of the known bare prefixes (tools, resources, prompts) and suggests the corresponding -list command. This provides a better user experience by guiding users to the correct command without requiring them to remember the full naming convention.

The prefix matching is case-insensitive and runs before the Levenshtein distance fallback, ensuring that exact prefix matches are prioritized over fuzzy matching.

https://claude.ai/code/session_01CtojWxD6727Ba3vERgXxyk

claude added 2 commits April 16, 2026 10:46
… commands

Remove the shorthand aliases `tools`, `resources`, and `prompts` that
previously mapped to their `-list` counterparts. Bare prefix commands
now produce a helpful error suggesting the primary action command
(e.g., `tools` → `tools-call`, `resources` → `resources-read`,
`prompts` → `prompts-get`).

https://claude.ai/code/session_01CtojWxD6727Ba3vERgXxyk
tools → tools-list, resources → resources-list, prompts → prompts-list

https://claude.ai/code/session_01CtojWxD6727Ba3vERgXxyk
@jancurn jancurn merged commit ee6f244 into main Apr 16, 2026
6 checks passed
@jancurn jancurn deleted the claude/remove-command-aliases-CxjJC branch April 16, 2026 11:41
jancurn pushed a commit that referenced this pull request Apr 16, 2026
Add Unreleased entry for the removal of `tools`, `resources`, and
`prompts` shorthand commands in favor of their full names.

https://claude.ai/code/session_01BiVsijKpsF5PPCf8zbTY9Y
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.

3 participants